-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
imagine_filter causing problems when LiipImagineBundle is not enabled #3762
Comments
I've seen this too. It happened for me when an image field had no value. This can be solved (dirtily) in the template by checking whether the field formattedValue is not empty), though I guess the best option would be in code, not to call the template when there's no image value |
javiereguiluz
added a commit
that referenced
this issue
Jun 22, 2023
This PR was squashed before being merged into the 4.x branch. Discussion ---------- [Chore] Fix phpstan issues This PR will fix several `PHPStan` issues: - [x] Fix `Cannot unset offset string on array<int, EasyCorp\Bundle\EasyAdminBundle\Dto\ActionDto>.` - [x] Fix `Variable method call on Twig\Extension\RuntimeExtensionInterface.` - [x] Refactor `EasyAdminTwigExtension::applyFilterIfExists` - [x] Add integration tests for `applyFilterIfExists`. Issues #3762 and #4808 have been taken into consideration. - [x] Update parameter type declaration of `Action::new`. We can't use ``@var`` to annotate a parameter. See: https://phpstan.org/r/7695e922-db7f-42b3-ac4f-8ff65a8a37b9 - [x] Modify incorrect PHPDoc. See: https://phpstan.org/r/df4eb1c2-7286-4aa7-b276-f36ff2c0c82c These issues are a little bit tricky. Both `TranslatableMessageBuilder::withParameters` and `TranslatableChoiceMessage::__toString` are not compatible with `TranslatableInterface`. Those functions should depend on `TranslatableMessage`. ```txt ------ ----------------------------------------------------------------------- Line Field/Configurator/ChoiceConfigurator.php ------ ----------------------------------------------------------------------- 124 Parameter #1 $message of class EasyCorp\Bundle\EasyAdminBundle\Translation\TranslatableChoiceMessage constructor expects Symfony\Component\Translation\TranslatableMessage, Symfony\Contracts\Translation\TranslatableInterface given. ------ ----------------------------------------------------------------------- ------ ----------------------------------------------------------------------- Line Translation/TranslatableMessageBuilder.php ------ ----------------------------------------------------------------------- 28 Call to an undefined method Symfony\Contracts\Translation\TranslatableInterface::getMessage(). 29 Call to an undefined method Symfony\Contracts\Translation\TranslatableInterface::getParameters(). 30 Call to an undefined method Symfony\Contracts\Translation\TranslatableInterface::getDomain(). ------ ----------------------------------------------------------------------- ``` Commits ------- 053f62c [Chore] Fix phpstan issues
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@javiereguiluz
i have not vichuploader and after this merge i get an error
Unknown "imagine_filter" filter. in /easyadmin-bundle/src/Resources/views/crud/form_theme.html.twig (line 271)
Originally posted by @versh23 in #3726 (comment)
The text was updated successfully, but these errors were encountered: