Skip to content

Require PHP 8.2 and make core tokenization types readonly#2

Merged
CodeWithKyrian merged 1 commit intomainfrom
chore/php-8-2-and-readonly-classes
Feb 4, 2026
Merged

Require PHP 8.2 and make core tokenization types readonly#2
CodeWithKyrian merged 1 commit intomainfrom
chore/php-8-2-and-readonly-classes

Conversation

@CodeWithKyrian
Copy link
Owner

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

  • Bump Composer constraint in composer.json from ^8.1 to ^8.2.
  • Update .github/workflows/tests.yml test matrix to run on 8.2, 8.3, and 8.4 (drop 8.1).
  • Refresh README highlight to state “Built for PHP 8.2+ with strict types, readonly classes, and clean interfaces.”

- 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).
@CodeWithKyrian CodeWithKyrian merged commit e7d79fe into main Feb 4, 2026
5 checks passed
@CodeWithKyrian CodeWithKyrian deleted the chore/php-8-2-and-readonly-classes branch February 4, 2026 11:07
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