Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#51624 closed defect (bug) (fixed)

Composer 2.0 Support

Reported by: timothyblynjacobs's profile TimothyBlynJacobs Owned by: desrosj's profile desrosj
Milestone: 5.6 Priority: normal
Severity: normal Version: 5.6
Component: Build/Test Tools Keywords: has-patch commit
Focuses: coding-standards Cc:

Description

GitHub actions is now using Composer 2.0 which was released earlier today. It looks like that is causing test failures due to a dependency of ours that isn't compatible.

Error: Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - dealerdirect/phpcodesniffer-composer-installer is locked to version v0.6.2 and an update of this package was not requested.
    - dealerdirect/phpcodesniffer-composer-installer v0.6.2 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

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.

Discussing in Slack, @jrf points out it looks like this can be fixed by updating our dependency to allow a newer version which does support Composer 2.0.

Change History (18)

#2 @jrf
4 years ago

  • Focuses coding-standards added
  • Keywords commit added

Reviewed & this patch is ready to commit.

Context:
As this repo uses a committed composer.lock file, this updated is needed to get the newer version of the plugin, but even if there wouldn't be a committed composer.lock file, the composer.json would still have needed to be updated as Composer treats minors below 1.0 as majors, so updated need to be done explicitly.

Relevant changelog of the dependency: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/releases/tag/v0.7.0

Version 0, edited 4 years ago by jrf (next)

#3 @TimothyBlynJacobs
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 49306:

Build Tools: Fix running installing composer dependencies using composer 2.0.

This updates the dealerdirect/phpcodesniffer-composer-installer package to allow installing version 0.7.0 which supports composer 2.0.

Props itowhid06, jrf.
Fixes #51624.

TimothyBJacobs commented on PR #656:


4 years ago
#4

Fixed in 9eed4bc352c944ce75c3ff1615bc63b7162af88b.

This ticket was mentioned in Slack in #core by sergey. View the logs.


4 years ago

#6 @SergeyBiryukov
4 years ago

In 49313:

Build Tools: Fix running installing Composer dependencies using Composer 2.0.

This updates the dealerdirect/phpcodesniffer-composer-installer package to allow installing version 0.7.0 which supports Composer 2.0.

Props itowhid06, jrf.
Merges [49306] to the 5.5 branch.
See #51624.

#7 @SergeyBiryukov
4 years ago

In 49315:

Build Tools: Update mergeinfo for [49313].

See #51624.

#8 @SergeyBiryukov
4 years ago

In 49318:

Build Tools: Fix running installing Composer dependencies using Composer 2.0.

This updates the dealerdirect/phpcodesniffer-composer-installer package to allow installing version 0.7.0 which supports Composer 2.0.

Props itowhid06, jrf.
Merges [49306] to the 5.4 branch.
See #51624.

#9 @SergeyBiryukov
4 years ago

In 49319:

Build Tools: Fix running installing Composer dependencies using Composer 2.0.

This updates the dealerdirect/phpcodesniffer-composer-installer package to allow installing version 0.7.0 which supports Composer 2.0.

Props itowhid06, jrf.
Merges [49306] to the 5.3 branch.
See #51624.

#10 @SergeyBiryukov
4 years ago

It looks like WordPress 5.2 and older branches don't have any Travis jobs using Composer, so I guess they don't require any changes for now.

This ticket was mentioned in Slack in #core by sergey. View the logs.


4 years ago

This ticket was mentioned in Slack in #core by sergey. View the logs.


4 years ago

#13 @desrosj
4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

In working on #48301, I discovered that this will need to be backported to 5.1 & 5.2. Though Composer is not called directly, It is invoked by the travis:js task.

#14 @desrosj
4 years ago

  • Owner changed from TimothyBlynJacobs to desrosj
  • Status changed from reopened to assigned

#15 @desrosj
4 years ago

In 49514:

Build Tools: Fix running installing Composer dependencies using Composer 2.0.

This updates the dealerdirect/phpcodesniffer-composer-installer package to allow installing version 0.7.0 which supports Composer 2.0.

It also includes several minor spacing/alignment coding standards fixes that are made as a result of the package update.

Props itowhid06, jrf.
Merges [49306] to the 5.2 branch.
See #51624, #48301.

#16 @desrosj
4 years ago

In 49515:

Build Tools: One additional coding standards fix now detected after [49514].

See #51624, #48301.

#17 @desrosj
4 years ago

In 49516:

Build Tools: Fix running installing Composer dependencies using Composer 2.0.

This updates the dealerdirect/phpcodesniffer-composer-installer package to allow installing version 0.7.0 which supports Composer 2.0.

It also includes several minor spacing/alignment coding standards fixes that are made as a result of the package update.

Props itowhid06, jrf.
Merges [49306] to the 5.1 branch.
See #51624, #48301.

#18 @desrosj
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.