-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle][SecurityBundle][TwigBundle][Yaml] remove deprecated code #23815
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
Conversation
xabbuh
commented
Aug 7, 2017
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | no |
BC breaks? | yes |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | |
License | MIT |
Doc PR |
don't forget to replace the |
87bc4c8
to
b8b793e
Compare
b8b793e
to
a1c87c6
Compare
// BC to be removed in 4.0 | ||
if (null === $this->filesystem) { | ||
$this->filesystem = $this->getContainer()->get('filesystem'); | ||
$baseDir = $this->getContainer()->getParameter('kernel.project_dir'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isset($baseDir)
below can be removed
// BC to be removed in 4.0 | ||
if (null === $this->poolClearer) { | ||
$this->poolClearer = $this->getContainer()->get('cache.global_clearer'); | ||
$cacheDir = $this->getContainer()->getParameter('kernel.cache_dir'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, isset($cacheDir) below can be removed
// BC to be removed in 4.0 | ||
if (null === $this->cacheWarmer) { | ||
$this->cacheWarmer = $this->getContainer()->get('cache_warmer'); | ||
$cacheDir = $this->getContainer()->getParameter('kernel.cache_dir'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same :)
a1c87c6
to
ffbf72c
Compare
See also Xliff/YamlLintCommand btw |
ffbf72c
to
536e51e
Compare
536e51e
to
c9ff029
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few CHANGELOG notices would be great
src/Symfony/Bundle/SecurityBundle/CHANGELOG.md especially is now incomplete
@@ -26,7 +27,7 @@ | |||
* | |||
* @final since version 3.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it become final for real too ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
letting it @final
is valid and I think the use case of adding extra info to the about
output is too in fact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there is a use case for extending it and we want to support this use case, we must remove @final
, to allow extending.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@final
is telling the intention to external users - extending internally is not an issue to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#23624 (comment) it's done for allowing proxiex/mocks solely.
extending internally is not an issue to me
For most commands i dont see it happen, yet we made containerdebug internal because of this :) and commands in components/bridges are also not marked final.
Last, some commands were already final for real.
$kernel = $this->getApplication()->getKernel(); | ||
$targetArg = rtrim($input->getArgument('target'), '/'); | ||
|
||
if (!is_dir($targetArg)) { | ||
$targetArg = (isset($baseDir) ? $baseDir : $kernel->getContainer()->getParameter('kernel.project_dir')).'/'.$targetArg; | ||
$targetArg = $kernel->getContainer()->getParameter('kernel.project_dir').'/'.$targetArg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could also inject the project_dir in the command instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we reached consensus to use getParameter from the kernel container for cache_dir, project_dir etc. It can be an optional constructor arg.. thats a new feature to me.
Thank you @xabbuh. |
…move deprecated code (xabbuh) This PR was merged into the 4.0-dev branch. Discussion ---------- [FrameworkBundle][SecurityBundle][TwigBundle][Yaml] remove deprecated code | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- c9ff029 remove deprecated code