-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[3.x] Add deprecation notices related to validate methods #6618
[3.x] Add deprecation notices related to validate methods #6618
Conversation
2d473ff
to
9855909
Compare
ca84630
to
71f528b
Compare
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.
Can you add consign for the master branch ?
We generally add NEXT_MAJOR
comment for this.
For instance
/**
* Attach the inline validator to the model metadata, this must be done once per admin.
*
* NEXT_MAJOR: Remove this method.
*
* @deprecated since sonata-admin/admin-bundle 3.81
*/
protected function attachInlineValidator()
Same can be done for validate, prevalidate, ... (all the methods you're deprecating).
And then, I think the PR will be ready.
71f528b
to
3b7787f
Compare
Thanks. I wanted to ask about |
5a8407e
to
f6d2e82
Compare
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.
You should also deprecate AbstractAdmin::validate
And AbstractAdmin::preValidate I think (and remove it from LifecycleHookProviderInterface.)
2419837
to
217caa5
Compare
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.
The phpstan errors are normal ; I recommend to ignore them with a @phpstan-ignore-next-line
217caa5
to
49e2af4
Compare
Thanks tambait |
They were missing in sonata-project#6618 and also the deprecated version has been set to 3.x since there has not been a release yet.
Thanks. Does it make sense to list both method specification and implementation when they are in different classes like I did? |
Thanks, I think it does, for some reason we can remove a method from the specification but leave it in the implementation, I prefer being explicit. |
They were missing in #6618 and also the deprecated version has been set to 3.x since there has not been a release yet.
Subject
I am targeting this branch, because BC.
Closes #6233
Changelog