Skip to content

[TASK] Allow and test PHP 8.6 - #94

Merged
Kanti merged 3 commits into
masterfrom
php-8.6
Nov 19, 2026
Merged

Kanti merged 3 commits into
masterfrom
php-8.6

Conversation

@Kanti

@Kanti Kanti commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

PHP 8.6.0 was released on 2026-11-19.

Changes

  • Add PHP 8.6 to the CI matrix.
  • Allow ~8.6.0 in the php constraint of composer.json.
  • Fix a PHPStan error that also breaks PHP 8.4 and 8.5 since PHPStan 2.3.7 (Strict comparison using === between DateTime and false will always evaluate to false in MailLogRepository.php). Since PHP 8.3, DateTime::modify() throws instead of returning false, so the check never ran. The anonymization date is now created with new DateTime('-' . $anonymizeAfter) in a try/catch; an invalid period still throws the InvalidArgumentException 8348363882 on every PHP version.

Only dev dependencies skip the PHP check

phpro/grumphp (via pluswerk/grumphp-config) does not allow PHP 8.6 yet: the latest release v2.26.0 requires ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0. So the 8.6 leg runs Composer with --ignore-platform-req=php+.
To make sure this only affects dev dependencies, the 8.6 leg also runs composer check-platform-reqs --no-dev. It fails if a non-dev dependency does not allow PHP 8.6.
Once GrumPHP allows PHP 8.6, ignorePlatformReqs can be removed from the workflow.

Result

✅ All legs are green, including PHP 8.6 and the platform check: https://github.com/andersundsehr/mail_logger/actions/runs/44596263661

@Kanti
Kanti marked this pull request as ready for review November 19, 2026 19:51
@Kanti
Kanti merged commit 4077168 into master Nov 19, 2026
10 checks passed
@Kanti
Kanti deleted the php-8.6 branch November 19, 2026 20:49
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