Repository navigation
Leave PHPStan and Larastan out of the release PHAR - #25
Merged
Merged
Conversation
The PHAR bundles development packages because laravel-zero/framework is one, as Laravel Zero's Packagist instructions require. PHPStan, pulled in by Larastan, made up 69% of it. box.json now packs vendor/ without those two packages and rebuilds the autoloader, since PHPStan registers a bootstrap file that every start would otherwise load. The 0.3.0 PHAR shrinks from 45.9 MB to 14.5 MB; its command list, default screen and help output are identical to the unshrunk build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The release PHAR bundles every package in
vendor/, development tools included, because Laravel Zero's Packagist setup makeslaravel-zero/frameworka dev dependency and setsexclude-dev-filesto false. Larastan pulls in PHPStan, which made up 69% of the PHAR: 29.7 of 43.1 MB compressed.Changed
box.jsonpacksvendor/through a finder that leaves outphpstan/phpstanandlarastan/larastan.dump-autoloadis on, so Box rebuilds the autoloader without them; PHPStan'sbootstrap.phpwould otherwise be loaded on every start.RELEASING.mdsays why, so a large dev tool added later is left out too.Testing
Built from
mainat version 0.3.0: the PHAR is 14.5 MB instead of 45.9 MB, contains no PHPStan or Larastan files, and its autoloader no longer mentions PHPStan.list --raw, the default screen and the help forcallbacks:watch,payments:capture,merchants:accessandapiare identical to the current PHAR.merchants:list,api GET /pingandcallbacks:watchrun through to the network step.composer checkpasses.🤖 Generated with Claude Code