Repository navigation
feat: support PHP 8.1 - #98
Merged
Merged
Conversation
ci: run the tests on PHP 8.1 and check the sources against Rector's PHP 8.1 downgrade sets The plugin's only runtime dependency, internal/path, already runs on PHP 8.1; the 8.2 floor came from readonly classes alone. Rector's DowngradeStandaloneNullTrueFalseReturnTypeRector is skipped: it widens a valid `T|false|null` to `T|bool|null`. Constants of the ZipFixtures test trait move to a ZipMode class, since trait constants need PHP 8.2 and the downgrade sets leave them in place. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Closed
Closed
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.
🔍 What was changed
require.phpis>=8.1, and readonly classes insrc/became classes with readonly properties (Rector's PHP 8.1 downgrade sets).tools/rectorholds the downgrade config;composer rectorand a new static-analysis job fail when syntax newer than PHP 8.1 slips intosrc/,bin/skillsor the bundled skill's scripts.php-internal/actions/downgraderesolves 8.1-compatible dependencies and downgrades the rest (testo, its plugins) together withtests/andtesto.php.Review notes
DowngradeStandaloneNullTrueFalseReturnTypeRectoris skipped: it rewrites a validT|false|nullintoT|bool|nulland drops the precise docblock, which breaks psalm.#[\Override]stays without a polyfill: the attribute is never instantiated through reflection, so PHP 8.1 and 8.2 ignore it.Checklist
cs:diffandrector --dry-runcleanphp -l; a throwaway project installs the plugin,skills:updatesyncs the bundled skill,skills:showandskills:validateexit 0