djoos-cookbooks / composer

Repository for composer cookbook
http://community.opscode.com/cookbooks/composer
MIT License
27 stars 38 forks source link

Composer installs unstable version #79

Closed axl89 closed 4 years ago

axl89 commented 4 years ago

With the default attribute:

default['composer']['url'] = 'http://getcomposer.org/composer.phar'

It's downloading the 2.0-dev version of composer:

axel@ryzen:/tmp$ curl -s http://getcomposer.org/composer.phar -o composer.phar
axel@ryzen:/tmp$ php composer.phar --version
Composer version 2.0-dev (2.0-dev+8b0da77a1d5173f65b026d7475a1526bc29df939) 2020-04-09 08:48:48

I think having an unstable version of composer by default should not be the default behavior, so I suggest the attribute to be changed to:

default['composer']['url'] = 'https://getcomposer.org/composer-stable.phar
caryp commented 4 years ago

I hit this today also.

aashley commented 4 years ago

Yeah this was caused by the composer project they changed composer.phar from being the stable build to being a dev snapshot. They don't feel its a BC break because they don't support downloading directly and suggest everyone uses their install script.

djoos commented 4 years ago

Hi all, thanks for opening this issue!

@aashley is right, this didn't use to be a dev composer build at that endpoint...

Solution? Ad hoc, I'd suggest using a wrapper cookbook (for anyone running into the issue right now) and re-pointing to the stable endpoint. A proper fix will go out when I have a moment to make the (tiny) change...

Hope this helps!

caryp commented 4 years ago

@djoos would you accept a PR to change this?

djoos commented 4 years ago

Hi @caryp,

Thanks for the offer!

I've actually shipped it out in v2.7.0 - however, my "fixes #79" didn't seem to have kicked in, apologies for it hence not referencing the commit (f14c0fa50e9359edf42254c062c9a8b3f0dfac90) here...

Kind regards, David