w0rd-driven / docker-laravel-deployer

Docker image build for use with Laravel 5.x, including deployer
MIT License
2 stars 2 forks source link

Upgrade composer to v2 for PHP 8.x #25

Closed w0rd-driven closed 2 years ago

w0rd-driven commented 2 years ago

Due to doctrine/dbal throwing the error below, we need to upgrade to Composer 2.

[10.0MiB/0.00s] You are using Composer 1 which is deprecated. You should upgrade to Composer 2, see https://blog.packagist.com/deprecating-composer-1-support/
[11.6MiB/0.01s] Loading composer repositories with package information
[11.9MiB/0.01s] Installing dependencies (including require-dev) from lock file
[13.2MiB/0.03s] Your requirements could not be resolved to an installable set of packages.
[13.2MiB/0.03s] 
  Problem 1
    - Installation request for doctrine/dbal 3.4.2 -> satisfiable by doctrine/dbal[3.4.2].
    - doctrine/dbal 3.4.2 requires composer-runtime-api ^2 -> no matching package found.
Potential causes:
 - This package is not installable via Composer 1.x, see <https://blog.packagist.com/deprecating-composer-1-support/>
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
[12.1MiB/0.03s] Memory usage: 12.07MiB (peak: 13.42MiB), time: 0.03s

It's pretty trivial to locally live with both versions and switch back and forth but this will likely require upgrading Forge servers in preparation. I'm fine with this since it's a major version lock for us and I'm big on semver even when it doesn't always make sense.