Skip to content
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

Name Prefix Ignored in Yaml #1029

Closed
jtherin opened this issue May 7, 2015 · 2 comments
Closed

Name Prefix Ignored in Yaml #1029

jtherin opened this issue May 7, 2015 · 2 comments
Labels
Milestone

Comments

@jtherin
Copy link

jtherin commented May 7, 2015

I have a small naming problem with name_prefix parameter.

Here is the configuration used :

app/config/routing.yml

_company_api:
    resource: routing/api.yml
    prefix:   /api
    type:     rest

app/config/routing/api.yml

_company_api_v1:
    type:     rest
    resource: api_v1.yml
    prefix:   /v1
    name_prefix: api_v1_

app/config/routing/api_v1.yml

company_api_v1_somethingbundle:
    type:     rest
    resource: "@CompanyApiV1SomethingBundle/Resources/config/routing.yml"

src/Company/Api/V1/SomethingBundle/Resources/config/routing.yml

company_api_v1_somethingbundle_first:
    type:     rest
    resource: Company\Api\V1\SomethingBundle\Controller\FirstController

company_api_v1_somethingbundle_second:
    type:     rest
    resource: Company\Api\V1\SomethingBundle\Controller\SecondController

With an app/console router:debug, I get :

 get_first                         GET      ANY    ANY  /api/v1/first
 get_second                        GET      ANY    ANY  /api/v1/second

But I was expecting something like this :

 api_v1_get_first                  GET      ANY    ANY  /api/v1/first
 api_v1_get_second                 GET      ANY    ANY  /api/v1/second

The name_prefix: api_v1_ parameter seems to be ignored :(.
How can I fix this?

@lsmith77
Copy link
Member

lsmith77 commented May 7, 2015

i think I seem to remember having seen this noted before .. best would be to investigate the code inside the Routing namespace in this Bundle to try and come up with a fix.

@lsmith77 lsmith77 added this to the 1.6.0 milestone May 8, 2015
@lsmith77 lsmith77 modified the milestones: 1.6.0, 1.7.0 May 12, 2015
@tim96
Copy link
Contributor

tim96 commented May 30, 2015

Hello @jtherin , @lsmith77 .
I suggest this solution #1047 .

lsmith77 added a commit that referenced this issue Jun 4, 2015
Fixed error when name prefix ignored in yaml. Issue #1029
@lsmith77 lsmith77 removed the verified label Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants