Packages play a big role in the Laravel scene. How big and which packages?
To find it out we took the data from the Packagist.org API and filtered out the
Laravel packages.
How did we identify the Laravel packages? By looking at
composer.json
. We
classified a package as belonging to the Laravel ecosystem if name
, description
, keywords
or type
fields contained the string laravel
.
We also considered it to be a Laravel package if it has laravel/framework
or any of the illuminate/*
subtree splits as a dependancy. And finally — the laravel
key in extra
field is also a trigger.
While these criteria do not guarantee a package to be Laravel-only, they do
show that the package was made with Laravel in mind.
The most popular packages
By naively looking at the list of the most downloaded
packages,
we see quite a bit of unexciting results — core packages and packages with a
plenty of uses outside Laravel projects.
| Package | Monthly downloads |
|-------------------------|-------------------|
| nesbot/carbon | 4084214 |
| laravel/framework | 2987907 |
| laravel/tinker | 2455355 |
| fideloper/proxy | 2376631 |
| nunomaduro/collision | 1510258 |
| intervention/image | 1099989 |
| facade/ignition | 966800 |
| facade/flare-client-php | 934651 |
| composer/installers | 803222 |
| illuminate/support | 756189 |
Perhaps a more interesting toplist would be one with these "false positives"
removed. We manually filtered out the top 30 packages that are made for Laravel
projects and are installed deliberately. We also loosely classified the purposes
of those packages.
| | Package | Monthly | Total | Purpose |
|----|------------------------------------|---------|----------|---------|
| 1 | maatwebsite/excel | 680466 | 17769696 | port |
| 2 | laravelcollective/html | 678048 | 21785383 | helper |
| 3 | barryvdh/laravel-ide-helper | 644297 | 18918427 | dev |
| 4 | barryvdh/laravel-debugbar | 625080 | 19404288 | dev |
| 5 | laravel/passport | 552633 | 10099903 | auth |
| 6 | beyondcode/laravel-dump-server | 530901 | 11035024 | dev |
| 7 | sentry/sentry-laravel | 455879 | 8440070 | integ |
| 8 | laravel/ui | 433850 | 1599042 | auth |
| 9 | barryvdh/laravel-cors | 400920 | 10823255 | helper |
| 10 | laravel/socialite | 394471 | 10166784 | auth |
| 11 | laravel/slack-notification-channel | 385921 | 7172937 | integ |
| 12 | tymon/jwt-auth | 359693 | 9107092 | auth |
| 13 | barryvdh/laravel-dompdf | 349572 | 8006731 | port |
| 14 | laravel/helpers | 337956 | 1692185 | helper |
| 15 | spatie/laravel-permission | 308453 | 5224001 | auth |
| 16 | laravel/horizon | 304864 | 4599598 | integ |
| 17 | laravel/dusk | 256261 | 4542482 | dev |
| 18 | laravel/nexmo-notification-channel | 238192 | 6080124 | integ |
| 19 | laravel/telescope | 227966 | 2289576 | dev |
| 20 | bugsnag/bugsnag-laravel | 223167 | 6544766 | dev |
| 21 | yajra/laravel-datatables-oracle | 212985 | 5644721 | integ |
| 22 | aws/aws-sdk-php-laravel | 212260 | 7070121 | integ |
| 23 | orchestra/testbench-core | 199780 | 1864659 | dev |
| 24 | orchestra/testbench | 195269 | 2279889 | dev |
| 25 | symplify/package-builder | 193661 | 1484783 | dev |
| 26 | laravel/scout | 177270 | 3391042 | integ |
| 27 | barryvdh/laravel-snappy | 156741 | 3651684 | port |
| 28 | webpatser/laravel-uuid | 153883 | 4774711 | helper |
| 29 | spatie/laravel-medialibrary | 149290 | 2293823 | helper |
| 30 | spatie/laravel-activitylog | 148932 | 2387978 | dev |
Explanation of purposes:
- auth — authentication and authorization
- dev — development and debugging tools
- helper — support and simplifaction of work
- integ — integration with other services
- port — import and/or export in various forma
The development tools are most prevalent on this list followed by integration.
We expeceted to see more of the Spatie packages at the very top, but it turns out that
maatwebsite/excel and the tools by Barry vd. Heuvel are more universally used.
Vendor overview
In total there were 47337 Laravel packages identified from 23167 different developers. The distribution is quite even with lots and lots of small players.
Half of packages (23668) were made by the top 3927 developers which is far more
than would be if Price's law was obeyed here. 15042 of the developers have only
one package published.
If we sort package developers by number of packages, we get to see some quite
unheard names. Here are the most prolific package developers along with the
download numbers summed over their packages.
| | Developer | Count | Daily | Monthly | Total |
|----|-------------------------------|-------|-------|---------|----------|
| 1 | socialiteproviders | 159 | 10645 | 256409 | 5826725 |
| 2 | bantenprov | 132 | 0 | 5 | 3160 |
| 3 | spatie | 124 | 89124 | 2746665 | 43095685 |
| 4 | railken | 119 | 0 | 11082 | 313129 |
| 5 | laravel-enso | 95 | 1519 | 29456 | 879635 |
| 6 | amethyst | 92 | 1232 | 8118 | 100819 |
| 7 | faustbrian | 85 | 152 | 2639 | 52698 |
| 8 | artisanry | 78 | 129 | 1190 | 11938 |
| 9 | sukohi | 75 | 58 | 1773 | 53805 |
| 10 | anomaly | 59 | 198 | 6095 | 974489 |
| 11 | sanatorium | 59 | 0 | 0 | 20 |
| 12 | laravel-notification-channels | 54 | 3107 | 99536 | 1621420 |
| 13 | hnhdigital-os | 54 | 38 | 1571 | 20304 |
| 14 | arcanedev | 53 | 3875 | 127702 | 3293360 |
| 15 | inetstudio | 53 | 241 | 3870 | 77009 |
| 16 | larakit | 49 | 1 | 410 | 18540 |
| 17 | orchestra | 48 | 21569 | 544696 | 7606461 |
| 18 | abuseio | 45 | 1 | 951 | 78289 |
| 19 | genealabs | 43 | 3219 | 87234 | 1215349 |
| 20 | smorken | 41 | 36 | 985 | 14277 |
Apparently there are quite a few developers who make a lot of components and
put them up without much advertisement. To see more of the better known names
and how they compare, let us sort the list by total downloads.
| | Developer | Count | Daily | Monthly | Total |
|----|-------------------|-------|--------|---------|-----------|
| 1 | laravel | 39 | 364375 | 9832728 | 225867755 |
| 2 | illuminate | 33 | 244509 | 7210832 | 197044965 |
| 3 | nesbot | 1 | 179106 | 4084214 | 112631927 |
| 4 | barryvdh | 19 | 82289 | 2246578 | 63115434 |
| 5 | spatie | 124 | 89124 | 2746665 | 43095685 |
| 6 | fideloper | 3 | 100748 | 2376631 | 41313378 |
| 7 | intervention | 7 | 46259 | 1260102 | 33891504 |
| 8 | composer | 1 | 10603 | 803222 | 26065561 |
| 9 | league | 7 | 18996 | 731742 | 24433630 |
| 10 | nunomaduro | 19 | 68333 | 1734552 | 23394056 |
| 11 | laravelcollective | 6 | 32460 | 710099 | 23285426 |
| 12 | maatwebsite | 6 | 27955 | 717140 | 18258360 |
| 13 | cocur | 1 | 19246 | 491761 | 16609476 |
| 14 | jenssegers | 15 | 24263 | 544700 | 16468485 |
| 15 | beyondcode | 29 | 14221 | 677724 | 12648233 |
| 16 | laracasts | 11 | 10352 | 317232 | 12119703 |
| 17 | graham-campbell | 36 | 11092 | 291114 | 10184667 |
| 18 | facade | 5 | 67794 | 1915933 | 9860242 |
| 19 | yajra | 19 | 17794 | 446360 | 9792222 |
| 20 | tymon | 2 | 11437 | 359693 | 9107116 |
If one sorts this list by monthly dowloads instead, the picture is slightly different.
| | Developer | Count | Daily | Monthly | Total |
|----|-------------------|-------|--------|---------|-----------|
| 1 | laravel | 39 | 364375 | 9832728 | 225867755 |
| 2 | illuminate | 33 | 244509 | 7210832 | 197044965 |
| 3 | nesbot | 1 | 179106 | 4084214 | 112631927 |
| 4 | spatie | 124 | 89124 | 2746665 | 43095685 |
| 5 | fideloper | 3 | 100748 | 2376631 | 41313378 |
| 6 | barryvdh | 19 | 82289 | 2246578 | 63115434 |
| 7 | facade | 5 | 67794 | 1915933 | 9860242 |
| 8 | nunomaduro | 19 | 68333 | 1734552 | 23394056 |
| 9 | intervention | 7 | 46259 | 1260102 | 33891504 |
| 10 | composer | 1 | 10603 | 803222 | 26065561 |
These distributions are extremely top heavy. Regardless if you order by daily,
monthly or total downloads, more than half of all downloads go to top 6 package
developers. For example, out of 5.65 million daily package downloads, 2.85 million
are split among laravel, illuminate, nesbot, spatie, fideloper and barryvdh.
We can use something a kin to Hirsch index to assess the depth of the scene.
There are only 317 developers that get 317 or more daily downloads. 1118 vendors
get 1118 or more monthly downloads and the same number is 3003 for total numbers.
Licensing choices
Our licensing overview is not very precise as various strings are used for the same
license, for example
gpl-3.0
, gpl 3.0
, gpl3
, gplv3
, even gnu general
public license version 3
and many more for the same license.
Luckily, the main conclusions are clear as the string
mit
is the license of
37502 Laravel packages. 6304 packages are unlicensed, More than 500
packages are licensed under each of Apache 2.0 and GPL 3.0. And there are also few hundred
packages with BSD 2, BSD 3 and GPL 2.0.
79% of Laravel packages are MIT-licensed, 14% are unlicensed and the other
licenses are each used in used in 2% of projects or less. This is probably in part
influenced by Laravel which itself is MIT licensed. Among all of the packages
the prevalence of the MIT license is considerably smaller — 60%.
Outside Laravel
The number of packages for different frameworks shows the involvment of the
community in the development of the framework tools and how much they are
willing to share their code with others. We also counted the abandoned packages
and their percentage to see which communities are thriving and which are limping.
| | Framework | Packages | Abandoned | Aband. % |
|----|---------------|----------|-----------|----------|
| 1 | Laravel | 47337 | 2618 | 5,5% |
| 2 | Symfony | 39428 | 3362 | 8,5% |
| 3 | Yii | 15354 | 552 | 3,6% |
| 4 | ZendFramework | 7459 | 790 | 10,6% |
| 5 | WordPress | 6446 | 480 | 7,4% |
| 6 | Nette | 3460 | 342 | 9,9% |
| 7 | CakePHP | 2607 | 173 | 6,6% |
| 8 | Slim | 1411 | 64 | 4,5% |
| 9 | Laminas | 811 | 17 | 2,0% |
| 10 | Phalcon | 726 | 40 | 5,5% |
| 11 | Codeigniter | 663 | 91 | 13,7% |
| 12 | Aura | 450 | 32 | 7,1% |
| 13 | Kohana | 341 | 43 | 12,6% |
| 14 | FuelPHP | 148 | 12 | 8,1% |
| 15 | PHPixie | 73 | 1 | 1,4% |
On the other hand, the total download numbers are reflective of how much the
packages are important in the development of everyday projects.
Please keep in mind that these download numbers represent all of the packages related to a framework not just the core. It’s just like the number of packages listed above. The criteria for classifying a package as belonging to certain framework are here. One package can belong to ecosystems of multiple frameworks.
| | Framework | Monthly | Total |
|----|---------------|-----------|------------|
| 1 | Symfony | 366029776 | 8945189030 |
| 2 | Laravel | 56523199 | 1315681505 |
| 3 | ZendFramework | 50789083 | 1460984224 |
| 4 | Nette | 14137793 | 295710951 |
| 5 | Laminas | 9540512 | 134960483 |
| 6 | Yii | 5662063 | 200378585 |
| 7 | CakePHP | 4067892 | 112091915 |
| 8 | WordPress | 3871828 | 96962490 |
| 9 | Slim | 2123558 | 46196613 |
| 10 | FuelPHP | 930846 | 32043126 |
| 11 | Codeigniter | 919926 | 30474042 |
| 12 | Kohana | 912106 | 31918403 |
| 13 | Aura | 467771 | 18063339 |
| 14 | Phalcon | 137762 | 4322810 |
| 15 | PHPixie | 5353 | 572100 |
It should be noted that the top position doesn't mean Symfony projects download
the most packages as some of the Symfony core is used by Laravel and many of the
Symfony packages can also be used in Laravel projects.
It is also noteworthy that Zend packages have almost as many monthly downloads
as Laravel even though the project is no longer maintained.
As a farewell we shall leave you with the list of most downloaded PHP packages overall.
| | Package | Monthly | Total |
|----|-----------------------------------|---------|-----------|
| 1 | symfony/polyfill-mbstring | 7943600 | 210645235 |
| 2 | psr/log | 7768451 | 238663129 |
| 3 | symfony/polyfill-ctype | 7284741 | 110601284 |
| 4 | psr/container | 6847606 | 119345271 |
| 5 | symfony/console | 6713344 | 199367074 |
| 6 | guzzlehttp/guzzle | 6607580 | 168514253 |
| 7 | symfony/finder | 6486878 | 176261290 |
| 8 | psr/http-message | 6384401 | 164860087 |
| 9 | guzzlehttp/promises | 6372505 | 149984782 |
| 10 | guzzlehttp/psr7 | 6350221 | 161806561 |
| 11 | doctrine/instantiator | 6199120 | 180684872 |
| 12 | symfony/process | 6167368 | 169254030 |
| 13 | phpdocumentor/reflection-docblock | 6140913 | 165150240 |
| 14 | monolog/monolog | 6109702 | 196673732 |
| 15 | symfony/event-dispatcher | 6098870 | 190433052 |
| 16 | webmozart/assert | 5905460 | 144395517 |
| 17 | doctrine/lexer | 5895066 | 157678399 |
| 18 | ralouphie/getallheaders | 5861396 | 66293788 |
| 19 | doctrine/inflector | 5743593 | 171588858 |
| 20 | phpdocumentor/type-resolver | 5706391 | 136101740 |
The data displayed in this article was compiled mainly by Gatis Ĺ Ĺ«pulnieks in April and
May of 2020 as a part of his thesis "Laravel package development and usage".
Relevant sources:
- Raw data https://github.com/Larzs/packagist-packages-data
- Related article by Jason McCreary https://jasonmccreary.me/articles/laravel-numbers/
- Author of this article Juris Evertovskis
- Compiler of data Gatis Ĺ Ĺ«pulnieks
- The package made by Gatis https://github.com/GlaivePro/Invytr
- Our newest micropackage https://github.com/crudly/encrypted
- Our silliest and most popular package: https://github.com/GlaivePro/Hidevara
Previously published at https://medium.com/@juris_9772/laravel-package-ecosystem-4afd53fad192