-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[RFC] Deprecate Kernel::getRootDir? #24293
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
Comments
The hard part of the deprecation will be deprecating the |
Milestone updated to 3.x :) perhaps be pragmatic on parameters? As of 4.0 While deprecating public calls to |
Removing a parameter is a BC break, as it breaks all bundles relying on it (and there are a lot. |
Removing |
It's a useless path IMHO; superseded by But yeah, the path would be to use Related to #24292 now, if we want to get rid of |
From @wouterj on slack
Then i remembered #22315 (comment) Basically |
I think we actually failed to remove the parameter even in 4.0... |
Actually, I think UPGRADE.md should be fixed to remove the statement that is not true. It's misleading and complicates the work taken in migration to 4.0 compatibility. Furthermore, other Symfony bundles (in 4.x branch) also still use this parameter. https://github.com/symfony/symfony/blob/master/UPGRADE-4.0.md#httpkernel
But both are there on 4.0: |
Technically you're right, however i think its intention is to not start using Perhaps do what we always do; revert the "virtual" deprecation now, and bring in a feature to deprecate di params first. Or dont deprecate the param. |
Let's drop that line from UPGRADE/CHANGELOG files yes. |
…l.root_dir (fabpot) This PR was merged into the 4.2-dev branch. Discussion ---------- [HttpKernel] Deprecate usage of getRootDir() and kernel.root_dir | 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? | no <!-- 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 | #24293 | License | MIT | Doc PR | n/a <!-- 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 ------- 0b851c6 [HttpKernel] deprecated usage of getRootDir() and kernel.root_dir
Should we deprecate
Kernel::getRootDir()
? With the new structure andKernel
living insrc/
this will basically point to some arbitrary namespace path. Im not even sure core still uses/needs it, havinggetProjectDir()
also.I think also any
dirname(__DIR__)
call in https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/src/Kernel.php should be replaced by that (getProjectDir).The text was updated successfully, but these errors were encountered: