NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #4777 most downloaded on Packagist
Extra strict and opinionated psr/log (psr-3) rules for PHPStan
Latest stable
1.2.0
Last release 15 days ago
07 Nov 2026
Ships fairly regularly
a new release about every 4 months
Most releases are documented
notes for 30 of 34 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
34 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
This release includes a fix for the rule error message format.
Feature release (minor)
This release includes a fix for the rule error message format.
Parameter #1 $level of method Psr\Log\LoggerInterface::log() expects ('alert' | 'critical' | 'debug' | 'emergency' | 'error' | 'info' | 'notice' | 'warning'), 'panic' given.
Parameter #1 $level of method Psr\Log\LoggerInterface::log() expects 'alert'|'critical'|'debug'|'emergency'|'error'|'info'|'notice'|'warning', 'panic' given.
The issue stemmed from a custom implementation of the formatting logic, introduced in version 1.0 when the method for strengthening method types was transitioned from using stubs to a rule-based approach. Please refer to #103 for further details.
Please update the existing baseline as necessary.
string to using Type->describe() instead thanks to @sasezakiYour coding agent can read these notes before it upgrades. Set up the MCP server →
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]
Total pull requests resolved: 1
1.0.x bugfix release (patch)
literal-string as static message thanks to @sasezakiBackwards incompatible release (major)
Backwards incompatible release (major)
composer require --dev struggle-for-php/sfp-phpstan-psr-log:^1
struggle-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.neon
2.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 @sasezakienableLogMethodLevelRule, enableContextTypeRule thanks to @sasezaki and @TheoD02> 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.neon
and, set parameters enableLogMethodLevelRule and enableContextTypeRule
parameters:
sfpPsrLog:
enableLogMethodLevelRule: true # default:false
enableContextTypeRule: true # default:false
Total 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.
> 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)
> 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 @sasezakiThis release includes conditionalTags to enable/disable MessageStaticStringRule #67.
This release includes conditionalTags to enable/disable MessageStaticStringRule #67.
If you use 0.17.0, please change your phpstan.neon
Remove this!
rules:
- Sfp\PHPStan\Psr\Log\Rules\MessageStaticStringRule
please add this!
parameters:
sfpPsrLog:
enableMessageStaticStringRule: true
.editorconfig from phpstan-src thanks to @sasezakiAdded MessageStaticStringRule (experimental)
Added MessageStaticStringRule (experimental)
You should add Sfp\PHPStan\Psr\Log\Rules\MessageStaticStringRule into your phpstan.neon to enable.
rules:
- Sfp\PHPStan\Psr\Log\Rules\MessageStaticStringRule
MessageStaticStringRule thanks to @sasezaki<!--
Total pull requests resolved: 1
0.16.x bugfix release (patch)
This release includes some minor bc breaks. final internal & update for case consistency.
This release includes some minor bc breaks. final internal & update for case consistency.
reportContextExceptionLogLevel parameter to README thanks to @sasezakiPlaceHolder -> Placeholder for consistency thanks to @sasezakiLogLevelListInterface should be marked as internal thanks to @sasezakiContextRequireExceptionKeyRule should be final thanks to @sasezaki[BC breaks] This version do change Rule names to be better recognized against PSR-3 documents.
[BC breaks] This version do change Rule names to be better recognized against PSR-3 documents.
PlaceHolderInMessageRule to PlaceHolderCharactersRuleContextKeyPlaceHolderRule to PlaceholderCorrespondToKeysRulesee #43
Total issues resolved: 0
Total pull requests resolved: 4
Total contributors: 1
43: Change Rule names thanks to @sasezaki
Total pull requests resolved: 6
Feature release (minor)
test dir thanks to @sasezakiTotal pull requests resolved: 1
Feature release (minor)
Total pull requests resolved: 3
Feature release (minor)
Total pull requests resolved: 1
0.11.x bugfix release (patch)
Total pull requests resolved: 2
Feature release (minor)
Total pull requests resolved: 3
Feature release (minor)
Total pull requests resolved: 2
Feature release (minor)
Total pull requests resolved: 1
Feature release (minor)
Total pull requests resolved: 2
Feature release (minor)
Total pull requests resolved: 2
0.6.x bugfix release (patch)
Total pull requests resolved: 4
Feature release (minor)
ContextRequireExceptionKeyRule thanks to @sasezakiTotal pull requests resolved: 2
0.5.x bugfix release (patch)
Total pull requests resolved: 1
Feature release (minor)
Nothing published for this version
Update require PHPStan version to ^1.10
Update require PHPStan version to ^1.10
Changed to use stubs package. https://github.com/struggle-for-php/sfp-stubs-psr-log
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.