NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #4991 most downloaded on Packagist
Get insights about your Laravel Project
Latest stable
v2.21.0
Last release 29 days ago
24 Oct 2026
Release timing varies
gaps range from 1 weeks to 9 months
Nearly every release is documented
notes for 59 of 59 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
61 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Bump actions/checkout from 3 to 7
Add Support for Symfony 8 (and Pest v5)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
## Added - Add Support for Laravel 13
Drop Support for Laravel 11 and PHP 8.2 and PHP 8.3
## Changed - Add Support for PHPUnit 12
## Added - Add Pest v4 Support
## Changed - Add Support for Laravel 12
Drop Support for Laravel Versions below 11 and below PHP 8.2
Sort Files when statistics is shown in Verbose Mode
Remove calls to getLaravelVersion() for versions no longer supported
## Added - Add Support for Laravel 11
## Added - Add Support for PHP 8.3
Fix Laravel 10 bug in stats list command.
Ignore Pest Files when finding and loading Classes
Switch to forked phploc package and add support for Laravel 10 / PHPUnit 10
## Changed - Add Support for PhpUnit 10
Drop Support for Laravel 7 & Laravel 8
## Added - Add Support for PHP 8.2
Fix Issue with Anonymous Database Migrations
Fix Issue with running stats with Laravel Sail and Swoole extension installed
stats with Laravel Sail and Swoole extension installed (#207)## Deprecated - Deprecate --share option
--share option (#205)Fix EventListenerClassifier and add EventSubscribers Test
## Added - Add Support for Laravel 9
Add Livewire Component classifier
## Added - Add Support for PHP 8.1 (#198) ## Removed - Drop Support for Laravel 6
Update config to exclude Swoole namespace when running stats command. (Fixes Issue when running stats in a Laravel Octane Application) #196
Swoole namespace when running stats command. (Fixes Issue when running stats in a Laravel Octane Application) #196Fix stats command when run in projects which is using Closure based Event Listeners in Models booted method. #193
stats command when run in projects which is using Closure based Event Listeners in Models booted method. #193### Added - Support for PHP 8 #187
Use latest version of stefanzweifel/laravel-stats-phploc (Remove deprecated sebastian/finder-facade dependency) #185, #184
Add Database Factory Classifier #183
I'm thrilled to release v2.3.0 of laravel-stats. 🎉
I'm thrilled to release v2.3.0 of laravel-stats. 🎉
A quick overview of what has changed in this version.
--share option has been added (see below for more information) #178--share optionv2.3.0 comes with a new --share-option for the stats-command.
By executing php artisan stats --share your project statistics are shared anonymously with the Laravel community.
Your statistics will be combined with other Laravel projects to provide metrics available on stats.laravelshift.com.
The stats command will never automatically share anything! Only when this option is used and you confirm the prompts will data be shared.
By executing php artisan stats --share you can opt-in to share the used components and its statistical numbers like "number of classes" and "lines of code per component" with the Laravel community on stats.laravelshift.com.
Jason McCreary, the creator of Shift, and I developed this feature from an idea we had 2 years ago after Jason gave his "Laravel by the Numbers" talk at Laracon US 2018.
Our goal is to collect and aggregate statistical data from Laravel projects and transform the raw data into an easy-to-read dashboard for the Laravel community.
We hope it to make it easier for you as a developer to make decisions when crafting your Laravel projects. For example: "How many projects use Blade Components?" or "How many projects have a Models folder?"
The request sent to the API contains:
controllers_lloc_per_method or phpunit_tests)Class names or code will never be shared. If you would like to see the exact payload which is sent to the API, you may use the --payload option. You may also use the --dry-run option to prevent sending a request to the API.
For example, the following command will simulate sharing your project stats with the API and output the data to that would be sent:
php artisan stats --share --payload --dry-run
Add Blade Components Classifier #169, #173
### Removed - Drop support for phpunit 8.0
phpunit 8.0Note: Due to underlying changes to the phploc-dependency, the numbers for "loc" and "lloc" in your project may change.
Note: Due to underlying changes to the phploc-dependency, the numbers for "loc" and "lloc" in your project may change.
Changed Version Contraints for phploc/phploc to support 6.0 #167
phploc/phploc to support 6.0 #167Add Laravel Nova Dashboard Classifier #158, #159
On the side of breaking changes, support for older PHP, Laravel and Lumen versions has been removed. Also checkout the "Upgrade Guide" below to see, i…
Almost 2 years after the first major release of stats I'm thrilled to release 2.0. 🎉
Under the hood a lot has changed: Many internal classes have been rewritten to pave the path for new cool features (more about them soon). Performance for bigger projects with more than 1000 classes has also been improved, by using more caches internally.
On the side of breaking changes, support for older PHP, Laravel and Lumen versions has been removed. Also checkout the "Upgrade Guide" below to see, if your apps works as intended with version 2.0.
One of the statistics stats shows you, is the ratio between application code and test code.
The previous versions had a naive approach of determining if a class belongs to the application or test code (If the class wasn't a test, it counted towards the application code).
In 2.0, each Component can now be explicitly be configured to count towards application or test code.
For example all Laravel Nova Classifiers (Actions, Filters, Lenses and Resources) have been configured to NOT count towards the application AND NOT towards the test code.
If you disagree with this decision, feel free to open an issue. Im open for discussions!
Previously, it was impossible to see which classes have been classified as "Others". Version 2.0 now supports a verbose option – triggered by adding -v or --verbose to the command call – which will list all recognized classes for a component.
Example output for a fresh Laravel 6.0 app:
php artisan stats --verbose
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
| Name | Classes | Methods | Methods/Class | LoC | LLoC | LLoC/Method |
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
| Middlewares | 7 | 2 | 0.29 | 146 | 26 | 13 |
| - App\Http\Middleware\VerifyCsrfToken | 0 | 0 | 24 | 4 | 0 |
| - App\Http\Middleware\RedirectIfAuthenticated | 1 | 1 | 26 | 5 | 5 |
| - App\Http\Middleware\TrimStrings | 0 | 0 | 18 | 3 | 0 |
| - App\Http\Middleware\Authenticate | 1 | 1 | 21 | 3 | 3 |
| - App\Http\Middleware\TrustProxies | 0 | 0 | 23 | 5 | 0 |
| - App\Http\Middleware\CheckForMaintenanceMode | 0 | 0 | 17 | 3 | 0 |
| - App\Http\Middleware\EncryptCookies | 0 | 0 | 17 | 3 | 0 |
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
| Migrations | 3 | 6 | 2 | 103 | 31 | 5.17 |
| - CreatePasswordResetsTable | 2 | 2 | 32 | 8 | 4 |
| - CreateUsersTable | 2 | 2 | 36 | 12 | 6 |
| - CreateFailedJobsTable | 2 | 2 | 35 | 11 | 5.5 |
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
| Models | 1 | 0 | 0 | 39 | 8 | 0 |
| - App\User | 0 | 0 | 39 | 8 | 0 |
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
| Seeders | 1 | 1 | 1 | 16 | 1 | 1 |
| - DatabaseSeeder | 1 | 1 | 16 | 1 | 1 |
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
| Service Providers | 5 | 9 | 1.8 | 186 | 28 | 3.11 |
| - App\Providers\AppServiceProvider | 2 | 2 | 28 | 2 | 1 |
| - App\Providers\AuthServiceProvider | 1 | 1 | 30 | 5 | 5 |
| - App\Providers\EventServiceProvider | 1 | 1 | 34 | 7 | 7 |
| - App\Providers\RouteServiceProvider | 4 | 4 | 73 | 9 | 2.25 |
| - App\Providers\BroadcastServiceProvider | 1 | 1 | 21 | 5 | 5 |
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
| PHPUnit Tests | 3 | 2 | 0.67 | 50 | 12 | 6 |
| - Tests\TestCase | 0 | 0 | 10 | 3 | 0 |
| - Tests\Unit\ExampleTest | 1 | 1 | 19 | 4 | 4 |
| - Tests\Feature\ExampleTest | 1 | 1 | 21 | 5 | 5 |
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
| Other | 9 | 11 | 1.22 | 410 | 61 | 5.55 |
| - App\Console\Kernel | 2 | 2 | 42 | 6 | 3 |
| - App\Exceptions\Handler | 2 | 2 | 51 | 7 | 3.5 |
| - App\Http\Controllers\Controller | 0 | 0 | 13 | 6 | 0 |
| - App\Http\Controllers\Auth\ForgotPasswordController | 1 | 1 | 32 | 5 | 5 |
| - App\Http\Controllers\Auth\LoginController | 1 | 1 | 39 | 6 | 6 |
| - App\Http\Controllers\Auth\ResetPasswordController | 1 | 1 | 39 | 6 | 6 |
| - App\Http\Controllers\Auth\RegisterController | 3 | 3 | 72 | 11 | 3.67 |
| - App\Http\Controllers\Auth\VerificationController | 1 | 1 | 41 | 8 | 8 |
| - App\Http\Kernel | 0 | 0 | 81 | 6 | 0 |
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
+----------------------------+----------------------------+---------+---------------+-----+------+-------------+
| Total | 29 | 31 | 1.07 | 950 | 167 | 5.39 |
+-------------------- Code LLoC: 155 • Test LLoC: 12 • Code/Test Ratio: 1:0.1 • Routes: 2 +------+-------------+
It's now possible to filter the output for certain components.
php artisan stats --components=Migrations,Models
+------------+---------+---------+---------------+-----+------+-------------+
| Name | Classes | Methods | Methods/Class | LoC | LLoC | LLoC/Method |
+------------+---------+---------+---------------+-----+------+-------------+
| Migrations | 3 | 6 | 2 | 103 | 31 | 5.17 |
| Models | 1 | 0 | 0 | 39 | 8 | 0 |
+------------+---------+---------+---------------+-----+------+-------------+
| Total | 29 | 31 | 1.07 | 950 | 167 | 5.39 |
+--- Code LLoC: 155 • Test LLoC: 12 • Code/Test Ratio: 1:0.1 • Routes: 2 ---+
Impact: All users, Effort: Low
Laravel 6.0 comes with a new tests/bootstrap.php file. If you have an existing app which has been updated to Laravel 6.0, add the file to the exclude-key in config/stats.php to improve the performance of artisan stats.
'exclude' => [
+ base_path('tests/bootstrap.php'),
// base_path('app/helpers.php'),
// base_path('app/Services'),
],
Impact: Moderate, Effort: Moderate
The Classifier-contract has been updated:
getName() method has been renamed to name().countsTowardsApplicationCode() has been added. The method must return a boolean and indicates, if the given component should count towards the application code. This piece of information is used in the calculation of the "Code to Test ratio".countsTowardsTests() has been added. The method must return a boolean and indicates, if the given component should count towards the test code. This piece of information is used in the calculation of the "Code to Test ratio".If you've defined your own Custom Components, you have to update your implementations to meet the new criterias.
Checkout the Release and Upgrade Guide for more.
Rename getName() to name() #147
Rename "LOC" to "LLOC" #148
Refactored Internal Classes #150
ComponentFinder to ClassesFinderClassifier-contract and update existing Classifiers to implement new contractAdd additional support to detect Route Middlewares #140
Fix compatibility issues with Lumen #139
- Display number of Routes #136
Add compatibility with PHP7.3 (please also run composer upgrade phploc/phploc)
composer upgrade phploc/phploc)Fixes an Issue where a thrown Exception stopped the stats command #134
stats command #134See our CHANGELOG for more details.
See our CHANGELOG for more details.
Add Support for Laravel Nova Components
See our CHANGELOG for more details.
See our CHANGELOG for more details.
See our CHANGELOG for more details.
composer.json to support Laravel 5.7 #125Prevent the Classifier-class from throwing Exceptions #122
Classifier-class from throwing Exceptions #122This release add support for Lumen. Thanks to @krenor for his PR
This release add support for Lumen. Thanks to @krenor for his PR (#121)
See our CHANGELOG for more details.
Changed Version Contraints for laravel/dusk to support ~2.0 and ~3.0
laravel/dusk to support ~2.0 and ~3.0See our CHANGELOG for more details.
See our CHANGELOG for more details.
composer.json to support Laravel 5.6This release adds 2 new features:
This release adds 2 new features:
The stats.php config file slightly changed for this release. I suggest you update your local version.
See our CHANGELOG for more details.
This release adds 2 new configuration options:
Enable tests-folder in config file by default (Previous issue with testsuite has been fixed in eaedc4)
tests-folder in config file by default (Previous issue with testsuite has been fixed in eaedc4)Update Sorting of output table (Components are sorted by name; Tests are always at the bottom)
Update Sorting so Tests are at the bottom of the output table #110
This release adds support to display the Code to Test ratio at the bottom of the summary table.
This release adds support to display the Code to Test ratio at the bottom of the summary table.
See our CHANGELOG for more details.
This release adds support to detect Event Listener.
This release adds support to detect Event Listener.
See our CHANGELOG for more details.
Fix an Issue with Test Classifiers if the dependency was not installed in a project 1b65909e
This release adds support to detect PHPUnit, Laravel Dusk and Laravel Browser Kit tests. If you upgrade from 1.0.0 you have to update your stats.php c
This release adds support to detect PHPUnit, Laravel Dusk and Laravel Browser Kit tests.
If you upgrade from 1.0.0 you have to update your stats.php config file:
'paths' => [
base_path('app'),
base_path('database'),
base_path('tests'), // <= Add this line to get insights about your tests
],
See our CHANGELOG for more details.
We now cover most of Laravels Core components. If you think something is missing or you have found a bug, please create a new issue.
🎉 v1.0.0 has been released.
We now cover most of Laravels Core components. If you think something is missing or you have found a bug, please create a new issue.
If you have been using the package before, you should delete and re-publish the config file.
Thanks for all the support and feedback. Special thanks to Jerguš Lejko and all contributors for their pull requests and feedback.
See our CHANGELOG for more details.
Nothing published for this version
One column per quarter.