Skip to content

Commit 85da6aa

Browse files
committed
Compatibility with Slim 3.2.* and above
1 parent d6eabbf commit 85da6aa

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"php": "~5.6|~7.0",
1818
"php-di/php-di": "^5.2.0",
1919
"php-di/invoker": "^1.2.0",
20-
"slim/slim": "^3.0.0"
20+
"slim/slim": "^3.2.0"
2121
},
2222
"require-dev": {
2323
"phpunit/phpunit": "~5.1"

src/config.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use DI\Bridge\Slim\CallableResolver;
44
use DI\Bridge\Slim\ControllerInvoker;
55
use DI\Container;
6-
use DI\Scope;
76
use Interop\Container\ContainerInterface;
87
use Invoker\Invoker;
98
use Invoker\ParameterResolver\AssociativeArrayResolver;
@@ -37,12 +36,13 @@
3736
'router' => object(Slim\Router::class),
3837
'errorHandler' => object(Slim\Handlers\Error::class)
3938
->constructor(get('settings.displayErrorDetails')),
39+
'phpErrorHandler' => object(Slim\Handlers\PhpError::class)
40+
->constructor(get('settings.displayErrorDetails')),
4041
'notFoundHandler' => object(Slim\Handlers\NotFound::class),
4142
'notAllowedHandler' => object(Slim\Handlers\NotAllowed::class),
4243
'environment' => function () {
4344
return new Slim\Http\Environment($_SERVER);
4445
},
45-
4646
'request' => function (ContainerInterface $c) {
4747
return Request::createFromEnvironment($c->get('environment'));
4848
},
@@ -51,7 +51,6 @@
5151
$response = new Response(200, $headers);
5252
return $response->withProtocolVersion($c->get('settings')['httpVersion']);
5353
},
54-
5554
'foundHandler' => object(ControllerInvoker::class)
5655
->constructor(get('foundHandler.invoker')),
5756
'foundHandler.invoker' => function (ContainerInterface $c) {

0 commit comments

Comments
 (0)