Require PHP 8.2 and make core tokenization types readonly#2
Merged
CodeWithKyrian merged 1 commit intomainfrom Feb 4, 2026
Merged
Require PHP 8.2 and make core tokenization types readonly#2CodeWithKyrian merged 1 commit intomainfrom
CodeWithKyrian merged 1 commit intomainfrom
Conversation
- Bump composer PHP constraint from ^8.1 to ^8.2 - Update GitHub Actions matrix to drop PHP 8.1 (test on 8.2, 8.3, 8.4) - Update README to state "Built for PHP 8.2+" - Mark Encoding, AddedToken, and Tokenizer as readonly classes BREAKING CHANGE: - Minimum supported PHP version is now 8.2 (projects on 8.1 must upgrade).
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.
This PR updates the platform baseline to PHP 8.2 and tightens the immutability guarantees of core tokenization types.
Motivation
Dropping 8.1 simplifies future language-level features and keeps the library aligned with current ecosystem baselines.
Changes
composer.jsonfrom^8.1to^8.2..github/workflows/tests.ymltest matrix to run on8.2,8.3, and8.4(drop8.1).