sfDoctrineRoute is able to forward 404 or to just pass no object if none was found to the action. Imho it would make more sense if the route doesn’t match at all if no object was found.
Sometimes you cannot avoid to have multiple modules for a single pattern, for instance, if you use slugs:
url: /:slug
I think it’s not the best practice to have multiple modules for this pattern, but sometimes I need that, because the client wants a specific url-pattern.
Does sfDoctrineRoute provide an option to not match the route, if no object can be found?
If not, how can I modify sfDoctrineRoute to achieve that behavior? I tried to override matchesParameter() but it has no effect. Even if I put die(); on the first line of the method, the action is called.
Wouldn’t it be easier not to use sfDoctrineRoute at all?
Why not make as many requests as possible models and forward to the right module/action when something is found?