Backwards incompatible release (major)
UPGRADING guide
composer require --dev struggle-for-php/sfp-phpstan-psr-log:^1PHP, PHPStan version requirements
- requires PHP 7.4 or newer to run
- dropped support for PHP 7.2, 7.3
- requires PHPStan
2.1.23or 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
0 issues of 0 selected
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.