Giter Site home page Giter Site logo

ignored valid route names about routing HOT 5 CLOSED

symfony-cmf avatar symfony-cmf commented on August 16, 2024
ignored valid route names

from routing.

Comments (5)

dbu avatar dbu commented on August 16, 2024

ups, that was not the idea. but that means that this pattern is incorrect. the goal was to only try the default router if the route name is something that could actually work, to avoid breaking with exceptions, or ignoring exceptions that should not be ignored.

however, i don't see why your route name does not match the pattern we have, it looks like it should be fine.

while trying to link to where the expression came from i realized that the restriction on valid names was only active in 2.1 but got dropped in 2.2 aparently. so in the longer run we will just have to check for string, once we limit us to 2.2
https://github.com/symfony/symfony/blob/2.1/src/Symfony/Component/Routing/RouteCollection.php#L116 versus https://github.com/symfony/symfony/blob/2.2/src/Symfony/Component/Routing/RouteCollection.php#L120

from routing.

smatyas avatar smatyas commented on August 16, 2024

In my example, the route name contains '-' (hyphen) characters. That pattern does not match them.
I also tried to find the expression source, but I skipped the 2.1, only searched for it in 2.0 and 2.2 with no luck, now I understand why :)
I agree that checking for string will be enough.

from routing.

dbu avatar dbu commented on August 16, 2024

ah right, the hyphens in the expression are just to express a range, not to allow hyphens.

for 2.1 we still need the expression. i wonder if there is a clean way to know the installed version of the symfony routing component - if not we could look out for a class that only exists in 2.2 to determine if we need the regexp. ugh.

from routing.

dbu avatar dbu commented on August 16, 2024

so finally i merged that, its now in master.

from routing.

smatyas avatar smatyas commented on August 16, 2024

Thank you, David! 👍

from routing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.