Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Routing] deprecate some router options #30249

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

Merged
merged 1 commit into from
Feb 21, 2019

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Feb 14, 2019

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #28865 (comment)
License MIT
Doc PR symfony/symfony-docs#...

@Tobion Tobion force-pushed the deprecate-routing-options branch from 9ad7aaf to 763738c Compare February 14, 2019 23:32
@Tobion
Copy link
Contributor Author

Tobion commented Feb 15, 2019

For some reason the non-insulted functional tests are failing.

@Tobion Tobion force-pushed the deprecate-routing-options branch from 763738c to a4e592f Compare February 15, 2019 14:12
@Tobion Tobion force-pushed the deprecate-routing-options branch from a4e592f to bf4cd61 Compare February 15, 2019 14:28
@nicolas-grekas nicolas-grekas added this to the next milestone Feb 16, 2019
@xabbuh
Copy link
Member

xabbuh commented Feb 18, 2019

we should document this in UPGRADE-4.3.md and UPGRADE-5.0.md too though

@fabpot
Copy link
Member

fabpot commented Feb 21, 2019

Thank you @Tobion.

@fabpot fabpot merged commit bf4cd61 into symfony:master Feb 21, 2019
fabpot added a commit that referenced this pull request Feb 21, 2019
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Routing] deprecate some router options

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28865 (comment)
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

bf4cd61 [Routing] deprecate some router options
@Tobion Tobion deleted the deprecate-routing-options branch February 22, 2019 16:05
fabpot added a commit that referenced this pull request Mar 3, 2019
This PR was merged into the 4.3-dev branch.

Discussion
----------

add deprecated router options to upgrade files

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30249 (comment)
| License       | MIT
| Doc PR        |

Commits
-------

c3da27a add deprecated router options to upgrade files
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
nicolas-grekas added a commit that referenced this pull request Jun 5, 2019
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Routing] remove deprecations

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | yes     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

Ref. #30249, #30286, #24894

Commits
-------

5beb5f8 [Routing] remove deprecations
@ViPErCZ
Copy link

ViPErCZ commented Aug 30, 2019

How prefix UrlGenerator and UrlMatcher in cache directory?

@ViPErCZ
Copy link

ViPErCZ commented Aug 30, 2019

PS: cache_class_prefix is not used now ?

@flack
Copy link
Contributor

flack commented Jan 9, 2020

Hi!

Is there any explanation why these options were being deprecated/removed? I use sf routing standalone in a framework where you have separate application modules (each with its own set of routes) and a prefix that is dynamically changeable (well, at least that's the simplified way to put it).

The way I implement this is to have one router instance per application module instantiated with the non-prefixed route collection (and before calling match I set the prefix with getContext()->setBaseUrl()). The ability to specify matcher_cache_class and generator_cache_class allowed me to cache each of the router instances separately, but with 5.0, I'm now forced to disable caching, which ofc sucks for performance.

Is there any way around this?

(pls don't say "use Dynamic Router from Symfony CMF". For one thing, it's not compatible with 5.0 yet, also I would have to write a ton of integration code, and by looking at the repo, it seems to be in deep maintenance mode, and I don't want to add a dependency that could get abandoned any time now)

@flack
Copy link
Contributor

flack commented Jan 10, 2020

ok, found a workaround in the linked ticket: You have to set a different cache_dir for each router instance now. Would have been nice if this would have been mentioned in UPGRADING.md though

@xabbuh
Copy link
Member

xabbuh commented Jan 10, 2020

@flack Would you like to send a PR with the upgrade instruction improvements that you have in mind?

@flack
Copy link
Contributor

flack commented Jan 10, 2020

@xabbuh done in #35297

flack added a commit to flack/symfony that referenced this pull request Jan 10, 2020
fabpot added a commit that referenced this pull request Jan 11, 2020
…ions (flack)

This PR was merged into the 4.4 branch.

Discussion
----------

Improve upgrading instructions for deprecated router options

See #30249 (comment)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | #30249
| License       | MIT
| Doc PR        |

Commits
-------

2cc7083 Improve upgrading instructions for deprecated router options
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.

10 participants