PackageTrack
Sign in Get early access

struggle-for-php/sfp-phpstan-psr-log

Extra strict and opinionated psr/log (psr-3) rules for PHPStan

1.1.0 365K downloads/mo #4726 most downloaded on Packagist struggle-for-php/sfp-phpstan-psr-log

What this package is like to depend on

Last release 2 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

6 years old

33 releases · first in 2020

3 releases in the last 12 months

see the full history below

Release timeline

32 releases · Mar 2020 to May 2026
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 33
  1. 1.1.0 28 May 2026
    Release notes

    Release Notes for 1.1.0

    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.

    1.1.0

    • Total issues resolved: 0
    • Total pull requests resolved: 3
    • Total contributors: 3

    Improvements 🔧

    Open source →
  2. 1.0.1 09 Nov 2025
    Release notes

    Release Notes for 1.0.1

    1.0.x bugfix release (patch)

    1.0.1

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1

    Bugfixes 🐛

    Open source →
  3. 1.0.0 08 Nov 2025
    Release notes

    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-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

    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
    

    1.0.0

    • Total issues resolved: 1
    • Total pull requests resolved: 8
    • Total contributors: 2

    Improvements 🔧

    Internals 🔍

    Major new features 🚀

    Open source →
  4. 0.24.0 24 Apr 2025
    Release notes

    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.neon

    and, set parameters enableLogMethodLevelRule and enableContextTypeRule

    parameters:
        sfpPsrLog:
            enableLogMethodLevelRule: true # default:false
            enableContextTypeRule: true # default:false

    0.24.0

    • Total issues resolved: 0
    • Total pull requests resolved: 3
    • Total contributors: 1

    Improvements 🔧

    Major new features 🚀

    Open source →
  5. 0.23.0 11 Nov 2024
    Release notes

    Release Notes for 0.23.0

    Feature release (minor)

    0.23.0

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1

    Improvements 🔧

    Open source →
  6. 0.22.0 25 Sep 2024
    Release notes

    Release Notes for 0.22.0

    Feature release (minor)

    0.22.0

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1

    enhancement

    Open source →
  7. 0.21.0 13 May 2024
    Release notes

    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 🔍

    Open source →
  8. 0.20.0 10 Feb 2024
    Release notes

    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 🔍

    Bugfixes 🐛

    Major new features 🚀

    Open source →
  9. 0.19.1 03 Feb 2024
    Release notes

    Release Notes for 0.19.1

    0.19.x bugfix release (patch)

    0.19.1

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1

    Bugfixes 🐛

    Open source →
  10. 0.19.0 03 Feb 2024
    Release notes

    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 🔍

    Bugfixes 🐛

    Improvements 🔧

    Open source →
  11. 0.18.0 06 Nov 2023

    Nothing published for this version

  12. 0.17.0 15 Oct 2023

    Nothing published for this version

  13. 0.16.1 14 Oct 2023

    Nothing published for this version

  14. 0.16.0 14 Oct 2023

    Nothing published for this version

  15. 0.15.0 14 Oct 2023

    Nothing published for this version

  16. 0.14.0 18 Sep 2023

    Nothing published for this version

  17. 0.13.0 28 May 2023

    Nothing published for this version

  18. 0.12.0 18 May 2023

    Nothing published for this version

  19. 0.11.1 01 May 2023

    Nothing published for this version

  20. 0.11.0 01 May 2023

    Nothing published for this version

  21. 0.10.0 30 Apr 2023

    Nothing published for this version

  22. 0.9.0 30 Apr 2023

    Nothing published for this version

  23. 0.8.0 09 Apr 2023

    Nothing published for this version

  24. 0.7.0 25 Mar 2023

    Nothing published for this version

  25. 0.6.1 22 Mar 2023

    Nothing published for this version

  26. 0.6.0 21 Mar 2023

    Nothing published for this version

  27. 0.5.1 21 Mar 2023

    Nothing published for this version

  28. 0.5.0 21 Mar 2023

    Nothing published for this version

  29. 0.4.0 21 Mar 2023

    Nothing published for this version

  30. 0.3.0 no date

    Nothing published for this version

  31. 0.2.0 29 Apr 2020

    Nothing published for this version

  32. 0.1.3 15 Mar 2020

    Nothing published for this version

  33. 0.1.1 14 Mar 2020

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive