Devilbox: Intergation of new PHP composer v.2.0

Created on 27 Oct 2020  路  4Comments  路  Source: cytopia/devilbox

ISSUE TYPE

  • Feature request

SUMMARY


Please integrate the new PHP Composer version:
see: https://blog.packagist.com/composer-2-0-is-now-available/

feature

Most helpful comment

A quick and easy solution for now (until the base devilbox images get updated) is to update to the latest version of composer in an autostart script.

Create the following file in your Devilbox installation dir's autostart directory- /path/to/Devilbox/autostart/update_composer.sh:

#! /bin/bash

/usr/local/bin/composer self-update

After that, do the usual devilbox container rm -f and restart:

$ cd /path/to/Devilbox/
$ docker-compose stop && docker-compose rm -f && docker-compose up -d httpd php mysql && ./shell.sh

Then verify your composer version:

composer --version

image

If it didnt work you may need to edit the composer update command in update_composer.sh to force version 2.x like so: /usr/local/bin/composer self-update --2

All 4 comments

Hi
By using composer in devilbox i get an error, do you have an idea please or it attached to the version of composer
image

I think that the devilbox couldn't connect to internet

@hielh Could you try to ping that address? or any other address for that matter?

And are you using composer v2? if not could you please make a separate issue for this problem?

A quick and easy solution for now (until the base devilbox images get updated) is to update to the latest version of composer in an autostart script.

Create the following file in your Devilbox installation dir's autostart directory- /path/to/Devilbox/autostart/update_composer.sh:

#! /bin/bash

/usr/local/bin/composer self-update

After that, do the usual devilbox container rm -f and restart:

$ cd /path/to/Devilbox/
$ docker-compose stop && docker-compose rm -f && docker-compose up -d httpd php mysql && ./shell.sh

Then verify your composer version:

composer --version

image

If it didnt work you may need to edit the composer update command in update_composer.sh to force version 2.x like so: /usr/local/bin/composer self-update --2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mwmichael picture mwmichael  路  3Comments

zack6849 picture zack6849  路  5Comments

Venorcis picture Venorcis  路  6Comments

RaffyeMemon picture RaffyeMemon  路  4Comments

folkevil picture folkevil  路  5Comments