oc-bootstrapper icon indicating copy to clipboard operation
oc-bootstrapper copied to clipboard

Composer 2 support

Open alxy opened this issue 3 years ago • 6 comments

Hi,

the bootstrapper unfortunately does not work with Composer 2, as it tries to install the 1.0 branch of october, which isn't compatible with this version.

Are there any plans to upgrade? maybe it even makes sense to let users chose which branch to install?

alxy avatar Dec 29 '20 16:12 alxy

Thinking about it, probably the most sensible solution would be to release a new major version (1.0.0) with support for a completely composer based installation.

I will try working on a PR.

alxy avatar Dec 30 '20 11:12 alxy

I'm having some trouble with the wget https://getcomposer.org/composer.phar command which downloads the latest version of composer (v2) by default and give me an error when running Running composer update. I have to modify my Envoy.blade.php files:

https://github.com/OFFLINE-GmbH/oc-bootstrapper/blob/e678abcbaaa3bc18591f137b8eb15de470588de3/templates/Envoy.blade.php#L27 add a line to force downgrade to v1

    php composer.phar install --no-interaction --no-dev --prefer-dist --ignore-platform-reqs
    php composer.phar self-update --1
    php ./vendor/bin/october install

https://github.com/OFFLINE-GmbH/oc-bootstrapper/blob/396d872febd55ba945ef069f3be035b6f3e7e122/templates/Envoy.blade.php#L40

        php composer.phar self-update --1

damsfx avatar Mar 23 '21 17:03 damsfx

I'm having some trouble with the wget https://getcomposer.org/composer.phar command which downloads the latest version of composer (v2) by default and give me an error when running Running composer update.

You can use this instead:

[ ! -f composer.phar ] && (curl -sS https://getcomposer.org/installer | php)

tobias-kuendig avatar Mar 24 '21 06:03 tobias-kuendig

This change is available as 0.9.3:

https://github.com/OFFLINE-GmbH/oc-bootstrapper/commit/50a88a3640e5e8d9b49d9ba26fabd380cbe75359

tobias-kuendig avatar Mar 24 '21 06:03 tobias-kuendig

@tobias-kuendig ,

When using (curl -sS https://getcomposer.org/installer | php) :

[user@server]$ (curl -sS https://getcomposer.org/installer | php)
All settings correct for using Composer
Downloading...

Composer (version 2.0.11) successfully installed

Still installing v2 as it is the stable channel.
I have to trick a little your line:

[ ! -f composer.phar ] && (curl -sS https://getcomposer.org/installer | php -- --1)

Result :

[user@server]$ (curl -sS https://getcomposer.org/installer | php -- --1)
All settings correct for using Composer
Downloading...

Composer (version 1.10.20) successfully installed

damsfx avatar Mar 25 '21 10:03 damsfx

Looks like they did change the installer script to use version 2 by default. Thanks for the heads up @damsfx, I did fix the template file.

tobias-kuendig avatar Mar 30 '21 05:03 tobias-kuendig