8000 [DX] Improve Routing Syntax Import Error · Issue #11300 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DX] Improve Routing Syntax Import Error #11300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
weaverryan opened this issue Jul 5, 2014 · 1 comment
Closed

[DX] Improve Routing Syntax Import Error #11300

weaverryan opened this issue Jul 5, 2014 · 1 comment
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony) Routing

Comments

@weaverryan
Copy link
Member

Suppose I have app/config/routing.yml like this:

foo_bundle:
    resource: "@FooBundle/Resources/config/routing.yml"

Now, I mess something up in the routing.yml file in FooBundle (e.g. I forget a : somewhere or use tabs). The error looks like this:

screen shot 2014-07-04 at 7 11 42 pm

The second part of the exception message is actually what we want: you have a parse error in routing.yml file in the bundle. But the first part makes me think that the problem is in app/config/routing.yml. Awesomely enough, I'm pretty sure I was the one who originally created this exception message :).

I think the best thing to do is to rearrange the message so that it reads something like:

Unable to parse at line 5 (near "pattern /") in "/Users/weaverryan/Sites/knp/KnpUniversity/app/config/routing.yml" (which is being imported from "/Users/weaverryan/Sites/knp/KnpUniversity/src/Knp/UniversityBundle/Resources/config/routing.yml")

Thanks!

@sstok
Copy link
Contributor
sstok commented Jul 5, 2014

👍

JanDC added a commit to JanDC/symfony that referenced this issue Jul 5, 2014
modified FileLoaderLoadException message to present the previous (Parse)Exception first
JanDC added a commit to JanDC/symfony that referenced this issue Jul 6, 2014
modified FileLoaderLoadException message to present the previous (Parse)Exception first
/2
tvlooy pushed a commit to JanDC/symfony that referenced this issue Jul 9, 2014
modified FileLoaderLoadException message to present the previous (Parse)Exception first
@fabpot fabpot closed this as completed Aug 28, 2014
fabpot added a commit that referenced this issue Aug 28, 2014
…r (Jan Decavele, tvlooy)

This PR was merged into the 2.6-dev branch.

Discussion
----------

[Config][Exception] Improve Routing Syntax Import Error

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11300
| License       | MIT
| Doc PR        | n/a

Commits
-------

fec9a4a removed some more spaces
16134d9 Merge remote-tracking branch 'upstream/master'
b099936 - Removed spaces around the concation dots to be more consitent - adjusted some formatting
0459d89 Addition of the symfony license text
de43182 Add test and small code fix
8ac5275 ISSUE #11300: Improve Routing Syntax Import Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony) Routing
Projects
None yet
Development

No branches or pull requests

3 participants
0