File tree Expand file tree Collapse file tree 4 files changed +41
-2
lines changed
Expand file tree Collapse file tree 4 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 11# Yii Error Handler Change Log
22
3- ## 2.2 .0 under development
3+ ## 3.0 .0 under development
44
55- Enh #65 : Explicitly add transitive dependencies ` ext-mbstring ` , ` psr/http-factory ` and
66 ` psr/http-server-handler ` (@vjik )
77- Chg #64 : Raise PHP version to ` ^8.0 ` (@vjik , @xepozz )
8+ - Chg #72 : Adapt configuration group names to Yii conventions (@vjik )
89
910## 2.1.1 January 26, 2023
1011
Original file line number Diff line number Diff line change 4545 "roave/infection-static-analysis-plugin" : " ^1.16" ,
4646 "spatie/phpunit-watcher" : " ^1.23" ,
4747 "vimeo/psalm" : " ^4.30|^5.6" ,
48+ "yiisoft/di" : " ^1.1" ,
4849 "yiisoft/test-support" : " ^1.3"
4950 },
5051 "autoload" : {
6263 "source-directory" : " config"
6364 },
6465 "config-plugin" : {
65- "web" : " web.php"
66+ "di- web" : " di- web.php"
6667 }
6768 },
6869 "config" : {
File renamed without changes.
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Yiisoft \ErrorHandler \Tests ;
6+
7+ use PHPUnit \Framework \TestCase ;
8+ use Yiisoft \Di \Container ;
9+ use Yiisoft \Di \ContainerConfig ;
10+ use Yiisoft \ErrorHandler \Renderer \HtmlRenderer ;
11+ use Yiisoft \ErrorHandler \ThrowableRendererInterface ;
12+
13+ final class ConfigTest extends TestCase
14+ {
15+ public function testDiWeb (): void
16+ {
17+ $ container = $ this ->createContainer ('web ' );
18+
19+ $ throwableRenderer = $ container ->get (ThrowableRendererInterface::class);
20+
21+ $ this ->assertInstanceOf (HtmlRenderer::class, $ throwableRenderer );
22+ }
23+
24+ private function createContainer (?string $ postfix = null ): Container
25+ {
26+ return new Container (
27+ ContainerConfig::create ()->withDefinitions (
28+ $ this ->getDiConfig ($ postfix )
29+ )
30+ );
31+ }
32+
33+ private function getDiConfig (?string $ postfix = null ): array
34+ {
35+ return require dirname (__DIR__ ) . '/config/di ' . ($ postfix !== null ? '- ' . $ postfix : '' ) . '.php ' ;
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments