Skip to content

Support PHP 7.4-8.5 - #153

Merged
TomasVotruba merged 3 commits into
mainfrom
php-74-support
Oct 1, 2026
Merged

TomasVotruba merged 3 commits into
mainfrom
php-74-support

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Make swiss-knife installable and runnable on PHP 7.4 through 8.5, following the same native-7.4 approach as rectorphp/jack#47 (no scoper/PHAR build).

Source

  • Downgraded src and bin to PHP 7.4 syntax (readonly to @readonly docblocks, typed class constants to plain constants, constructor promotion expanded, #[Override] removed, str_starts_with/str_contains rewritten, first-class callable rewritten). No new runtime dependency - all prod deps (entropy, nikic/php-parser) already support 7.4.
  • composer.json: php constraint lowered to >=7.4.

Tests

  • PHPUnit lowered to ^9.6 (runs the suite on the 8.4 analysis job); #[DataProvider] attributes converted to @dataProvider annotations; dropped the 10.x-only cacheDirectory from phpunit.xml.

CI

  • bare_run.yaml now runs on push/PR across PHP 7.4, 8.2 and 8.5: installs prod dependencies, lints every src/bin file on the target version, and smoke-runs the binary.
  • code_analysis.yaml keeps the full dev tooling on 8.4.

Closes the PHP 7.4-8.5 support work; the dependency floors were removed in #149, #150, #151, #152.

@TomasVotruba
TomasVotruba merged commit ac81a15 into main Oct 1, 2026
11 checks passed
@TomasVotruba
TomasVotruba deleted the php-74-support branch October 1, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant