-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] deprecate MergeDoctrineCollectionListener::onBind()
#18069
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
[DoctrineBridge] deprecate MergeDoctrineCollectionListener::onBind()
#18069
Conversation
HeahDude
commented
Mar 9, 2016
Q | A |
---|---|
Branch | master |
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | yes |
Tests pass? | yes |
Fixed tickets | n/a |
License | MIT |
Doc PR | - |
But this is a BC break, isn't it? The listener will not execute the <?php
class MyMergeDoctrineCollectionListener extends MergeDoctrineCollectionListener
{
public function onBind()
{
// my own implementation
}
} |
@dosten Indeed. Have to keep the old method in the |
28dbfe4
to
2819bfd
Compare
Ok now 37cdb80 fixes the BC break and adds some tests. |
2819bfd
to
37cdb80
Compare
37cdb80
to
6eb3873
Compare
What's the status of this one ? |
{ | ||
// If onBind() is overridden then logic has been executed | ||
if ($this->bc) { |
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.
Not sure if that is sufficient. Someone who overrode the onBind()
method will likely also have added a call to parent::onBind()
.
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.
Nice catch! Thanks, now fixed by https://github.com/symfony/symfony/pull/18069/files#diff-0bab777c646233bc954aa7792bc59d30R73
6eb3873
to
2e4fdfe
Compare
*/ | ||
public function onBind() | ||
{ | ||
if (self::class === __CLASS__) { |
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.
this will always be true, as self::class
does not use late static binding
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 could use get_class($this)
then.
2e4fdfe
to
08a7a09
Compare
@stof Fixed, thanks. |
ping :) |
* added "{{ value }}" message placeholder to UniqueEntityValidator | ||
* added "{{ value }}" message placeholder to UniqueEntityValidator | ||
* deprecated `MergeDoctrineCollectionListener::onBind` in favor of | ||
`MergeDoctrineListener::onSubmit` |
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 be MergeDoctrineCollectionListener::onSubmit
?
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.
Nice catch!
Apart from the typo, 👍 |
08a7a09
to
ad08b95
Compare
Fixed! Thanks. |
Thank you @HeahDude. |
…tener::onBind()` (HeahDude) This PR was merged into the 3.1-dev branch. Discussion ---------- [DoctrineBridge] deprecate `MergeDoctrineCollectionListener::onBind()` | Q | A | ------------- | --- | Branch | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | - Commits ------- ad08b95 [DoctrineBridge] deprecated `MergeDoctrineCollectionListener::onBind()`
This PR was merged into the 3.1-dev branch. Discussion ---------- [DoctrineBridge] Fixed bc layer after #18069 | Q | A | ------------- | --- | Branch? | master | Bug fix? | BC break | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ Commits ------- 8a6cf9d [DoctrineBridge] fixed bc layer from #18069