v2.3.0
I'm thrilled to release v2.3.0 of laravel-stats. 🎉
A quick overview of what has changed in this version.
- Support for Model Observers has been added. (#177, #128)
- A new
--share
option has been added (see below for more information) #178 - Support for Laravel 6 and PHPUnit 8 has been added back. (Was previously removed in v2.1.0)
New --share
option
v2.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.
What does this mean in detail?
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?"
What is being shared?
The request sent to the API contains:
- the project name you've defined (used internally as a unique identifier)
- a list of components and their statistical numbers in your projects. (e.g.
controllers_lloc_per_method
orphpunit_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