Closed xificurk closed 3 years ago
I changed it that this will work since PHP 8, because == behaves too loosely in < 8.
@dg Does this mean you do not intend to support routing of requests to MicroPresenter
using SimpleRouter
on PHP < 8?
I am not sure we understood each other. This use-case was originally supported, but it was broken by changes in d989c52. The problem is that MicroPresenter requires closure callback parameter, so the parameter value is non-stringable object and URL construction crashes on this if you try to use SimpleRouter.
I get it now.
No. I still don't get it :-)
Can you give me a realworld example where constructUrl() is called and the parameter is closure?
The original context for this PR is in this thread: https://pehapkari.slack.com/archives/C2R30BLKA/p1607199796381500
Here is example on top of current sandbox: https://github.com/xificurk/sandbox/tree/simplerouter-bug-example
Thanks
The bug was intoroduced in d989c52fa70708816253f2adab7f57ba039a4b4f.
SimpleRouter
should support non-stringable (e.g. Closure instance) default parameter values - a typical use case isNette:Micro
presenter.