Skip to content

[FrameworkBundle] Make the Router cache_dir configurable #47496

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
Oct 1, 2022

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Sep 6, 2022

Q A
Branch? 6.2 for features
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR symfony/symfony-docs#17253

This PR adds a new framework.router.cache_dir configuration setting. It will default to kernel.cache_dir as previously, but makes it possible to easily re-configure the Router's cache directory.

My intended use case is to set it to ~ (null) for the test environment because I need to modify or otherwise dynamically load routes during tests. Another use case I see for it is to have tenant-specific route configurations and caches in multi-tenancy applications.

@mpdude
Copy link
Contributor Author

mpdude commented Sep 8, 2022

fabbot.io failure is not due to this PR

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me

@chalasr
Copy link
Member

chalasr commented Sep 23, 2022

(Rebased needed)

@mpdude
Copy link
Contributor Author

mpdude commented Sep 26, 2022

Merge conflicts resolved.

@fabpot
Copy link
Member

fabpot commented Oct 1, 2022

@mpdude Can you rebase to get rid of the merge commit?

@mpdude mpdude force-pushed the router-cache-dir-config branch from e7cace1 to 5804c50 Compare October 1, 2022 13:59
@mpdude
Copy link
Contributor Author

mpdude commented Oct 1, 2022

@fabpot done

@mpdude
Copy link
Contributor Author

mpdude commented Oct 1, 2022

Out of curiosity, (why) would a merge commit matter if you do a squash merge anyway?

@fabpot fabpot force-pushed the router-cache-dir-config branch from 5804c50 to dd65d30 Compare October 1, 2022 14:05
@fabpot
Copy link
Member

fabpot commented Oct 1, 2022

The script we are using to do the merge doesn't always work well in such situations.

@fabpot
Copy link
Member

fabpot commented Oct 1, 2022

Thank you @mpdude.

@fabpot fabpot merged commit 1b3b14c into symfony:6.2 Oct 1, 2022
@mpdude mpdude deleted the router-cache-dir-config branch October 1, 2022 14:08
OskarStark added a commit to symfony/symfony-docs that referenced this pull request Oct 1, 2022
…ude)

This PR was squashed before being merged into the 6.2 branch.

Discussion
----------

Document the `framework.router.cache_dir` setting

This documents a new configuration setting suggested in symfony/symfony#47496.

Commits
-------

24b9b1d Document the `framework.router.cache_dir` setting
@fabpot fabpot mentioned this pull request Oct 24, 2022
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