Skip to content

Support PHP 7.4 to 8.5 - #47

Merged
TomasVotruba merged 3 commits into
mainfrom
support-php-74
Sep 30, 2026
Merged

TomasVotruba merged 3 commits into
mainfrom
support-php-74

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Makes jack installable and runnable natively across PHP 7.4 to 8.5, so it can be required directly in projects on older PHP. Inspired by TomasVotruba/class-leak#91, now that entropy/entropy runs on 7.4.

Source backport (7.4 syntax, still valid up to 8.5)

  • readonly removed, constructor property promotion expanded to explicit typed properties
  • typed class constants (const string) moved to plain constants
  • new DateTimeImmutable(...)->diff(...) (PHP 8.4 chaining) split into two statements
  • named argument timeout: 120 on Process::fromShellCommandline() moved to positional
  • symfony/polyfill-php80 added for str_contains / str_starts_with

Distribution

  • composer.json php constraint lowered from >=8.4 to >=7.4
  • symfony/process widened to ^5.4 || ^6.4 || ^7.0 || ^8.1, so 7.4 resolves against Symfony 5.4 LTS
  • the Rector downgrade build pipeline is dropped, since the source now runs on 7.4 directly: removed downgraded_release.yaml, bare_run.yaml, build/, scoper.php, prefix-code.sh, full-tool-build.sh

Tests and CI

  • test suite moved to PHPUnit 9.6, the version that runs identically on 7.4 through 8.5; data providers switched from attributes to annotations
  • new Tests workflow: matrix 7.4, 8.2, 8.5 running PHPUnit and a CLI smoke run, plus a parallel-lint job on 7.4 and 8.5
  • analysis-only tools (PHPStan, ECS, Rector, symplify, swiss-knife, class-leak, dependency-analyser, tracy) are removed before install in the low-PHP jobs, as they require PHP 8.2+ and are not needed to run the tests
  • Rector config targets php74 so it keeps the source at 7.4 syntax

Existing Code Analysis workflow (PHPStan, ECS, Rector) stays on PHP 8.4.

PHPUnit, PHPStan, ECS, Rector and parallel-lint all pass locally.

@TomasVotruba
TomasVotruba merged commit c47b0ab into main Sep 30, 2026
15 checks passed
@TomasVotruba
TomasVotruba deleted the support-php-74 branch September 30, 2026 13:15
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