File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 17
17
"php" : " ~7.1" ,
18
18
"php-di/php-di" : " ^6.0.0" ,
19
19
"php-di/invoker" : " ^2.0.0" ,
20
- "slim/slim" : " ^4.0 .0"
20
+ "slim/slim" : " ^4.2 .0"
21
21
},
22
22
"require-dev" : {
23
23
"phpunit/phpunit" : " ~6.0" ,
Original file line number Diff line number Diff line change @@ -25,11 +25,10 @@ public static function create(ContainerInterface $container = null): App
25
25
{
26
26
$ container = $ container ?: new Container ;
27
27
28
- AppFactory::setContainer ($ container );
29
28
$ callableResolver = new InvokerCallableResolver ($ container );
30
29
AppFactory::setCallableResolver (new CallableResolver ($ callableResolver ));
31
30
32
- $ app = AppFactory::create ( );
31
+ $ app = AppFactory::createFromContainer ( $ container );
33
32
34
33
$ controllerInvoker = self ::createControllerInvoker ($ container );
35
34
$ app ->getRouteCollector ()->setDefaultInvocationStrategy ($ controllerInvoker );
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ public function injects_route_placeholder_over_request_attribute()
118
118
public function resolve_controller_from_container ()
119
119
{
120
120
$ app = Bridge::create ();
121
- $ app ->get ('/ ' , [ UserController::class, ' dashboard '] );
121
+ $ app ->get ('/ ' , UserController::class . ' : dashboard ' );
122
122
123
123
$ response = $ app ->handle (RequestFactory::create ());
124
124
$ this ->assertEquals ('Hello world! ' , (string ) $ response ->getBody ());
You can’t perform that action at this time.
0 commit comments