4.14.0
版本发布时间: 2024-06-13 17:37:43
slimphp/Slim最新发布版本:4.14.0(2024-06-13 17:37:43)
What's Changed
- Do not HTML entity encode in PlainTextErrorRenderer by @akrabat in https://github.com/slimphp/Slim/pull/3319
- Only render tip to error log if plain text renderer is used by @akrabat in https://github.com/slimphp/Slim/pull/3321
- Add template generics for PSR-11 implementations in PHPStan and Psalm by @limarkxx in https://github.com/slimphp/Slim/pull/3322
- Update squizlabs/php_codesniffer requirement from ^3.9 to ^3.10 by @dependabot in https://github.com/slimphp/Slim/pull/3324
- Update phpstan/phpstan requirement from ^1.10 to ^1.11 by @dependabot in https://github.com/slimphp/Slim/pull/3325
- Update psr/http-factory requirement from ^1.0 to ^1.1 by @dependabot in https://github.com/slimphp/Slim/pull/3326
Type hinting with template generics
With the introduction of template generics, if you type-hint Slim\App
instance variable using /** @var \Slim\App $app */
, then you will need to change it to either:
-
/** @var \Slim\App<null> $app */
if you are not using a DI container, or -
/** @var \Slim\App<\Psr\Container\ContainerInterface> $app */
if you are
You can also type-hint to the concrete instance of the container you are using too. For example, if you are using PHP-DI, then you can use: /** @var \Slim\App<DI\Container> $app */
.
New Contributors
- @limarkxx made their first contribution in https://github.com/slimphp/Slim/pull/3322
Full Changelog: https://github.com/slimphp/Slim/compare/4.13.0...4.14.0