User tests: Successful: Unsuccessful:
Pull Request for Issue # .
The PR changes pre-processing methods from setFobar to onSetFoobar for existing event classes.
This is follow up for
The PR can be merged only when that PR is accepted and merged.
Code review.
Make sure all works as before.
Please select:
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Labels |
Added:
PR-4.4-dev
|
It is there
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-09-20 16:13:55 |
Closed_By | ⇒ | HLeithner |
Should the calls not be vice versa? That the deprecated method is calling the new one?
When method onSetFoobar exists it will be called first and then fallback to setFoobar for b/c.
If we do deprecated method is calling the new one, then deprecated method will be never called
I mean should the code not be like:
public function setUser(User $value): User
{
return $this->onSetUser($value);
}
protected function onSetUser(User $value): User
{
return $value;
}
Normally you deprecate a function and then in the function you forward to the new one. But perhaps I miss here something.
But perhaps I miss here something.
This:
When method onSetFoobar exists it will be called first
in your example setUser
will never be called. Because onSetUser
exists, and will be called first.
Ok, don't have time to dig here deeper. I guess you know what you are doing. Looks all a bit contrary to what we do normally when we deprecate stuff, that's why I commented here.
pretty sure we need documentation here and for the other pr, especially for the deprecated stuff