Skip to content

Support PHP 8.5 (CI, docs, php-parser ^5.6) — proposed 2.1.0 - #91

Merged
ajthinking merged 1 commit into
masterfrom
worktree-php-8.5-support
Oct 27, 2026
Merged

ajthinking merged 1 commit into
masterfrom
worktree-php-8.5-support

Conversation

@ajthinking

Copy link
Copy Markdown
Owner

Why

PHP 8.5.12 is the current PHP security release, and Archetype's CI only went up to 8.4.

What

  • CI: PHP 8.5 added to the matrix with Laravel 12 (testbench 10) and Laravel 13 (testbench 11). Laravel 10 and 11 are EOL and never supported 8.5.
  • nikic/php-parser ^5.0 → ^5.6: Archetype parses with createForNewestSupportedVersion(), so the php-parser version decides which syntax it can read. 5.4 and 5.5 fail on 8.5 code (unexpected T_FINAL on final promoted properties). 5.6.0 is the first version that round-trips it, including |> and (void).
  • Test: Php85SyntaxTest loads, edits and renders a class that uses the pipe operator, a (void) cast, a final promoted property and #[\NoDiscard].
  • Docs: the README support table now reads PHP 8.1–8.5 / php-parser ^5.6, and the CHANGELOG has an Unreleased entry.

Verified

  • Full suite on PHP 8.5.12 (php:8.5-cli Docker image), L12 and L13: 164 passed (the same 1 risky and 4 incomplete as before).
  • src/ has none of the constructs 8.5 deprecates (non-canonical casts, backticks, __sleep/__wakeup, case x;).
  • No open Dependabot alerts or security advisories on the repo.

Proposed release: 2.1.0 (minor)

There are no API changes. A minor version fits because a dependency floor goes up. Not tagged.

Draft release notes:

2.1.0

  • PHP 8.5 support, tested in CI against Laravel 12 and 13.
  • Archetype can now load and edit files written in PHP 8.5 syntax (pipe operator, (void) casts, final promoted properties, new attributes).
  • Requires nikic/php-parser ^5.6 (was ^5.0). Composer upgrades it within 5.x, and nothing changes in your own code.

🤖 Generated by t-1000 with Claude Code

https://claude.ai/code/session_01Rae8mwrqWEfCaUAbtmXZTp

PHP 8.5.12 is the current security release, and CI only went up to 8.4.

- CI: add PHP 8.5 to the matrix against Laravel 12 (testbench 10) and
  Laravel 13 (testbench 11). Laravel 10/11 are EOL and never supported 8.5,
  so they are not included. The suite passes unmodified on 8.5.12 in Docker
  (php:8.5-cli) for both combinations: 164 passed, plus the same 1 risky and
  4 incomplete tests as before.
- composer.json: nikic/php-parser ^5.0 -> ^5.6. Archetype parses with
  createForNewestSupportedVersion(), so the parser version, not the host PHP,
  decides which syntax it can read. Tested in isolation: 5.4 and 5.5 reject
  8.5 code (`final` promoted properties give "unexpected T_FINAL"), and 5.6.0
  is the first version that parses and prints it, including `|>` and
  `(void)`. With dev tooling (Pest 3.8) installed, nothing below 5.7 resolves
  on 8.5 anyway.
- tests: Php85SyntaxTest loads a class that uses the pipe operator, a
  (void) cast, a final promoted property and #[\NoDiscard]/#[\Deprecated],
  renames it, adds a property, and checks that the 8.5 constructs survive
  rendering. It runs on every PHP version in the matrix, because parsing does
  not depend on the host.
- readme/CHANGELOG: the support table now says PHP 8.1–8.5 and php-parser
  ^5.6, plus an Unreleased entry.

src/ was scanned for constructs PHP 8.5 deprecates (non-canonical casts,
backticks, __sleep/__wakeup, `case x;`) and has none. There are no open
Dependabot alerts or security advisories on the repo.

Proposed version: 2.1.0 (minor). The public API does not change, but raising
a dependency floor deserves more than a patch.

Co-Authored-By: t-1000 (Claude Code) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rae8mwrqWEfCaUAbtmXZTp
@ajthinking
ajthinking merged commit 8f3be8e into master Oct 27, 2026
15 checks passed
@ajthinking
ajthinking deleted the worktree-php-8.5-support branch October 27, 2026 08:37
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