Repository navigation
Support PHP 8.5 (CI, docs, php-parser ^5.6) — proposed 2.1.0 - #91
Merged
Merged
Conversation
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
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.
Why
PHP 8.5.12 is the current PHP security release, and Archetype's CI only went up to 8.4.
What
nikic/php-parser^5.0→^5.6: Archetype parses withcreateForNewestSupportedVersion(), so the php-parser version decides which syntax it can read. 5.4 and 5.5 fail on 8.5 code (unexpected T_FINALonfinalpromoted properties). 5.6.0 is the first version that round-trips it, including|>and(void).Php85SyntaxTestloads, edits and renders a class that uses the pipe operator, a(void)cast, a final promoted property and#[\NoDiscard].Verified
php:8.5-cliDocker 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;).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:
🤖 Generated by t-1000 with Claude Code
https://claude.ai/code/session_01Rae8mwrqWEfCaUAbtmXZTp