thephpleague / route

Fast PSR-7 based routing and dispatch component including PSR-15 middleware, built on top of FastRoute.
http://route.thephpleague.com
MIT License
651 stars 126 forks source link

Expected parameter of type 'League\Route\Strategy\StrategyInterface', 'League\Route\ContainerAwareInterface' provided #276

Closed Wennlys closed 4 years ago

Wennlys commented 4 years ago

image

If I use setContainer on strategy variable, it returns a ContainerAwareInterface value, but setStrategy expects another type of thing. I'm probably using this in the wrong way, but I don't know what.

naaando commented 4 years ago

Did you managed to solve? I'm with the same problem

naaando commented 4 years ago

Figured out here, the documentation is wrong, the method setContainer don't return the strategy interface like a builder pattern would.