NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #4645 most downloaded on Packagist
Extra strict and opinionated psr/log (psr-3) rules for PHPStan
Last release 4 months ago
28 May 2026
Ships fairly regularly
a new release about every 3 months
Some releases are documented
notes for 10 of 33 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
33 releases · first in 2020
This release includes fixes related to the Unsealed Array Shapes feature introduced in PHPStan 2.2.
This release includes fixes related to the Unsealed Array Shapes feature introduced in PHPStan 2.2.
For more information about Unsealed Array Shapes, please refer to the PHPStan article below:
https://phpstan.org/blog/phpstan-2-2-unsealed-array-shapes-safer-array-keys
As of this version (1.1.0), installation with PHPStan 2.1 is still supported;
however, we recommend upgrading to PHPStan 2.2.
101: Additional fixes related to #99(unsealed array support) thanks to @sasezaki
99: Return unsealed context shapes for PHPStan 2.2 compatibility thanks to @robotomarvin
98: Merge release 1.0.1 into 1.1.x thanks to @github-actions[bot]
One column per quarter.
Total pull requests resolved: 1
1.0.x bugfix release (patch)
Backwards incompatible release (major)
Backwards incompatible release (major)
composer require --dev struggle-for-php/sfp-phpstan-psr-log:^1struggle-for-php/sfp-stubs-psr-log is no longer requried.If you already installed 0.* version, please remove extension.neon line from your phpstan.neon config.
- - vendor/struggle-for-php/sfp-phpstan-psr-log/extension.neon2.1.23 or newer
So, this changes will affect error message & error identifier
------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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
------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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
sfp-phpstan-psr-log-bigquery-schema-convert thanks to @sasezakiImportant include psr/log stub be planned to dropped in comming release.
Important
include psr/log stub be planned to dropped in comming release.
To try out the changes in the comming version,
DELETE vendor/struggle-for-php/sfp-phpstan-psr-log/extension.neon line from your phpstan.neon
includes:
- vendor/struggle-for-php/sfp-phpstan-psr-log/extension.neonand, set parameters enableLogMethodLevelRule and enableContextTypeRule
parameters:
sfpPsrLog:
enableLogMethodLevelRule: true # default:false
enableContextTypeRule: true # default:falseTotal pull requests resolved: 1
Feature release (minor)
Total pull requests resolved: 1
Feature release (minor)
This release is aimed to support PHPStan 1.11. If you use struggle-for-php/sfp-phpstan-psr-log 0.20 or under with phpstan 1.11, would be met identifie
This release is aimed to support PHPStan 1.11.
If you use struggle-for-php/sfp-phpstan-psr-log 0.20 or under with phpstan 1.11, would be met identifier error. So please update phpstan to 1.11 & struggle-for-php/sfp-phpstan-psr-log to 0.21.
Important Since 0.20.0 , changed default rule settings.
Important
Since 0.20.0, changed default rule settings.
see #71
Feature release (minor)
78: missing export-ignore for psalm-baseline.xml thanks to @sasezaki
76: merge 0.19.x thanks to @sasezaki
Total pull requests resolved: 1
0.19.x bugfix release (patch)
Important It is planned to change default rule settings.
Important
It is planned to change default rule settings.
phpstan.neonparameters:
sfpPsrLog:
enableMessageStaticStringRule: true
enableContextRequireExceptionKeyRule: true
reportContextExceptionLogLevel: 'info'
contextKeyOriginalPattern: '#\A[A-Za-z0-9-_]+\z#'see #71
Feature release (minor)
.editorconfig as export-ignore thanks to @sasezakiNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →