Skip to content

Remove abstract class and use Interface+Trait #12595

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add doc
  • Loading branch information
blanchonvincent committed Nov 28, 2014
commit 603f617471fd8c9a0d37e49acebd3b6f2954f512
5 changes: 5 additions & 0 deletions src/Symfony/Component/DependencyInjection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

2.7.0
-----

* deprecated ContainerAware class

2.6.0
-----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @api
*
* @deprecated Deprecated since version 2.7, to be removed in 3.0. Use the trait ContainerAwareTrait instead.
* @deprecated Deprecated since version 2.7, to be removed in 3.0. Use ContainerAwareTrait with ContainerAwareInterface instead.
Copy link
Member

Choose a reason for hiding this comment

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

It could not be deprecacted at version 2.7 because Symfony till support php 5.3 in branch 2.x

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeremy-derusse right … sometime I forgot this point because I work everyday with php5.5+ … so I guess I can close this PR :/

Copy link
Member

Choose a reason for hiding this comment

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

No, you can keep it, because branch master refers to Symfony 3.0 who requires php>=5.5 (see http://symfony.com/blog/symfony-3-0-the-roadmap).
Just annotate that the method is deprecated since version 3.0

Copy link
Member

Choose a reason for hiding this comment

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

@jeremy-derusse if it is deprecated in 3.0, it cannot be removed in 3.0

Copy link
Member

Choose a reason for hiding this comment

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

@stof given this feature is introduce in version 3.0 we have to deprecate the removal of ContainerAware in version 3.0 which will be removed in version 4.0.

If you deprecate this class in 2.7 it will generate deprecated logs for everyone (who use ContainerAware or one of the 11 child class) without ways to remove it.

Copy link
Member

Choose a reason for hiding this comment

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

please don't duplicate classes

Copy link
Member

Choose a reason for hiding this comment

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

btw, for all these classes, it does not make sense to duplicate them. It would not allow people to extend from something else than ContainerAware (it would require changing the Symfony code for this)

Copy link
Member

Choose a reason for hiding this comment

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

I don't see the need to deprecated this class, even if we introduce the trait.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think deprecating things for which better alternatives have been found is a good thing. In the long run having many ways to do things will confuse people, complicate documentation etc. If this one is deprecated, people will see themselves what the recommended approach is. Just think about all the different syntaxes to reference resources in symfony and the confusion and long-standing issue because of that.

Copy link
Member

Choose a reason for hiding this comment

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

I agree @Tobion

*/
abstract class ContainerAware implements ContainerAwareInterface
{
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy