orkhanahmadov/laravel-commentable
A Laravel package that makes any Eloquent model commentable via a simple trait. It stores comments polymorphically, supports customizable comment models and authentication settings, and lets you retrieve, create, and manage comments on posts, pages, or other records with minimal setup.
This release is a compatibility milestone rather than a feature drop: 1.1.0 adds PHP 8 support. Treat the upgrade as an environment and CI change first, then validate package behavior under PHP 8.
^1.1. If you are still on PHP 7.x, stay on the previous package line until the app is upgraded.composer require <vendor>/<package>:^1.1 --with-all-dependencies
Use --with-all-dependencies so transitive constraints are recalculated against the new PHP requirement.composer.json. Verify the package's require.php constraint, Laravel framework constraint, and whether the service provider is still listed under extra.laravel.providers for auto-discovery.php artisan vendor:publish --provider="<Vendor>\\<Package>\\<PackageServiceProvider>" --tag=config and diff against your existing config rather than overwriting it. Config keys are usually stable in a minor release, but PHP 8 can expose type-sensitive defaults.php artisan tinker under PHP 8 to confirm the package boots and autoloads cleanly.If there is no existing assessment, this is also the moment to record the supported PHP/Laravel matrix, the package's primary abstraction, and the one workflow your team will use it for.
Resolve through the container, not new. Laravel packages generally bind their core service in the provider. Prefer constructor injection or app(Contract::class) so PHP 8's stricter type handling and any package-level union/intersection types are enforced consistently.
public function __construct(private PackageService $service) {}
Wrap package calls behind a small application service. This is especially valuable when adopting a PHP 8 compatibility release: if the package changes signatures or adds typed parameters, your call sites remain stable. Keep the package's DTOs and exceptions from leaking into controllers.
Use it in jobs and listeners where the package is I/O-bound. A common day-to-day pattern is dispatching package work through queued jobs so retries and backoff are handled by Laravel rather than the package. Serialize only identifiers into the job payload, then resolve the package service inside handle().
Test with the package's fake or a bound stub. If the package ships a fake, swap it in setUp(); otherwise bind a mock of its contract in the container. Run the suite on PHP 8 in CI — this is the main thing 1.1.0 changes for you.
Integration tip: add PHP 8.0 (and 8.1/8.2 if you support them) to your CI matrix alongside your existing PHP version for one release cycle. That catches deprecation notices emitted by the package before they become failures in a future major.
php: ^8.0 (or >=8.0). Confirm the exact constraint: if it dropped PHP 7.x, the upgrade is breaking for any consumer still on 7.4 even though the version bump is minor.composer.lock and check composer why-not php 8.0 if resolution fails. A sibling dependency pinned to PHP 7 is the usual culprit, not this package.php -d error_reporting=E_ALL artisan test and scan logs; fix package-originated deprecations by upgrading rather than suppressing.TypeError behavior mean previously tolerated null or string-to-int coercions may now throw. Audit any code that passes untyped config values into package methods.php artisan config:clear && php artisan cache:clear && composer dump-autoload -o. Stale cached config or a stale autoloader is the most common cause of "it works in tinker but not in the app."extra.laravel.dont-discover, the provider will not register after the upgrade — register it manually in config/app.php."<vendor>/<package>": "1.0.*") so a rollback is a one-line composer change.How can I help you explore Laravel packages today?