The original post: /r/php by /u/2019-01-03 on 2024-12-10 07:17:43.
Hi!
I have over 500 GB of PHP projects’ source code and I update the archive every week now.
When I first started in 2019, it took over 4 months for the first archive to be built.
In 2020, I created my most underused yet awesome packagist package: bettergist/concurrency-helper, which enables drop-dead simple multicore support for PHP apps. Then that took the process down to about 2-3 days.
In 2023 and 2024, I poured into the inner workings of git and improved it so much that now refreshing the archive is done in just under 4 hours and I have it running weekly on a cronjob.
Once a quarter, I run comprehensive analytics of the entire Packagist PHP code base:
- Package size
- Lines of Code
- Num of classes, fucntions, etc.
- Every phploc stat
- Highest phpstan levels supported
- Composer install is attempted on every single package for every PHP version they claim they support
- PHPUnit tests are run on 20,000 untested packages for full coverage every year.
- ALl of this is made possible by one of my more popular packages: phpexperts/dockerize, which has been tested on literally 100% of PHP Packagist projects and works on all but the most broken.
Here’s the top ten vendors with the most published packages over the last 5 years:
vendor | 2020-05 | 2021-12 | 2023-03 | 2024-02 | 2024-11
-----------------+---------+---------+---------+---------+---------
spryker | 691 | 930 | 1010 | 1164 | 1238
alibabacloud | 205 | 513 | 596 | 713 | 792
php-extended | 341 | 504 | 509 | 524 | 524
fond-of-spryker | 262 | 337 | 337 | 337 | 337
sunnysideup | 246 | 297 | 316 | 337 | 352
irestful | 331 | 331 | 331 | 331 | 331
spatie | 197 | 256 | 307 | 318 | 327
thelia | 216 | 249 | 259 | 273 | 286
symfony | | | | 272 | 290
magenxcommerce | | 270 | 270 | 270 |
heimrichhannot | 216 | 246 | 248 | |
silverstripe | 226 | 237 | | |
fond-of-oryx | | | | | 276
ride | 205 | 206 | | |
If there’s anything you want me to query in the database, I’ll post it here.
- code_quality: composer_failed, has_tests, phpstan_level
- code_stats: loc, loc_comment, loc_active, num_classes, num_methods, num_functions, avg_class_loc, avg_method_loc, cyclomatic_class, cyclomatic_function
- dependencies: dependency graph of every package.
- dead_packages: packages that are no longer reachable to you but in the archive (currently 18,995).
- licenses: Every license recorded in composer.json
- package_stats: disk_space, git_host (357640 github, 6570 gitlab, 6387 bitbucket, 2292 gitea, 2037 everyone else across 400 git hosts)
- packagist_stats: project_type, language, installs, dependents (core and dev), github_stars
- required_extensions
- supported_php_versions