Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with slim 4 #29

Closed
X-Tender opened this issue Feb 26, 2020 · 1 comment
Closed

Problem with slim 4 #29

X-Tender opened this issue Feb 26, 2020 · 1 comment

Comments

@X-Tender
Copy link

I tried it to add it to slim 4 but I get the error

Fatal error: Uncaught TypeError: Argument 2 passed to Slim\HttpCache\Cache::__invoke() must be an instance of Psr\Http\Message\ResponseInterface, instance of Slim\Routing\RouteRunner given, called in /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php on line 283 and defined in /var/www/html/vendor/slim/http-cache/src/Cache.php:53 Stack trace: #0 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(283): Slim\HttpCache\Cache->__invoke(Object(Slim\Http\ServerRequest), Object(Slim\Routing\RouteRunner)) #1 /var/www/html/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(98): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #2 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(140): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #3 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #4 /var/www/html/vendor/slim/slim/Slim/App.php(211): Slim\MiddlewareDispatcher->handle( in /var/www/html/vendor/slim/http-cache/src/Cache.php on line 53

Took a peak into the middleware and the __invoke method didn't have the correct arguments.
So is it just not ready form slim 4 or did I missed something?

@l0gicgate
Copy link
Member

That's because this middleware is not yet compatible with PSR-15. We need to rewrite it in order to make it compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants