Platform package install fails with Composer 2.1 lock file
zero0n3 opened this issue · comments
Hello
I'm deploying an updated laravel 7 app on heroku but I get this in log:
-----> Building on the Heroku-18 stack
-----> Using buildpack: heroku/php
-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
! ERROR: Failed to install system packages!
!
! Your platform requirements (for runtimes and extensions) could
! not be resolved to an installable set of dependencies, or a
! platform package repository was unreachable.
!
! This usually means that you (or packages you are using) depend
! on a combination of PHP versions and/or extensions that are
! currently not available on Heroku.
!
! The following is the full output from the installation attempt:
!
! > Loading repositories with available runtimes and extensions
! > Updating dependencies
! > Your requirements could not be resolved to an installable set of packages.
! >
! > Problem 1
! > - The requested package composer-plugin-api could not be found in any version, there may be a typo in the package name.
! >
!
! For reference, the following runtimes are currently available:
!
! PHP: 8.0.6, 8.0.3, 8.0.2, 8.0.1, 8.0.0, 7.4.19, 7.4.16,
! 7.4.15, 7.4.14, 7.4.13, 7.4.12, 7.4.11, 7.4.10, 7.4.9,
! 7.4.8, 7.4.7, 7.4.6, 7.4.5, 7.4.4, 7.4.3, 7.4.2, 7.3.28,
! 7.3.27, 7.3.26, 7.3.25, 7.3.24, 7.3.23, 7.3.22, 7.3.21,
! 7.3.20, 7.3.19, 7.3.18, 7.3.17, 7.3.16, 7.3.15, 7.3.14,
! 7.3.13, 7.2.34, 7.2.33, 7.2.32, 7.2.31, 7.2.30, 7.2.29,
! 7.2.28, 7.2.27, 7.2.26, 7.1.33
!
! Please verify that all requirements for runtime versions in
! 'composer.lock' are compatible with the list above, and ensure
! all required extensions are available for the desired runtimes.
!
! When choosing a PHP runtimes and extensions, please also ensure
! they are available on your app's stack (heroku-18), and select
! a different stack if needed after consulting the article below.
!
! For a list of supported runtimes & extensions on Heroku, please
! refer to: https://devcenter.heroku.com/articles/php-support
! Push rejected, failed to compile PHP app.
! Push failed
I tried to do composer require composer-plugin-api
but i still get error during deploy.
Any chance you could share a reproduce case? Are you using Composer 2.1 locally already?
(it's probably enough if you share your composer.json
, that should be sufficient to trigger it)
Okay I can reproduce it; it's due to the use of Composer 2.1. Investigating.
Just needs an update of Composer to 2.1. Fix coming today.
Sure (sorry for the lack of information before)
I slavishly followed the guide here: https://devcenter.heroku.com/articles/getting-started-with-laravel
i have composer updated to the latest stable version 2
i used php 8 (but even with 7 it does)
I created a simple laravel app (laravel new blog for example)
I created the git repo
I add and commit
created the procfile and committed
created heroku app
APP_KEY set
and when i go to push on heroku the laravel app i get the error above.
WOw you fast :-) Thanks
The issue is fixed for Composer 2.1.
However, it will fails again if your composer.lock file is generated with Composer 2.2.
Currently having the same issue using Composer 2.2.3