Skip to content

Conversation

@rsanzante
Copy link
Member

@rsanzante rsanzante commented Dec 2, 2025

Description copied from dlopez-akalam#1

Recently, in the develop branch of phpcompatibility/php-compatibility has been removed the support for squizlabs/php_codesniffer v3.x in favor of v4.x. PHPCompatibility/PHPCompatibility@93ef2b8

That is incompatible with metadrop/grumphp-php-compatibility, and also incompatible with drupal/coder. However, the release 10.0.0-alpha2 of phpcompatibility/php-compatibility still declares the compatibility with squizlabs/php_codesniffer 3.x.
Considering the date of this commit 516059d and comparing it with the releases of https://github.com/PHPCompatibility/PHPCompatibility/tags I'm changing the constraint so metadrop/grumphp-php-compatibility can continue being installed

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to fix the version constraint for the phpcompatibility/php-compatibility package by replacing the unstable dev-develop branch reference with a specific version range constraint.

Key Changes:

  • Replace dev-develop with a version range >9.3.5 <10.0.0-alpha3 to pin to stable releases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

composer.json Outdated
"php": ">=7.0",
"phpro/grumphp": "*",
"phpcompatibility/php-compatibility": "dev-develop",
"phpcompatibility/php-compatibility": ">9.3.5 <10.0.0-alpha3",
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version constraint syntax is invalid. In Composer, multiple version constraints must be separated by a comma (,) for AND logic. The current syntax >9.3.5 <10.0.0-alpha3 will cause a parsing error.

Should be: ">9.3.5,<10.0.0-alpha3" (note the comma and quotes)

Alternatively, you could use the more common caret operator: "^9.3.5" which means >=9.3.5 <10.0.0

Suggested change
"phpcompatibility/php-compatibility": ">9.3.5 <10.0.0-alpha3",
"phpcompatibility/php-compatibility": ">9.3.5,<10.0.0-alpha3",

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From composer docs:
"You can define multiple ranges. Ranges separated by a space ( ) or comma (,) will be treated as a logical AND. A double pipe (||) will be treated as a logical OR. AND has higher precedence than OR."

Bold text added by me.
https://getcomposer.org/doc/articles/versions.md#version-range

@rsanzante rsanzante merged commit f00ced6 into Metadrop:master Dec 2, 2025
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.

2 participants