Skip to content
Closed
Due by November 20, 2025
Closed Nov 8, 2025
100% complete

Backwards incompatible release (major)

UPGRADING guide

composer require --dev struggle-for-php/sfp-phpstan-psr-log:^1

PHP, PHPStan version requirements

  • requires PHP 7.4 or newer to run
    • dropped support for PHP 7.2, 7.3
  • requires PHPStan 2.1.23 or newer
    • dropped support for PHPStan 1.12

End User impacted changes

  • Removed stub dependency - Removed struggle-for-php/sfp-stubs-psr-log from composer.json and all references to extension.neon
  • Changed default configuration - In rules.neon
    • enableLogMethodLevelRule: false β†’ true
    • enableContextTypeRule: false β†’ true

So, this changes will affect error message & error identifier

Before

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   Example.php
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  26     Parameter #2 $context of method Psr\Log\LoggerInterface::notice() expects array{exception?: Throwable}, array{exception: string} given.
         πŸͺͺ  argument.type
         πŸ’‘  Offset 'exception' (Throwable) does not accept type string.
  27     Parameter #1 $level of method Psr\Log\LoggerInterface::log() expects 'alert'|'critical'|'debug'|'emergency'|'error'|'info'|'notice'|'warning', 'panic' given.
         πŸͺͺ  argument.type

After

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   Example.php
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  26     Parameter #2 $context of method Psr\Log\LoggerInterface::notice() expects array{exception?: Throwable}, array{exception: string} given.
         πŸͺͺ  sfpPsrLog.contextType
         πŸ’‘  Offset 'exception' (Throwable) does not accept type string.
  27     Parameter #1 $level of method Psr\Log\LoggerInterface::log() expects ('alert' | 'critical' | 'debug' | 'emergency' | 'error' | 'info' | 'notice' | 'warning'), 'panic' given.
         πŸͺͺ  sfpPsrLog.logMethodLevel

List view

    There are no open issues in this milestone

    Add issues to milestones to help organize your work for a particular release or project. Find and add issues with no milestones in this repo.