sonata-project / SonataBlockBundle

Symfony SonataBlockBundle
https://docs.sonata-project.org/projects/SonataBlockBundle
MIT License
413 stars 142 forks source link

Problem to use the last version 4.17 #1106

Closed eerison closed 2 years ago

eerison commented 2 years ago

Hey @jordisala1991 have you faced something like this when you are running composer update

PHP Fatal error:  Declaration of Sonata\BlockBundle\Model\BaseBlock::setSetting(string $name, $value): void must be compatible with Sonata\BlockBundle\Block\BlockContextInterface::setSetting(string $name, $value): Sonata\BlockBundle\Block\BlockContextInterface in /usr/src/app/vendor/sonata-project/block-bundle/src/Model/BaseBlock.php on line 127

it's my current dependencies

bash-5.1# composer info sonata-project/*
sonata-project/admin-bundle              4.18.0          The missing Symfony Admin Generator
sonata-project/block-bundle              4.17.0          Symfony SonataBlockBundle
sonata-project/cache                     2.2.0           Cache library
sonata-project/cache-bundle              3.4.0           This bundle provides caching services
sonata-project/classification-bundle     4.3.0           Symfony SonataClassificationBundle
sonata-project/datagrid-bundle           3.5.0           Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       2.0.1           Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 4.7.0           Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter                  3.0.0           Lightweight Exporter library
sonata-project/form-extensions           1.18.0          Symfony form extensions
sonata-project/media-bundle              4.5.1           Symfony SonataMediaBundle
sonata-project/page-bundle               4.x-dev 038b7b4 This bundle provides a Site and Page management through container and block services
sonata-project/seo-bundle                3.2.0           Symfony SonataSeoBundle
sonata-project/twig-extensions           2.0.0           Sonata twig extensions
sonata-project/user-bundle               5.3.3           Symfony SonataUserBundle
VincentLanglet commented 2 years ago

Base block only implements BlockInterface https://github.com/sonata-project/SonataBlockBundle/blob/4.x/src/Model/BaseBlock.php#L21

eerison commented 2 years ago

I guess it's related with something in the project, Because other project is using block bundle 4.17 and it's working, if it's necessary I can reopen this again, with more informations!