Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create bedrock fails #553

Closed
4 tasks done
strarsis opened this issue Oct 27, 2020 · 6 comments
Closed
4 tasks done

Create bedrock fails #553

strarsis opened this issue Oct 27, 2020 · 6 comments

Comments

@strarsis
Copy link

Description

Creating a new bedrock project using composer create fails because of conflicting dependency requirements in lockfile.

Steps to reproduce

  1. Install Composer 2.
  2. Create a new Bedrock project using composer create-project roots/bedrock

Expected behavior:
Normal creation of Bedrock project.

Actual behavior:

Creating a "roots/bedrock" project at "./bedrock"
Installing roots/bedrock (1.14.2)
  - Downloading roots/bedrock (1.14.2)
  - Installing roots/bedrock (1.14.2): Extracting archive
Created project in /home/build/src/bedrock
> php -r "copy('.env.example', '.env');"
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - roots/wordpress-core-installer is locked to version 1.1.0 and an update of this package was not requested.
    - roots/wordpress-core-installer 1.1.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - roots/wordpress-core-installer 1.1.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - roots/wordpress 5.5.1 requires roots/wordpress-core-installer >=1.0.0 -> satisfiable by roots/wordpress-core-installer[1.1.0].
    - roots/wordpress is locked to version 5.5.1 and an update of this package was not requested.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

Reproduces how often: Always.

Versions

Current master (https://github.com/roots/bedrock/tree/147a86732f677ea8e47f2aced2cb03ca55b6b0ae).

Additional information

It seems to be the composer lockfile, after deleting it from the created Bedrock project folder and invoking composer install, composer 2 installed all dependencies successfully.

@KevinBerkhof
Copy link

I'm having the same issues as mentioned above when using composer 2.
A new release (tag) is needed here since v1.14.2 doesn't contain the needed change: #552

@strarsis
Copy link
Author

@swalkinshaw
Copy link
Member

swalkinshaw commented Oct 29, 2020

Apologies for the delay. I've released 1.14.3 with this update: https://github.com/roots/bedrock/releases/tag/1.14.3

@MikeiLL
Copy link

MikeiLL commented Nov 10, 2020

I've hit this issue with a first deploy on Ubuntu 20. I see that there is commit which adds support for Composer 2. https://github.com/roots/bedrock/releases/tag/1.14.3, but from what I'm seeing the only change is to composer.lock. And also a change to the Changelog.

Would one of you please guide me as to how to implement this update locally? Should I be merging in the upstream 1.14.3 branch, expecting an update to Changelog and Composer.lock?

My understanding is that composer.lock wouldn't be edited directly.

Thanks.

@tangrufus
Copy link
Member

With composer v2, run $ composer update -W
It works for most of the cases.

If you have a very old composer.json, find out which packages are blocking the update.
Then, update composer.json's require at once (maybe require-dev as well), i.e: running $ composer require aaa/bbb xxx/yyy

@MikeiLL
Copy link

MikeiLL commented Nov 10, 2020

Thank you. What worked for me is to update composer to v2 locally: composer self-update --2

Then, also locally, run composer update -W.

Subsequent deploy works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants