Skip to content

Prepare 3.0: PHP 8.2+, PHPUnit 11.5+, PHPStan 2 at max level - #13

Merged
mnapoli merged 1 commit into
masterfrom
prepare-v3
Sep 26, 2026
Merged

mnapoli merged 1 commit into
masterfrom
prepare-v3

Conversation

@mnapoli

@mnapoli mnapoli commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Cleanups for the 3.0 major release, after #12.

Requirements

  • PHP 8.2+ (was 8.0). psr/log stays ^1.1 | ^2.0 | ^3.0.
  • Dev: PHPUnit ^11.5|^12|^13 (11.5 is the first series on PHP 8.2), PHPStan ^2.

CI

  • PHP 8.2 to 8.5, with --prefer-lowest on 8.2.
  • actions/checkout@v7, actions/cache@v6, coding standards on PHP 8.5.
  • Removed Composer's deprecated --no-suggest.

Code (no change to the public API)

  • PHPStan at level max (was 5), for src and tests, without baseline or ignores.
  • PHP 8 syntax: constructor property promotion, mixed, str_contains(), $object::class, Stringable.
  • The stream and its URL are one property, opened lazily as before.

Behavior changes

  • An unsupported log level (e.g. $logger->log('warn', …)) now throws Psr\Log\InvalidArgumentException, as PSR-3 requires. It used to trigger a PHP warning ("Undefined array key") and drop the message.
  • A Stringable message (allowed by psr/log 2 and 3) is now logged. It used to throw a TypeError with strict_types.
  • A value that cannot be encoded to JSON now throws a JsonException instead of a TypeError.

Other

  • .gitattributes: .phpcs.xml.dist (the actual file name) and phpstan.neon are excluded from the package.
  • README: documentation links point to the current URL (without .html).

@mnapoli
mnapoli changed the base branch from request-id-in-logs to master September 26, 2026 19:12
@mnapoli
mnapoli merged commit f1c2a1a into master Sep 26, 2026
6 checks passed
@mnapoli
mnapoli deleted the prepare-v3 branch September 26, 2026 19:41
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