Skip to content

Reduce built PHAR size by >70% - #172

Closed
mpociot wants to merge 1 commit into
laravel:mainfrom
mpociot:update-release-script
Closed

Reduce built PHAR size by >70%#172
mpociot wants to merge 1 commit into
laravel:mainfrom
mpociot:update-release-script

Conversation

@mpociot

@mpociot mpociot commented Jun 29, 2026

Copy link
Copy Markdown

Hey,

while working on something Cloud related for Herd, I noticed that the official CLI is pretty big (33.4 MB).
This comes from the fact that all dev dependencies are getting bundled into the PHAR (so pint, phpstan, pest, ...).

I modified the composer.json so that dev dependencies are now properly marked as dev dependencies and updated the release shell script to run a composer install --no-dev before building a new PHAR file.

This results in a CLI that is only 9.4 MB ✨

@joetannenbaum

Copy link
Copy Markdown
Collaborator

Thanks man! I ended up going with a different strategy (#180), as this one reverts the intent of #144. But thank you for the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants