Hello and thanks for this example, I got to the stage of MyCustomErrorRenderer to display “my awesome format” (under SLIM 4), but trying to use twig in the above code example, the class construct complains (fatal error) __construct(): Argument #1 ($twig) must be of type Slim\Views\Twig, null given. It doesn’t seem to be able to create an instance of Twig inside the class. Do you have any ideas on how to do this under Slim 4 ? Or it might be something else?… Thanks!
pcoloma
4
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
|
Return twig template by controller?
|
12 | 8780 | March 31, 2017 | |
|
How to setup a 404 action/view in Slim 4?
|
13 | 10263 | June 13, 2023 | |
|
Slim-4 How to get twig in controllers with PHP-DI
|
3 | 4494 | August 3, 2020 | |
|
Implementing slim/twig-view with php-di/slim-bridge
|
2 | 625 | February 28, 2024 | |
|
Twig View - Slim4
|
3 | 1456 | May 27, 2020 |