Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 1, 2025

Composer: update to PHPCSDevCS 1.2.0

PHPCSDevCS now allows for PHPCS 4.0 and includes PHPCompatibility 10.0.0-alpha1 and a range of sniffs from PHPCSExtra.

This also means that we can now scan files without a file extension (if explicitly requested), so the bin script can now be scanned.

Includes minor documentation update in the ruleset.
Includes adding one selective exclusion to the ruleset.
Includes various small CS fixes.

Refs:

GH Actions: run CS check against PHPCS 4.x dev

Dependabot: remove composer ecosystem

Dependabot has basically never submitted any useful PRs updating the dependencies managed via Composer.

In most cases, it wouldn't be able to anyway as the "widen" strategy only really causes update PRs when a new major of a dependency is released and with a new major of a dependency, we'll generally need to do a managed update, so wouldn't be able to use the Dependabot PR anyhow.

On top of that, it appears to be completely impossible to set any environment variables for the running of Dependabot via GH Actions.

This is problematic as we will have a circular dependency via the phpcsstandards/phpcsdevcs package once this update to PHPCSDevCS 1.2.0 would be merged and the only way to get round that is to set a COMPOSER_ROOT_VERSION environment variable.

In practice, this means that updating to PHPCSDevCS 1.2.0 will cause the action runs for Dependabot to fail, which is not useful.

All in all, I see no upside to continue to have Dependabot enabled for the Composer packages.

jrfnl added 2 commits November 1, 2025 04:50
PHPCSDevCS now allows for PHPCS 4.0 and includes PHPCompatibility 10.0.0-alpha1 and a range of sniffs from PHPCSExtra.

This also means that we can now scan files without a file extension (if explicitly requested), so the `bin` script can now be scanned.

Includes minor documentation update in the ruleset.
Includes adding one selective exclusion to the ruleset.
Includes various small CS fixes.

Refs:
* https://github.com/PHPCSStandards/PHPCSDevCS/releases/tag/1.2.0
* squizlabs/PHP_CodeSniffer 2916
* PHPCSStandards/PHP_CodeSniffer 1022
@jrfnl jrfnl added this to the 10.0.0-alpha2 milestone Nov 1, 2025
@jrfnl jrfnl requested a review from wimg November 1, 2025 04:11
Dependabot has basically _never_ submitted any useful PRs updating the dependencies managed via Composer.

In most cases, it wouldn't be able to anyway as the "widen" strategy only really causes update PRs when a new major of a dependency is released and with a new major of a dependency, we'll generally need to do a managed update, so wouldn't be able to use the Dependabot PR anyhow.

On top of that, it appears to be completely impossible to set any environment variables for the running of Dependabot via GH Actions.

This is problematic as we have a circular dependency via the `phpcsstandards/phpcsdevcs` package since the update to PHPCSDevCS 1.2.0 and the only way to get round that is to set a `COMPOSER_ROOT_VERSION` environment variable.

In practice, this means that since the update to PHPCSDevCS 1.2.0, the action runs for Dependabot are failing, which is not useful.

All in all, I see no upside to continue to have Dependabot enabled for the Composer packages.
@wimg wimg merged commit 376ce42 into develop Nov 24, 2025
77 checks passed
@wimg wimg deleted the feature/devcs-compatible branch November 24, 2025 19:58
@github-actions github-actions bot removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants