From 316e821d96ebfa7e9be1cc91769d4a1109e74fce Mon Sep 17 00:00:00 2001 From: Moamen Eltouny Date: Tue, 1 Dec 2026 17:02:43 +0200 Subject: [PATCH 1/2] build: require PHP 8.6 and move to Pest 5, PHPUnit 13 and PHPStan 2.2.15 Pest 4 cannot install on PHP 8.6, so the line uses Pest ^5.3.4 with the PHPUnit ^13.4.5 floor it requires, PHPStan ^2.2.15 (earlier releases reject phpVersion 80600) and Pint ^1.30.6 (earlier releases print PHP 8.6 deprecations). --- composer.json | 10 +++++----- phpstan.neon.dist | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index ace1f74..bb5d444 100644 --- a/composer.json +++ b/composer.json @@ -27,13 +27,13 @@ "security": "https://github.com/Pharaonic/php-smart-enum/security/policy" }, "require": { - "php": ">=8.5 <8.6" + "php": ">=8.6 <8.7" }, "require-dev": { - "laravel/pint": "^1.20", - "pestphp/pest": "^4.0", - "phpstan/phpstan": "^2.2", - "phpunit/phpunit": "^12.5.8" + "laravel/pint": "^1.30.6", + "pestphp/pest": "^5.3.4", + "phpstan/phpstan": "^2.2.15", + "phpunit/phpunit": "^13.4.5" }, "autoload": { "psr-4": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 5343541..71a4c3a 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,6 +1,6 @@ parameters: level: max - phpVersion: 80500 + phpVersion: 80600 paths: - src # The trait is only analysed where an enum uses it. From 1d1f42bc92fed8a27f03b0e3448f04b747c3fda7 Mon Sep 17 00:00:00 2001 From: Moamen Eltouny Date: Tue, 1 Dec 2026 17:02:46 +0200 Subject: [PATCH 2/2] docs: document the 8.6.x release line --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- CHANGELOG.md | 7 ++++++- MAINTAINING.md | 2 +- README.md | 4 ++-- docs/sections/02-installation.md | 2 +- docs/sections/11-troubleshooting.md | 2 +- docs/sections/12-upgrade-guide.md | 8 ++++---- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index eb18b4f..b0ce610 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -9,14 +9,14 @@ body: id: package-version attributes: label: Package version - placeholder: '8.5.1' + placeholder: '8.6.0' validations: required: true - type: input id: php-version attributes: label: PHP version - placeholder: '8.5' + placeholder: '8.6' validations: required: true - type: textarea diff --git a/CHANGELOG.md b/CHANGELOG.md index e04e21e..d6eef0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,15 @@ All notable changes to this project will be documented in this file. -## 8.5.2 - Unreleased +## 8.6.0 - Unreleased + +The `8.6.x` line targets PHP 8.6. Behavior is identical to the `8.5.x` line. ### Changed +- **Requires PHP `>=8.6 <8.7`.** Use the `8.5.x` line on PHP 8.5. +- PHPStan analyses against PHP 8.6. +- Development tooling moves to Pest 5 and PHPUnit 13, since Pest 4 cannot install on PHP 8.6. - The documentation has an upgrade guide, and the README shows installation and a usage example. - Tests run on Pest and the code style is checked by Pint; CI runs validation, style, static analysis, tests, the security audit and an archive check in order, behind one quality gate. diff --git a/MAINTAINING.md b/MAINTAINING.md index d60a06f..23a6fea 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -32,7 +32,7 @@ There is no `8.0.x`: native enums arrived in PHP 8.1. `develop` follows the newe ## Branch notes -Tooling follows each line's PHP. `8.5.x` uses Pest 4 on PHPUnit 12.5 and Pint's `per` preset. PHPStan analyses `src/` and `tests/Fixtures/`, because the trait is only analysed where an enum uses it. +Tooling follows each line's PHP. `8.6.x` uses Pest 5 on PHPUnit 13.4 and Pint's `per` preset. PHPStan analyses `src/` and `tests/Fixtures/`, because the trait is only analysed where an enum uses it. ## Documentation diff --git a/README.md b/README.md index 35a6428..4f34162 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@

- PHP Version : 8.5 + PHP Version : 8.6 License - Build + Build
Source Packagist Version diff --git a/docs/sections/02-installation.md b/docs/sections/02-installation.md index 75adba6..36efda3 100644 --- a/docs/sections/02-installation.md +++ b/docs/sections/02-installation.md @@ -4,7 +4,7 @@ Install the package with Composer. There is nothing to register or configure. ### Requirements -- PHP 8.5 (`>=8.5 <8.6`) +- PHP 8.6 (`>=8.6 <8.7`) - No runtime dependencies ### Composer Installation diff --git a/docs/sections/11-troubleshooting.md b/docs/sections/11-troubleshooting.md index 950c32d..7978d92 100644 --- a/docs/sections/11-troubleshooting.md +++ b/docs/sections/11-troubleshooting.md @@ -45,4 +45,4 @@ enum Status: string ### Composer refuses to install the package -This release line requires PHP 8.5 (`>=8.5 <8.6`). Each PHP minor from 8.1 has its own release line, and Composer installs the one that matches your PHP; 8.1 is the version that introduced native enums. Check `php -v` and the `config.platform.php` setting in your `composer.json`. +This release line requires PHP 8.6 (`>=8.6 <8.7`). Each PHP minor from 8.1 has its own release line, and Composer installs the one that matches your PHP; 8.1 is the version that introduced native enums. Check `php -v` and the `config.platform.php` setting in your `composer.json`. diff --git a/docs/sections/12-upgrade-guide.md b/docs/sections/12-upgrade-guide.md index 0fa57e6..fdb63d6 100644 --- a/docs/sections/12-upgrade-guide.md +++ b/docs/sections/12-upgrade-guide.md @@ -1,10 +1,10 @@ ## Upgrade Guide -Smart Enum has one release line per PHP version, and every line has the same trait, methods and results. This page covers the `8.5.x` line, for PHP 8.5. +Smart Enum has one release line per PHP version, and every line has the same trait, methods and results. This page covers the `8.6.x` line, for PHP 8.6. ### Patch Releases -Patch releases such as `8.5.0` to `8.5.1` never break your code. Update with: +Patch releases such as `8.6.0` to `8.6.1` never break your code. Update with: ```bash no-line-numbers composer update pharaonic/php-smart-enum @@ -16,8 +16,8 @@ Results change only to fix a bug, and every such change is listed in the changel No code changes are needed. Composer picks the line that matches your PHP version, so after upgrading PHP run `composer update pharaonic/php-smart-enum`. -The constraint that `composer require` writes (for example `^8.5`) already allows the newer lines. If you pinned a line with a tilde constraint such as `~8.5.0`, widen it first, or Composer stays on `8.5.x` and cannot install on the new PHP version. +The constraint that `composer require` writes (for example `^8.6`) already allows the newer lines. If you pinned a line with a tilde constraint such as `~8.6.0`, widen it first, or Composer stays on `8.6.x` and cannot install on the new PHP version. ### Changelog -Every release is listed in the [changelog](https://github.com/Pharaonic/php-smart-enum/blob/8.5.x/CHANGELOG.md) and on the [GitHub releases](https://github.com/Pharaonic/php-smart-enum/releases) page. +Every release is listed in the [changelog](https://github.com/Pharaonic/php-smart-enum/blob/8.6.x/CHANGELOG.md) and on the [GitHub releases](https://github.com/Pharaonic/php-smart-enum/releases) page.