Skip to content

[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

Merged
merged 1 commit into from
Aug 16, 2017

Conversation

xabbuh
Copy link
Member

@xabbuh 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

@nicolas-grekas
Copy link
Member

don't forget to replace the extends ContainerAwareCommand also

@xabbuh xabbuh force-pushed the remove-deprecated-code branch from 87bc4c8 to b8b793e Compare August 7, 2017 10:55
@xabbuh xabbuh changed the title [FrameworkBundle][TwigBundle][Yaml] remove deprecated code [FrameworkBundle][SecurityBundle][TwigBundle][Yaml] remove deprecated code Aug 7, 2017
@xabbuh xabbuh force-pushed the remove-deprecated-code branch from b8b793e to a1c87c6 Compare August 7, 2017 11:09
// BC to be removed in 4.0
if (null === $this->filesystem) {
$this->filesystem = $this->getContainer()->get('filesystem');
$baseDir = $this->getContainer()->getParameter('kernel.project_dir');
Copy link
Contributor

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');
Copy link
Contributor

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');
Copy link
Contributor

Choose a reason for hiding this comment

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

same :)

@xabbuh xabbuh force-pushed the remove-deprecated-code branch from a1c87c6 to ffbf72c Compare August 7, 2017 11:40
@ro0NL
Copy link
Contributor

ro0NL commented Aug 7, 2017

See also Xliff/YamlLintCommand btw

@xabbuh xabbuh force-pushed the remove-deprecated-code branch from ffbf72c to 536e51e Compare August 7, 2017 11:42
@xabbuh xabbuh force-pushed the remove-deprecated-code branch from 536e51e to c9ff029 Compare August 7, 2017 11:47
Copy link
Member

@nicolas-grekas nicolas-grekas left a 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
Copy link
Member

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 ?

Copy link
Member

@chalasr chalasr Aug 10, 2017

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

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor

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;
Copy link
Member

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

Copy link
Contributor

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.

#23624 (comment)

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit c9ff029 into symfony:master Aug 16, 2017
nicolas-grekas added a commit that referenced this pull request Aug 16, 2017
…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
@xabbuh xabbuh deleted the remove-deprecated-code branch August 16, 2017 16:40
@fabpot fabpot mentioned this pull request Oct 19, 2017
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.

6 participants