Skip to content

Commit

Permalink
Upgrade container:0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Apr 24, 2023
1 parent 02e60a5 commit 81869f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"require": {
"php": ">=8.0.2",
"gacela-project/container": "^0.3"
"gacela-project/container": "^0.4"
},
"require-dev": {
"ext-mbstring": "*",
Expand Down
1 change: 1 addition & 0 deletions src/Router/Entities/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function run(Bindings $bindings): string|Stringable

if (!is_object($this->controller)) {
$creator = new Container($bindings->getAllBindings());
/** @var object $controller */
$controller = $creator->get($this->controller);
$response = $controller->{$this->action}(...$params);
} else {
Expand Down
1 change: 1 addition & 0 deletions src/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private static function handleException(Handlers $handlers, Exception $exception
return $handler($exception);
}

/** @var mixed $instance */
$instance = Container::create($handler);

if (is_callable($instance)) {
Expand Down

0 comments on commit 81869f0

Please sign in to comment.