Skip to content

Commit

Permalink
update to slim ^4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangut committed Sep 12, 2019
1 parent d8dfc9a commit 6b4ce45
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class Section

#### Definition files

####### PHP
###### PHP

```php
return [
Expand Down Expand Up @@ -329,7 +329,7 @@ return [
];
```

####### JSON
###### JSON

```json
[
Expand Down Expand Up @@ -369,7 +369,7 @@ return [
]
```

####### XML
###### XML

```xml
<?xml version="1.0" encoding="utf-8"?>
Expand Down Expand Up @@ -418,7 +418,7 @@ return [
</root>
```

####### YAML
###### YAML

```yaml
# Group
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"php": "^7.1",
"ext-json": "*",
"juliangut/mapping": "~0.4",
"slim/slim": "^4.1"
"slim/slim": "^4.2"
},
"require-dev": {
"brainmaestro/composer-git-hooks": "^2.1",
Expand All @@ -52,7 +52,8 @@
"suggest": {
"doctrine/annotations": "In order to load routing from annotations",
"symfony/yaml": "In order to load routing from YAML files",
"spatie/array-to-xml": "In order to return XML responses"
"spatie/array-to-xml": "In order to return XML responses",
"slim/twig-view": "In order to return Twig rendered responses"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 5 additions & 2 deletions src/AppFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Slim\CallableResolver;
use Slim\Factory\AppFactory as SlimAppFactory;
use Slim\Interfaces\CallableResolverInterface;
use Slim\Interfaces\MiddlewareDispatcherInterface;
use Slim\Interfaces\RouteCollectorInterface;
use Slim\Interfaces\RouteResolverInterface;

Expand All @@ -42,7 +43,8 @@ public static function create(
?ContainerInterface $container = null,
?CallableResolverInterface $callableResolver = null,
?RouteCollectorInterface $routeCollector = null,
?RouteResolverInterface $routeResolver = null
?RouteResolverInterface $routeResolver = null,
?MiddlewareDispatcherInterface $middlewareDispatcher = null
): App {
static::$responseFactory = $responseFactory ?? static::$responseFactory;

Expand All @@ -55,7 +57,8 @@ public static function create(
$container,
$callableResolver,
$routeCollector ?? static::getRouteCollector($responseFactory, $callableResolver, $container),
$routeResolver ?? static::$routeResolver
$routeResolver ?? static::$routeResolver,
$middlewareDispatcher ?? static::$middlewareDispatcher
);

return $app;
Expand Down

0 comments on commit 6b4ce45

Please sign in to comment.