Download the PHP package struggle-for-php/sfp-stubs-psr-log without Composer
On this page you can find all versions of the php package struggle-for-php/sfp-stubs-psr-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download struggle-for-php/sfp-stubs-psr-log
More information about struggle-for-php/sfp-stubs-psr-log
Files in struggle-for-php/sfp-stubs-psr-log
Package sfp-stubs-psr-log
Short Description Stubs to let Static Analysis understand psr/log (PSR-3)
License MIT
Informations about the package sfp-stubs-psr-log
PSR-3 psr/log stubs for static analysis
This repository is aimed for used by these.
- https://github.com/struggle-for-php/sfp-psalm-psr-log-plugin
- https://github.com/struggle-for-php/sfp-phpstan-psr-log
But, You can use this for individual purpose. Add the following files to your stub settings.
Features
Typed context array, in order to force exception
key is only Throwable object.
Example
Your Static analysis would points like this message.
Refs.
Implementors MUST still verify that the 'exception' key is actually an Exception before using it as such, as it MAY contain anything.
https://www.php-fig.org/psr/psr-3/#13-context
The PSR-3 specification states Exception
but we have confirmed with PHP-FIG that Throwable
is allowed for PHP 7 and later.
https://groups.google.com/g/php-fig/c/nnwDWSFmij8
level
parameter of log
method is a constant enum of LogLevels::*.
Not Support (Not planned)
- Stub
LoggerAwareTrait