This repository was archived by the owner on Sep 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Dependencies resolving to an incompatible set (out of sync interfaces) #301
Copy link
Copy link
Closed
Description
Environment
Upgrading a CMF application from Symfony 2.8 top 3.4.
Sonata packages
$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle 3.45.2 3.45.2 The missing Symfony Admin Generator
sonata-project/block-bundle 3.14.0 3.15.0 Symfony SonataBlockBundle
sonata-project/cache 2.0.1 2.0.1 Cache library
sonata-project/cache-bundle 3.0.1 3.0.1 This bundle provides caching services
sonata-project/core-bundle 3.16.1 3.16.1 Symfony SonataCoreBundle
sonata-project/datagrid-bundle 2.4.0 2.4.0 Symfony SonataDatagridBundle
sonata-project/doctrine-extensions 1.1.5 1.1.5 Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.8.3 3.8.3 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/doctrine-phpcr-admin-bundle 2.2.0 2.2.0 Symfony Sonata / Integrate Doctrine PHPCR into the SonataAdminBundle
sonata-project/exporter 2.0.1 2.0.1 Lightweight Exporter library
sonata-project/formatter-bundle 4.1.2 4.1.2 Symfony SonataFormatterBundle
sonata-project/jquery-bundle 1.10.2 1.10.2 Symfony SonatajQueryBundle
Package sonata-project/jquery-bundle is abandoned, you should avoid using it. No replacement was suggested.
sonata-project/seo-bundle 2.7.0 2.7.0 Symfony SonataSeoBundle
Symfony packages
$ composer show --latest 'symfony/*'
symfony/assetic-bundle v2.8.2 v2.8.2 Integrates Assetic into Symfony2
Package symfony/assetic-bundle is abandoned, you should avoid using it. Use symfony/webpack-encore-pack instead.
symfony/monolog-bundle v3.3.1 v3.3.1 Symfony MonologBundle
symfony/phpunit-bridge v3.4.22 v4.2.4 Symfony PHPUnit Bridge
symfony/polyfill-apcu v1.10.0 v1.10.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-ctype v1.10.0 v1.10.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-icu v1.10.0 v1.10.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring v1.10.0 v1.10.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56 v1.10.0 v1.10.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70 v1.10.0 v1.10.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util v1.10.0 v1.10.0 Symfony utilities for portability of PHP codes
symfony/security-acl v3.0.1 v3.0.1 Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.7 v3.2.5 Symfony SwiftmailerBundle
symfony/symfony v3.4.22 v4.2.4 The Symfony PHP framework
PHP version
$ php -v
PHP 7.2.14-1+ubuntu16.04.1+deb.sury.org+1
Subject
With the given set of dependencies properly installed via composer, I get a mismatch on the Sonata\Cache\CacheAdapterInterface
interface - which does not belong to this project, but the dependencies resolution allowed it to be installed along, which I believe should be fixed upon this bug report.
Steps to reproduce
Installing a Symfony 3.4 application and requesting all the packages listed above, ended up with a mismatch on the sonata/cache
package version that added a BC by changing such interface.
Expected results
Should either install a locked/earlier version, or just conflict and say that it cannot install due to conflicting versions.
Actual results
$ php bin/console debug:container -vvv
PHP Fatal error: Declaration of Symfony\Cmf\Bundle\BlockBundle\Cache\BlockJsCache::get(array $keys) must be compatible with Sonata\Cache\CacheAdapterInterface::get(array $keys
): Sonata\Cache\CacheElementInterface in /var/www/sms_new_site/current/vendor/symfony-cmf/block-bundle/src/Cache/BlockJsCache.php on line 26
In BlockJsCache.php line 26:
[Symfony\Component\Debug\Exception\FatalErrorException]
Compile Error: Declaration of Symfony\Cmf\Bundle\BlockBundle\Cache\BlockJsCache::get(array $keys) must be compatible with Sonata\Cache\CacheAdapterInterface::get(array $ke
ys): Sonata\Cache\CacheElementInterface
Metadata
Metadata
Assignees
Labels
No labels