Closed bastienff closed 7 years ago
This is an issue with your dependency injection. You need to configure your DI library to automatically detect and resolve dependencies or you need to configure the Site
in your DIC to inject the Engine.
league/route uses league/container under the hood. You should be able to resolve this by either manually registering the Engine
class to the container, or by enabling the ReflectionContainer
as a delegate (more info here).
@bastienff definitely seems like this is not a Plates issue, can we close this?
Closing this because it is unrelated to the Plates project itself and is a question regarding automatic dependency injection.
Estou com o mesmo problema ao utilizar o plates
Hello, i am triying to get plates to work but i am having a bit of troubles. When i implement plates without dependency injection works great. With dependency injection plates output this error:
Catchable Error: Argument 1 passed to App\Controllers\Site::__construct() must be an instance of League\Plates\Engine, none given, called in F:\xampp\htdocs\sistema\vendor\league\route\src\Route.php on line 67 and defined in F:\xampp\htdocs\sistema\app\controllers\Site.php on line 19
My code:
Win10 x64, XAMPP, PHP 5.6.21 "league/route": "^2.0", "league/plates": "^3.1.1", "zendframework/zend-diactoros": "^1.3",