Closed marvoh closed 3 years ago
Can you paste the output of composer show sonata-project/*
(as the issue template suggests)?
I seem to be experiencing this issue as well.
In my environment, these are the versions I currently have:
$ composer show sonata-project/*
sonata-project/admin-bundle 4.0.0-alpha-2 The missing Symfony Admin Generator
sonata-project/block-bundle 4.7.0 Symfony SonataBlockBundle
sonata-project/cache 2.2.0 Cache library
sonata-project/doctrine-extensions 1.13.1 Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 4.0.0 Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter 2.7.0 Lightweight Exporter library
sonata-project/form-extensions 1.9.0 Symfony form extensions
sonata-project/twig-extensions 1.8.0 Sonata twig extensions
The project that I am working on happens to be Symfony 5.2, which is probably related. In my composer.json file I only had the "sonata-project/doctrine-orm-admin-bundle": "^4.0"
line and it installed the admin bundle 4.0.0-alpha-2
version.
When I attempted to install the admin bundle as well with a dev version with composer require sonata-project/admin-bundle ">4.0.0"
, it showed the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- sonata-project/admin-bundle 5.x-dev requires symfony/asset ^4.4 || ^5.3 -> no matching package found.
- sonata-project/admin-bundle dev-master requires symfony/asset ^4.4 || ^5.3 -> no matching package found.
- sonata-project/admin-bundle 4.x-dev requires symfony/asset ^4.4 || ^5.3 -> no matching package found.
- Installation request for sonata-project/admin-bundle >4.0.0 -> satisfiable by sonata-project/admin-bundle[4.x-dev, dev-master, 5.x-dev].
Looking at the admin bundle composer.json files, it looks like 4.0.0-alpha-2
allowed Symfony 5.2 (i.e. "symfony/asset": "^4.4 || ^5.2",
) and was updated in 4.0.0-rc.1
to allow Symfony 5.3 (i.e. "symfony/asset": "^4.4 || ^5.3",
). And from what I can tell, the \Sonata\AdminBundle\Search\ChainableFilterInterface
was introduced in the 4.0.0-rc.1
version.
@wluijt-endertech yes Symfony 5.2 is not maintained anymore and thus also not supported in the stable v4 of this bundle. So you should first upgrade to Symfony 5.3 and then to the stable releases 4.0.0 for sonata-project/admin-bundle
and sonata-project/doctrine-orm-admin-bundle
.
Thank you, upgrading to Symfony 5.3 fixed the issue
I have the same in my code.
Did you find a way around?
Sent from ProtonMail mobile
-------- Original Message -------- On 16 Sep 2021, 9:05 pm, David Maicher wrote:
@.***(https://github.com/wluijt-endertech) yes Symfony 5.2 is not maintained anymore and thus also not supported in the stable v4 of this bundle. So you should first upgrade to Symfony 5.3 and then to the stable releases 4.0.0 for sonata-project/admin-bundle and sonata-project/doctrine-orm-admin-bundle.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
I'm trying to install AdminBundle and use it with DoctrineORMBundle but cannot get it to work because the package doesn't seem to contain all required files.
composer require sonata-project/admin-bundle
installs"sonata-project/admin-bundle": "^4.0"
correctly without a problem.Installation of
composer require sonata-project/doctrine-orm-admin-bundle
installs but post-install scripts fail with the error below:Class "Sonata\AdminBundle\Search\ChainableFilterInterface" not found while loading "Sonata\DoctrineORMAdminBundle\Filter\BooleanFilter".
A peek into the Sonata\AdminBundle\Search\ChainableFilterInterface directory reveals the contents as only consisting of SearchHandler.php only while looking at the branch on Git, ChainableFilterInterface exists in the directory together with more files.
Anyone have an idea what the matter could be?