Closed DavidGarciaCat closed 3 years ago
Hi @DavidGarciaCat, looks like you're using the latest changes of the stable branch instead of https://github.com/sonata-project/SonataAdminBundle/tree/master.
Based on:
sonata-project/admin-bundle dev-master 06877d7
sonata-project/block-bundle 4.5.2
sonata-project/cache 2.1.1
sonata-project/doctrine-extensions 1.12.0
sonata-project/doctrine-orm-admin-bundle dev-master 29aeea8
sonata-project/exporter 2.6.1
sonata-project/form-extensions 1.9.0
sonata-project/twig-extensions 1.5.1
The commit of sonata-project/admin-bundle
you're using is: https://github.com/sonata-project/SonataAdminBundle/commits/06877d7
and for sonata-project/doctrine-orm-admin-bundle
: https://github.com/sonata-project/SonataDoctrineORMAdminBundle/commit/29aeea8
So I guess there is something weird configured in your composer.json
.
If you see for example this file has the return type declaration in master
:
I will take a look now and update the composer.json
even setting another commit if needed.
It looks like the commit hash was wrong. After updating it and applying a few adjustments to some Admin classes, it seems to work. Thank you for your time!
Environment
Sonata packages
Symfony packages
PHP version
Subject
The following files implement (override) the
public static function getExtendedTypes()
method, which in the latest versions of Symfony seems to require theiterable
type hint:public static function getExtendedTypes(): iterable
vendor/sonata-project/admin-bundle/src/Form/Extension/Field/Type/FormTypeFieldExtension.php:188
vendor/sonata-project/admin-bundle/src/Form/Extension/Field/Type/MopaCompatibilityTypeFieldExtension.php:70
vendor/sonata-project/admin-bundle/src/Form/Extension/ChoiceTypeExtension.php:70
Minimal repository with the bug
Please check my notes above
Steps to reproduce
Just install the Symfony packages tagging
^5.2
and the latest version of Sonata Admin from thedev-master
branch as there isn't yet a tagged version.Expected results
Not getting an exception during the
composer install
orcomposer update
commands :-)Actual results
Exception referring the Sonata method must be implemented according to the extended Symfont class, which requires the
iterable
type hint.