Releases: struggle-for-php/sfp-phpstan-psr-log
1.0.1
1.0.0
Release Notes for 1.0.0
Backwards incompatible release (major)
UPGRADING guide
composer require --dev struggle-for-php/sfp-phpstan-psr-log:^1- Since version 1,
struggle-for-php/sfp-stubs-psr-logis 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.neonPHP, 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
1.0.0
- Total issues resolved: 1
- Total pull requests resolved: 8
- Total contributors: 2
Improvements 🔧
- 96: docs: Document ContextTypeRule and LogMethodLevelRule in README thanks to @sasezaki
- 95: Removed extension.neon thanks to @sasezaki
- 92: Rename phpstan-type-mapping-from-bigquery to
sfp-phpstan-psr-log-bigquery-schema-convertthanks to @sasezaki - 89: Add support for PHP 8.5 (drop support PHP 7.2, 7.3) thanks to @sasezaki
Internals 🔍
- 94: Refactor to use acceptsReasonsTip() for consistent error message handling thanks to @sasezaki
- 91: Missing add psalm.xml thanks to @sasezaki
- 90: Update codebase to PHP 7.4 thanks to @sasezaki
Major new features 🚀
0.24.0
Release Notes for 0.24.0
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:false0.24.0
- Total issues resolved: 0
- Total pull requests resolved: 3
- Total contributors: 1
Improvements 🔧
Major new features 🚀
0.23.0
0.22.0
0.21.0
Release Notes for 0.21.0
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.
0.21.0
- Total issues resolved: 0
- Total pull requests resolved: 2
- Total contributors: 1
Bugfixes 🐛
Internals 🔍
- 80: Refactor around test case thanks to @sasezaki
0.20.0
Release Notes for 0.20.0
Important
Since 0.20.0, changed default rule settings.
- MessageStaticStringRule is enabled by default.
- ContextRequireExceptionKeyRule is disabled by default.
see #71
Feature release (minor)
0.20.0
- Total issues resolved: 0
- Total pull requests resolved: 4
- Total contributors: 1
Internals 🔍
- 79: Use phpstan-strict-rules thanks to @sasezaki
Bugfixes 🐛
-
78: missing export-ignore for psalm-baseline.xml thanks to @sasezaki
-
76: merge 0.19.x thanks to @sasezaki
Major new features 🚀
- 72: Change default enable rules thanks to @sasezaki
0.19.1
0.19.0
Important
It is planned to change default rule settings.
- MessageStaticStringRule would be enabled by default.
- ContextRequireExceptionKeyRule would be disabled by default.
Recommendation
- write these parameters to your project's
phpstan.neon
parameters:
sfpPsrLog:
enableMessageStaticStringRule: true
enableContextRequireExceptionKeyRule: true
reportContextExceptionLogLevel: 'info'
contextKeyOriginalPattern: '#\A[A-Za-z0-9-_]+\z#'see #71
Release Notes for 0.19.0
Feature release (minor)
0.19.0
- Total issues resolved: 0
- Total pull requests resolved: 5
- Total contributors: 1
Internals 🔍
- 74: Enable phpstan bleedingEdge thanks to @sasezaki
- 69: Add
.editorconfigas export-ignore thanks to @sasezaki
Bugfixes 🐛
Improvements 🔧
0.18.0
Release Notes for 0.18.0
This release includes conditionalTags to enable/disable MessageStaticStringRule #67.
If you use 0.17.0, please change your phpstan.neon
0.17.0
Remove this!
rules:
- Sfp\PHPStan\Psr\Log\Rules\MessageStaticStringRule
since 0.18.0
please add this!
parameters:
sfpPsrLog:
enableMessageStaticStringRule: true0.18.0
- Total issues resolved: 0
- Total pull requests resolved: 5
- Total contributors: 1
Improvements
- 67: Support conditionalTags for ContextRequireExceptionKeyRule, MessageStaticStringRule thanks to @sasezaki
- 64: Remove string check for context rules thanks to @sasezaki
- 62: Handle context array by constant-array #57 thanks to @sasezaki