Conversation
## Summary slic now runs on PHP 8.5 without deprecation notices, and a PHPCompatibility check plus a wider CI matrix keep it that way. ## Why PHP 8.5 deprecates the backtick operator, `case` labels ending in a semicolon and `curl_close()`, all of which slic used. The new sniff also caught `slic_stacks_resolve_from_path()` reading its argument through `func_get_arg()`, which since PHP 7 returns the current value rather than the original, so the fallback for paths that do not exist was working with `false` instead of the path. `testVersion` is pinned to `8.2-8.5` rather than open-ended: the develop branch of PHPCompatibility already sniffs unreleased PHP 8.6 changes, which would fail CI for behavior that has not shipped. Raise the upper bound when a new PHP version lands. ## Testing - [ ] `composer compat` reports no errors or warnings - [ ] `vendor/bin/phpunit` passes on PHP 8.5, including the new `PhpDeprecationsTest`
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
dpanta94
commented
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make slic compatible with PHP 8.5, with a PHPCompatibility check in CI to keep it that way.
Ticket: none. This came out of the
main→3.0.0merge cleanup, not a tracked issue.What changed
PHP 8.5 deprecates the backtick operator,
caselabels ending in a semicolon andcurl_close(), all of which slic used, so every command printed deprecation notices. Those are replaced. The new sniff also caughtslic_stacks_resolve_from_path()reading its argument throughfunc_get_arg(), which since PHP 7 returns the current value rather than the original, so its fallback for paths that do not exist was working withfalse.composer compatruns PHPCompatibility (itsdevelopbranch, which is where the 8.5 sniffs live) withtestVersion 8.2-8.5. The upper bound is pinned becausedevelopalready sniffs unreleased 8.6 changes; raise it when a new PHP version ships. The test matrix now covers PHP 8.2 through 8.5 and runs the compat check on 8.5.Proof
Before, on PHP 8.5.10, any command:
After:
Covered by the new
PhpDeprecationsTest, which boots the CLI and fails on anyDeprecated:output. It was red before the fixes and green after. Thefunc_get_argfix has no test of its own.AI usage: Drafted with Claude Fable 5.1. I reviewed and tested every change — this is my work and I am accountable for it.