-
-
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
[Twig] Split SonataAdminExtension #6676
[Twig] Split SonataAdminExtension #6676
Conversation
Could you please rebase your PR and fix merge conflicts? |
@tambait Hi ! Thanks for taking this issue. Our policy is to do as much as possible on 3.x branch, and in this case you can. You should
Then in master we remove the deprecated methods. :) |
7a0e283
to
2c83e6c
Compare
Could you please rebase your PR and fix merge conflicts? |
Thanks for reminding. I had this morning idea to work/merge on 3.x but diverged from it somehow :) What about config file, |
You can declare new extension on 3.x, and add NEXT_MAJOR comment to remove the extra param from the constructor. |
2c83e6c
to
1481876
Compare
64d50db
to
5ab3340
Compare
@VincentLanglet can you please help with this :) I have a series of similar errors in tests most pointing to the same lines in
I initially wasn't sure why this happens because I didn't see that tested metods are calling any of the methods I'm deprecating but then I realized that errors are caused because I've added
[...]
//NEXT_MAJOR remove this filter
new TwigFilter(
'sonata_xeditable_choices',
[$this, 'getXEditableChoices']
),
[ ...]
public function getXEditableChoices(FieldDescriptionInterface $fieldDescription)
{
if ('sonata_deprecation_mute' !== \func_get_args()[1] ?? null) {
@trigger_error(sprintf(
'The %s method is deprecated in favor of XEditableExtension::getXEditableChoices since version 3.x
and will be removed in 4.0.',
__METHOD__
), E_USER_DEPRECATED);
}
[...]
} Should I remove |
@tambait Didn't read everything but
instead of
I'll make a review later |
b6f3b00
to
5131f13
Compare
f99fd95
to
c05d7f2
Compare
About the constructor, I don't know if we can just make it One way to avoid BC break I guess would be if the public function isGrantedAffirmative($role, $object = null, $field = null)
{
if (null === $this->securityExtension) {
$this->securityExtension = new SecurityExtension($this->securityChecker);
}
return $this->securityExtension->isGrantedAffirmative($role, $object, $field);
} |
e708351
to
9d50602
Compare
7c07b19
to
0ede293
Compare
0ede293
to
5dd14b7
Compare
52dfc05
to
21fbab7
Compare
21fbab7
to
0d544ba
Compare
I fixed some tests some days ago, now it's rebased and added an upgrade note. I think it's ready for review. |
Is it ok for you @core23 ? |
Thanks @tambait |
Subject
I am targeting this branch, because BC.
Closes #6639.
Changelog