jordanmiguel/laravel-popular
Laravel Popular is a lightweight package for tracking and retrieving popular Eloquent models. Record visits with a simple trait, then query top items by day, week, month, or custom timeframes for trending content, dashboards, and recommendations. It keeps integration simple and works with your exist...
Version 1.0.10 is the first release in this line to declare Laravel 9 support, so the very first thing to confirm is the Composer constraint — run composer why-not vendor/package 1.0.10 against your app before installing. If you are on Laravel 9 you will also be on PHP 8.0+, which is the real gate for this release; if you are still on Laravel 8 the upgrade is a no-op and you can stay on 1.0.9 until you migrate.
Minimal install:
composer require vendor/package:^1.0.10
Then look in this order:
composer.json of the package — check illuminate/support and php constraints. Laravel 9 support almost always means the constraint moved to ^8.0|^9.0, and it tells you whether Laravel 10 is already allowed or will need another release.extra.laravel.providers) or must be registered manually in config/app.php. Laravel 9 dropped the old $defer boolean in favour of DeferrableProvider, so a package that was not updated may still register a legacy deferred provider.config/ in the package — php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider" --tag=config is almost always step one after install.First use case: get the package's default behaviour working with zero configuration before touching any config file. Instantiate it through the container (app(Package::class) or its facade) inside php artisan tinker and confirm the binding resolves. If it resolves and the default path works, the Laravel 9 upgrade is almost certainly clean — the failure modes in a framework major bump are in service provider registration and container bindings, not in business logic.
Bind through the container, never new. Laravel 9 tightened some container and reflection behaviour; packages that were only ever tested on L8 sometimes resolve differently when constructed directly. Always resolve via the container or a facade so the package's own bindings and config merging apply.
Keep the config published and version-controlled. Publish the config once into config/ and commit it. Because config merging (mergeConfigFrom) only applies to keys you have not published, a published config silently masks new defaults added in later releases. Diff the package's config/*.php against yours on every upgrade.
Wrap it behind your own abstraction if it touches more than one place. This is the pattern that pays off at the next framework bump: a thin repository/service class or a small interface bound in your own service provider means a future Laravel 10 compatibility release is a one-file change rather than a grep across the codebase.
Test against the matrix, not just your app. Package-level regressions surface fastest with orchestra/testbench. If you are consuming this package in a larger app, at minimum add an integration test that boots the provider and asserts the binding resolves — that is the test that catches "works on L8, broken on L9" class of bugs.
Queue and command integration. If the package ships jobs, commands, or scheduled tasks, verify them explicitly after upgrading. Laravel 9 changed the default queue driver behaviour and the signature of several console methods; a package that was patched only for the framework constraint may still emit deprecation notices on php artisan boot.
CI pinning. Add ^9.0 to a dedicated CI job alongside your existing ^8.0 job rather than replacing it. This gives you a signal on the next release without gambling your main branch.
1.0.10 is a patch bump, so treat it as API-compatible — but "adds Laravel 9 support" packages are frequently released with the constraint widened and nothing else changed. If you hit an incompatibility, read the diff rather than the changelog; the changelog line is often the entire change.composer update reports a conflict, it is usually a second package still pinned to illuminate/*: ^8.0, not this one. Use composer why-not laravel/framework ^9.0 to find the actual blocker.composer show --tree after installing.php artisan package:discover (or composer dump-autoload) — a stale bootstrap/cache/packages.php is the single most common cause of "provider not found" after a framework upgrade.E_ALL and watch the deprecation log on first boot. Laravel 9 surfaces deprecations from packages that were constraint-patched but not code-patched; they will become hard failures at the next major.Alias::method() but the README was written for L8, confirm the alias is registered in extra.laravel.aliases. In L9, an unregistered alias fails at call time, not at boot, so it slips past smoke tests.^1.0.10 now, but subscribe to the repo's releases — a package that only just added L9 support is likely to need a follow-up for L10, and you want that on your radar before your own framework upgrade.How can I help you explore Laravel packages today?