Skip to content

build!: require PHP 8.3 - #33

Merged
refsz merged 1 commit into
mainfrom
build/require-php-83
Aug 19, 2026
Merged

build!: require PHP 8.3#33
refsz merged 1 commit into
mainfrom
build/require-php-83

Conversation

@refsz

@refsz refsz commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Raises the minimum PHP version to 8.3. Mechanical only — no application code changes, so CI passing is the whole review.

Why now:

  • Sputnik forbids itself syntax its users already write. A typed class constant (private const array DEFAULT_SHELL) had to be reverted in EnvironmentDetector because they are 8.3+, while the reference project's own tasks use private const string and private const array freely.
  • PHP 8.2 reaches end of security support at the end of 2026, roughly four months out.
  • The audience is already past it: Drupal 11 requires 8.3, and the reference project runs 8.4.

What changed:

File Change
composer.json "php": "^8.3" and config.platform.php to 8.3.0
composer.lock refreshed via composer update --lock so composer install does not fail on a stale hash; no dependency versions moved
.github/workflows/ci.yml matrix drops 8.2; the four pinned jobs move to 8.3
.github/workflows/release.yml both pinned versions move to 8.3
docs/index.md, docs/installation.md the two places that state the requirement

Verified locally: composer validate clean, 742 tests passing, PHPStan [OK] No errors.

Follow-up in a separate PR, so this one stays mechanical: the 8.3 features that actually earn their place — the reverted typed constant, and #[Override] on the redacting decorators.

Correction to an earlier claim in this description: I wrote that TemplateRenderer::withFormatter() could become a real clone now. That is wrong, and I checked it rather than repeating it — 8.3 permits reinitialising a readonly property only inside __clone(), which cannot receive the new formatter as an argument. Outside __clone() the assignment still throws Cannot modify readonly property. The current new self(...) stays correct.

CLAUDE.md states PHP 8.2+; that file only exists in the unmerged #29, so the line is corrected there instead of here.

🤖 Generated with Claude Code

https://claude.ai/code/session_018CTvnzcNYmFgm2HQcm821A

PHP 8.2 reaches end of security support at the end of 2026, Drupal 11 already
requires 8.3, and the reference project runs 8.4 - so the audience is past 8.2
while Sputnik forbids itself syntax its users already write: typed class
constants had to be reverted in EnvironmentDetector because they are 8.3+.

Raises the constraint and the platform config, drops 8.2 from the test matrix,
moves the pinned jobs and the release build to 8.3, and updates the two places
the docs state the requirement.

BREAKING CHANGE: PHP 8.3 is now the minimum version.
@refsz
refsz merged commit abf8888 into main Aug 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant