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

Use composer 2 in the php-7.4 image for faster installation times #25

Closed
Aimless321 opened this issue Mar 25, 2021 · 5 comments
Closed

Comments

@Aimless321
Copy link

Since Magento 2.4 is the only Magento version that is compatible with php 7.4, I think it would be possible to switch the composer version for the php 7.4 image to version 2 without breaking backwards compatibility.

This would speedup the installation of Magento and additional packages significantly, and thus make the action a lot faster.

Please let me know what you think, and if necessary I can make a PR.

@fooman
Copy link
Contributor

fooman commented Mar 25, 2021

hi @Aimless321 thanks for the suggestion. Composer 2.0 is only possible from Magento 2.4.2 so we would still have the 2.4.1 and 2.4.0 versions on php 7.4.

I believe projects like warden essentially now include both versions which may be something we can follow and then decide and runtime which phar to use.

@Aimless321
Copy link
Author

Ah that's unfortunate, I wasn't aware of that.

It would be great if it could be specified with an input, but i'm not sure how difficult that would be to implement.

@jissereitsma
Copy link
Contributor

Indeed, a variable COMPOSER_VERSION would be awesome, so that you can determine yourself what to use. The current composer integration is made possible by copying (COPY) composer into the Docker file. To my understanding, this approach will not allow for the switching part. Instead, either a different Docker image needs to be used, or the composer download needs to be picked up by the entrypoint script ...

@kolaente
Copy link
Contributor

kolaente commented Oct 6, 2021

@jissereitsma Another possible way is to put both composer 1 and 2 in the same image and make them available as /usr/local/bin/composer1 and /usr/local/bin/composer2. Then the script could decide whether to run composer1 or composer2 based on configuration.

@jissereitsma
Copy link
Contributor

I'm closing this ticket because the mentioned functionality is now merged.

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

No branches or pull requests

4 participants