Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated autoload optimization in the composer.json file #3088

Closed
wants to merge 1 commit into from
Closed

Integrated autoload optimization in the composer.json file #3088

wants to merge 1 commit into from

Conversation

fballiano
Copy link
Contributor

In #3081 @elidrissidev introduced an optimization of the autoloader, which is great, but it only affects the zip file that we release.

With this PR, enabling the optimization in the composer.json file, we should be able to enable it for everybody and all the workflows (probably speeding some of them a little bit).

What do you think about this idea?

Related Pull Requests

#3081

@github-actions github-actions bot added composer Relates to composer.json environment labels Mar 14, 2023
@elidrissidev
Copy link
Member

The reason why I didn't include it in composer.json is because that will make it always optimize the autoloader, and the Composer documentation says:

Note: You should not enable any of these optimizations in development as they all will cause various problems when adding/removing classes. The performance gains are not worth the trouble in a development setting.

@fballiano fballiano closed this Mar 15, 2023
@fballiano
Copy link
Contributor Author

fballiano commented Mar 15, 2023

but people that are extracting the zip on top of their projects are also developing and probably adding/removing classes so I don't know if we should have the optimize at all.

@fballiano fballiano deleted the better_composer_optimize branch March 15, 2023 09:09
@elidrissidev
Copy link
Member

I don't know honestly, if you think we should just recommend it in README but remove it from the release workflow then go ahead.

@fballiano
Copy link
Contributor Author

I don't know but it seems to me the use cases are the same so if we can't enable it by default... I'm not sure it should be in the released zipball.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
composer Relates to composer.json environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants