-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
blanchonvincent
wants to merge
6
commits into
symfony:master
from
blanchonvincent:improve-class-inheritance
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a5e73b6
Remove abstract class and use Interface+Trait
blanchonvincent 603f617
Add doc
blanchonvincent cdd5e3e
merge master & remove deprecated notice
blanchonvincent ae49212
remove useless files from versioning
blanchonvincent e2eb0de
remove useless files from versioning
blanchonvincent 25a952e
fix CS
blanchonvincent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add doc
- Loading branch information
commit 603f617471fd8c9a0d37e49acebd3b6f2954f512
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
CHANGELOG | ||
========= | ||
|
||
2.7.0 | ||
----- | ||
|
||
* deprecated ContainerAware class | ||
|
||
2.6.0 | ||
----- | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It could not be deprecacted at version 2.7 because Symfony till support php 5.3 in branch 2.x
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.
@jeremy-derusse right … sometime I forgot this point because I work everyday with php5.5+ … so I guess I can close this PR :/
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.
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
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.
@jeremy-derusse if it is deprecated in 3.0, it cannot be removed in 3.0
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.
@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.
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.
please don't duplicate classes
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.
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)
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.
I don't see the need to deprecated this class, even if we introduce the trait.
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.
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.
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.
I agree @Tobion