Nikita Popov

Results 517 comments of Nikita Popov

Sounds like a reasonable feature, and the code is basically all there already: https://github.com/nikic/FastRoute/blob/master/src/Dispatcher/RegexBasedAbstract.php#L59 Adding a method to the `Dispatcher` interface would be a BC break though :/

I generally agree with @bwoebi. It's not really a question of low-level vs. high-level. It's a matter of exceptions being used only for *exceptional* circumstances. For a routing library, a...

The optimal solution for this particular case would be to return an ADT enum and pattern match over it. Of course that's not something that PHP supports :)

While I don't really buy the performance argument, I did experience that functions can cause weird autoloading issues and unless you're writing function-only libraries the hassle is often not worth...

A possible workaround that avoids super_closure: > Closures generally don't play well with any kind of caching (they aren't even serializable). The standard way to solve this is to replace...

Sorry for the delay here, this dropped off my radar. I have now added @lcobucci as a maintainer to this repo, so hopefully he can get the effort towards version...

The expectation is that dispatch() receives an already decoded URI. The example in https://github.com/nikic/FastRoute#usage uses `rawurldecode()` to that effect.

Instead of trying to directly use the regex (which, as you say, doesn't work with options in any case -- this is not described by a single regex) I'd suggest...

@sitilge I wouldn't know how to integrate URL generation into the project as it currently is. We'd at least need named routes for that to reasonably work.

> I was wondering why something like the suggestion is not implemented in fastroute, since it seems to work fine. Where any person is routing, sooner or later an urls...