File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Yii Error Handler Change Log
22
3- ## 4.3.3 under development
3+ ## 5.0.0 under development
44
5- - no changes in this release.
5+ - Chg # 162 : Replace deprecated ` ThrowableResponseFactory ` class usage to new one, and remove it ( @ vjik )
66
77## 4.3.2 January 09, 2026
88
Original file line number Diff line number Diff line change 1+ # Upgrading Instructions for Yii Error Handler
2+
3+ This file contains the upgrade notes. These notes highlight changes that could break your
4+ application when you upgrade the package from one version to another.
5+
6+ > ** Important!** The following upgrading instructions are cumulative. That is, if you want
7+ > to upgrade from version A to version C and there is version B between A and C, you need
8+ > to follow the instructions for both A and B.
9+
10+ ## Upgrade from 4.x
11+
12+ - ` Yiisoft\ErrorHandler\Factory\ThrowableResponseFactory ` was removed, use
13+ ` Yiisoft\ErrorHandler\ThrowableResponseFactory ` instead.
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- use Yiisoft \ErrorHandler \Factory \ThrowableResponseFactory ;
5+ use Psr \Container \ContainerInterface ;
6+ use Yiisoft \Definitions \DynamicReference ;
67use Yiisoft \ErrorHandler \Renderer \HtmlRenderer ;
8+ use Yiisoft \ErrorHandler \RendererProvider \CompositeRendererProvider ;
9+ use Yiisoft \ErrorHandler \RendererProvider \ContentTypeRendererProvider ;
10+ use Yiisoft \ErrorHandler \RendererProvider \HeadRendererProvider ;
711use Yiisoft \ErrorHandler \ThrowableRendererInterface ;
12+ use Yiisoft \ErrorHandler \ThrowableResponseFactory ;
813use Yiisoft \ErrorHandler \ThrowableResponseFactoryInterface ;
914
1015/**
1318
1419return [
1520 ThrowableRendererInterface::class => HtmlRenderer::class,
16- ThrowableResponseFactoryInterface::class => ThrowableResponseFactory::class,
21+ ThrowableResponseFactoryInterface::class => [
22+ 'class ' => ThrowableResponseFactory::class,
23+ '__construct() ' => [
24+ 'rendererProvider ' => DynamicReference::to (
25+ static fn (ContainerInterface $ container ) => new CompositeRendererProvider (
26+ new HeadRendererProvider (),
27+ new ContentTypeRendererProvider ($ container ),
28+ )
29+ ),
30+ ],
31+ ],
1732];
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments