- How do I install php-telegram-bot/laravel in a Laravel application?
- Install it with Composer using composer require php-telegram-bot/laravel, which will pull in the underlying php-telegram-bot core library as a dependency. After install, complete the package setup by registering its service provider and publishing its configuration file into your app's config directory. Check the resolved versions of both the wrapper and the core in your lockfile before wiring anything into production code.
- Which Laravel versions does php-telegram-bot/laravel support?
- Release v2.1.0 adds explicit Laravel 10 support, which is a positive maintenance signal from the maintainer. The release metadata does not state support for framework majors beyond Laravel 10, so newer lines should be treated as unproven. Always read the composer.json constraint on illuminate/support to confirm your pinned Laravel minor falls inside it.
- Does php-telegram-bot/laravel work with Laravel 11 or later?
- There is no stated support for Laravel 11 or later in the v2.1.0 release information. Until the maintainer publishes a constraint covering newer majors, treat those framework versions as out of scope rather than assuming compatibility. If your organization standardizes on a newer Laravel line, this package becomes a planning input, not a drop-in dependency.
- What is the difference between php-telegram-bot/laravel and the php-telegram-bot core library?
- This package is a Laravel integration layer that wraps the separately versioned php-telegram-bot core library, which was at 0.81.0 for the v2.1.0 release. The wrapper and the core move independently, so a change in bot behavior can arrive through the core without a major bump of the Laravel package. That means your dependency pin needs to cover both coordinates, not just the Composer package name.
- Is the 0.x core dependency a production risk for a Laravel bot?
- Yes, this is the dominant risk. Under conventional 0.x semantics, minor version bumps may contain breaking changes, so moving from 0.80 to 0.81 is not guaranteed safe. Because your exposure is transitive, record the exact resolved core version in the lockfile and treat any drift within 0.x as a reviewable change rather than a routine patch bump.
- Do I need to change application code when upgrading to php-telegram-bot/laravel v2.1.0?
- The release contains a Laravel constraint widening plus a core bump, with no indication of API surface changes, new configuration keys, or required migration steps. In practice the upgrade is a Composer constraint update plus a lockfile refresh. Note that the absence of a no-breaking-changes statement is not a compatibility guarantee, so run your existing test suite as a verification gate after resolving.
- How do I configure my Telegram bot token with this package?
- Configuration is handled through the package's published config file in your Laravel config directory, where you supply bot credentials and options that are passed down to the core library. Publish the config first, then fill in the values for each environment rather than hardcoding them in application code. Use the keys defined in the published file as the source of truth for the exact names available in your installed version.
- How should I test a Telegram bot built with php-telegram-bot/laravel?
- Keep your bot handlers and command logic in small injectable services so they can be unit tested without hitting Telegram's API. Mock the underlying core library's HTTP or request layer for integration-style tests, and reserve real API calls for a manual staging check. After any dependency bump, run the full suite and confirm the resolved core version matches what you expect.
- What are the alternatives to php-telegram-bot/laravel?
- You can use the php-telegram-bot core library directly and write your own Laravel service provider and config setup. Other Laravel-specific Telegram bot packages exist if you need a different API style. The value of this wrapper is the packaged configuration and service provider glue, so compare on that basis rather than on bot feature set, which comes from the core.
- Is php-telegram-bot/laravel actively maintained, and what is its support policy?
- The v2.1.0 release adding Laravel 10 support shows the maintainer is tracking framework releases, which is a healthy signal. However, no support policy, EOL window, or CI test matrix is stated in the release metadata, and the changelog disclosure is thin for a core bump of this size. Before adopting it, pull the full changelog and the core's 0.80 to 0.81 diff to assess blast radius yourself.