Skip to content

Allow composer/installers v2 - #6

Open
svandragt wants to merge 1 commit into
mainfrom
svandragt/widen-installers-constraint
Open

Allow composer/installers v2#6
svandragt wants to merge 1 commit into
mainfrom
svandragt/widen-installers-constraint

Conversation

@svandragt

Copy link
Copy Markdown

Allow composer/installers v2 alongside v1.

What changes

composer.json widens the constraint from ~1.0 to ^1.0 || ^2.0. The plugin uses composer/installers only to place itself in wp-content/plugins, which both major versions do the same way, so the pin to v1 buys nothing and costs the sites that install it.

composer/installers v1.12 emits a PHP 8.4 deprecation notice on every Composer command. A site cannot move to v2 while any package in its tree still requires v1, and this plugin is one of the packages holding wikimediafoundation.org back.

What this does not change

The lockfile keeps its current v1 entry, so nothing moves for anyone until they run an update. Its content hash is now stale against composer.json; composer install warns but still installs from the lock, and refreshing it is left out on purpose: composer update --lock also rewrites the PHP_CodeSniffer repository URL and some empty-array serialisation, churn from a newer Composer version that has nothing to do with this change.

Testing

composer install passes with the widened constraint. Only composer.json changes, so there is nothing for PHPCS to check.

🤖 Generated with Claude Code

https://claude.ai/code/session_016bJCbjM6ym1P1D4oHbFGYo

The plugin works with either major version, so pinning to `~1.0` blocks the
sites that install it. composer/installers v1.12 emits a PHP 8.4 deprecation
notice on every Composer command, and a site cannot move to v2 while any
package in the tree still requires v1.

The lockfile keeps its current v1 entry, so nothing changes for anyone until
they update.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bJCbjM6ym1P1D4oHbFGYo
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

Successfully merging this pull request may close these issues.

1 participant