-
-
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
Fix Symfony 3 support in datagrid filter (and another bug) #3709
Conversation
Please remember, that we support symfony 2.3 too. Please leave us some more information which "other bug" are you fixing? |
Though SonataCoreBundle, Symfony 2.3 is still supported by these changes. Other bug is the second commit: "Fix case where showtabs if false (default)" |
@@ -126,15 +126,15 @@ public function buildPager() | |||
$this->formBuilder->add($filter->getFormName(), $type, $options); | |||
} | |||
|
|||
$this->formBuilder->add('_sort_by', 'hidden'); | |||
$this->formBuilder->add('_sort_by', 'Symfony\Component\Form\Extension\Core\Type\HiddenType'); |
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 only works with symfony 3.
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 doesn't, take a look at the FormHelper and the DependencyInjectionExtension in the CoreBundle
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.
@wouterj Stop me if I didn't understand but $this->formBuilder
is a Symfony FormBuilderInterface
instance.
And this instance does not accept class on SF 2.3
AFAIK.
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.
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, tests proof that this is working in Symfony 2.3.
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 is recent. Could I see the code part handling 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.
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 couldn't make it work with symfony 2.7.11:
Could not load type "Symfony\Component\Form\Extension\Core\Type\HiddenType"
If I understand well, it would be 'hidden' instead of 'Symfony\Component\Form\Extension\Core\Type\HiddenType' and add a mapping in Sonata\AdminBundle\SonataAdminBundle for 3.x compatibility.
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.
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.
see #3753
Can you please fixup the 2 last commits into the first one ? |
@greg0ire done |
This should be tagged as minor, and LGTM |
@greg0ire This is just compatibility fix. It's a patch. :-) |
Indeed, my bad. |
Well, 2.4 (and master) isn't released. I definitely think releasing 2.4 for this bundle is important. However, given that this bug existed in master, I don't think you can call master stable. |
Maybe we should make a release candidate then. |
👍 |
ping @OskarStark @core23 |
LGTM |
My previously merged change turned out to not fix, but break the admin panel. While there can be no garantee that this commit "fixes" anything instead of breaking it, the change of getting a working admin panel will be significantly increased after this PR. This because it reverts things back to the state they were for the past 5 years (without any bug report about it being broken).
My previously merged change turned out to not fix, but break the admin panel. While there can be no garantee that this commit "fixes" anything instead of breaking it, the change of getting a working admin panel will be significantly increased after this PR. This because it reverts things back to the state they were for the past 5 years (without any bug report about it being broken).
My previously merged change turned out to not fix, but break the admin panel. While there can be no garantee that this commit "fixes" anything instead of breaking it, the change of getting a working admin panel will be significantly increased after this PR. This because it reverts things back to the state they were for the past 5 years (without any bug report about it being broken).
No description provided.