Skip to content

Conversation

@htuscher
Copy link
Member

No description provided.

@wollanup
Copy link

Hi,
Since this change, I have to

RUN composer2 --version

instead of a standard

RUN composer --version

=> /bin/sh: 1: composer: not found

Does it sounds acceptable for you ? Shouldn't we use composer 2.x by default with composer command and provide a compatibility layer with composer1 command ?
Or maybe I missed something :)

@htuscher
Copy link
Member Author

composer 2.x is the default but the symlink is generated during the start of the container (entrypoint).

Therefore if you use the images as a base for building your own, please use RUN composer1 or RUN composer2.
Or if you want to enforce a version, you can do RUN cp /usr/local/bin/composer2 /usr/local/bin/composer && composer install

@ChrisB9
Copy link
Contributor

ChrisB9 commented Oct 27, 2020

@calebfavor The issue with your suggestion is, that the ENV is only accessible on start and not on build.

I think, there needs to be a default composer version, aka composer 2.0 as composer and then the entrypoint replaces (maybe overrides with an alias?) the composer version, if the ENV === 1.

@wollanup
Copy link

wollanup commented Oct 27, 2020

@hhoechtl no big deal for me to cp or simlink composer2 to composer, but I think this gonna break a lot of CI and builds out there, starting here #375 ...
Agree to have a default composer working command, 2.x should work for many of us.
Getting an error with a composer install on build was a really strange experience this morning 🤔

@htuscher
Copy link
Member Author

Fixed with 40305a2

@calebfavor
Copy link

I was able to upgrade to composer v2 and everything is working great after that commit. Thanks so much @hhoechtl

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.

5 participants