Skip to content

Add the possibility to prefix URLs and routes name #9159

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
wants to merge 1 commit into from
Closed

Add the possibility to prefix URLs and routes name #9159

wants to merge 1 commit into from

Conversation

ismail1432
Copy link
Contributor

I saw this issue #8358 and I want to solve it but I am not sure if it's the good place to add this information 😀

I saw this issue #8358 and I want to solve it  but I am not sure if it's the good place to add this information 😀
@javiereguiluz
Copy link
Member

@ismail1432 I like this. Thanks for contributing! However, I'd like to propose to change the location of this change. The routing.rst file is mainly for newcomers and this feature is mostly for advanced users and edge cases. I propose to do the following:

  1. Remove all the changes from routing.rst.
  2. Edit the routing/external_resources.rst file and add this example in the configuration block of the Prefixing Imported Routes section. We show YAML, XML and PHP ... we need to add a new config format called .. code-block:: php-annotations inside the existing .. configuration-block::. You just need to update the example contents to match the existing config example.

If you need any help with this, please tell me. Thanks!

@ismail1432
Copy link
Contributor Author

Ok I'll do that
Thanks

@javiereguiluz
Copy link
Member

Please don't make any change yet! I think I'm messing things 😅

There are two features (URL prefix, route name prefix) and two different scenarios (config files, @route annotation).

In the past we had: URL prefix + config files or @route ... in 3.4 we added route name prefix + @route and in 4.1 we added route name prefix + config files. So, the changes are more complex than I imagined. We'd need to:

  1. In 2.7 branch, update routing/external_resources.rst and add an example of PHP annotations for the existing example. And rename the section from Prefixing Imported Routes to Prefixing the URLs of Imported Routes
  2. In 3.4 branch, update routing/external_resources.rst and add a new section called Prefixing the Names of Imported Routes and add only the example of PHP annotations (according to https://symfony.com/blog/new-in-symfony-3-4-prefix-all-controller-route-names).
  3. In 4.1 branch, update routing/external_resources.rst and in the section added above (Prefixing the Names of Imported Routes) add the example of the config files (according to https://symfony.com/blog/new-in-symfony-4-1-prefix-imported-route-names).

So, in this PR you can take care of 2. and we'll finish 1. and 3. in separate PRs. Thank you and I'm sorry for all the trouble.

@ismail1432
Copy link
Contributor Author

Ok, thanks for clarification.
I'll do the step 2
Have a nice day

@ismail1432
Copy link
Contributor Author

Hi @javiereguiluz I create a new PR #9186 for step 2

javiereguiluz added a commit that referenced this pull request Feb 7, 2018
…aviereguiluz)

This PR was merged into the 3.4 branch.

Discussion
----------

add  Prefixing the Names of Imported Routes

This PR follows this one #9159

Commits
-------

f8b8e0d Some fixes and rewords
5ec506d add  Prefixing the Names of Imported Routes
javiereguiluz added a commit that referenced this pull request Feb 11, 2018
…iluz)

This PR was squashed before being merged into the 2.7 branch (closes #9241).

Discussion
----------

Improved a routing example to show annotations

This fixes the first issue of #9159.

Commits
-------

d553d70 Improved a routing example to show annotations
javiereguiluz added a commit that referenced this pull request Feb 11, 2018
…files (javiereguiluz)

This PR was merged into the master branch.

Discussion
----------

Documented the name prefix feature for YAML, XML and PHP files

This fixes the last issue of #9159.

Commits
-------

0896663 Documented the name prefix feature for YAML, XML and PHP files
@javiereguiluz
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants