Closed fzberlin23 closed 1 year ago
confirm, same error. updated PagerfantaBundle to the latest 3.x - did not help symfony 4.4, php 7.4, elasticsearch 7
Confirmed it happens also upgrading from 5.1 to 6.3. It seems that the issue appeared when switching this requirement in 6.3: pagerfanta/pagerfanta: ^2.4 || ^3.0 for this one pagerfanta/core: ^2.4 || ^3.0
I discovered this workaround:
composer require pagerfanta/pagerfanta:^2.4 -W
You can install whichever adapters your application will need using the list at https://www.babdev.com/open-source/packages/pagerfanta/docs/3.x/installation
The PagerfantaBundle stopped installing the pagerfanta/pagerfanta
mono-package with 3.0 and I'm generally encouraging folks to rely on the subsplit packages over the full mono-package (as installing the mono-package brings in a lot of unused code and has a much more complex dependency graph for Composer to deal with compared to the individual packages).
@mbabker You are certainly right, but perhaps we should restore the pagerfanta/pagerfanta
dependency for BC reason, and make the split in the next major release?
Personally, I don't consider #1895 a B/C issue because the root cause is an application relying on transient dependencies.
That said, however, because this bundle isn't checking optional dependencies (as pointed out in https://github.com/FriendsOfSymfony/FOSElasticaBundle/pull/1912#issuecomment-1564477433 the doctrine/orm
integration is optional yet FOS\ElasticaBundle\Doctrine\ORMPagerProvider
has no safeguards to make sure its dependencies are met), the "safest" option for this bundle is to revert to requiring the mono-package, which will at least ensure all classes in Pagerfanta are always installed for now. Then in future versions, there should be safeguards added at compile-time and runtime to make sure folks aren't configuring things that can't be used (i.e. a check in FOSElasticaExtension::loadIndexPagerProvider()
to make sure the needed Doctrine managers are installed for the configured providers or a class_exists()
check in the pager provider classes for Pagerfanta adapters) and making sure that all of the optional integrations and their dependencies are documented (i.e. to use the ORM provider install doctrine/orm doctrine/doctrine-bundle pagerfanta/doctrine-orm-adapter
).
Hi,
today i updated friendsofsymfony/elastica-bundle (v6.2.0 => v6.3.0).
When i run
php app/console fos:elastica:populate
in my symfony application i get:It seems that in ORMPagerProvider.php line 79 the class
QueryAdapter
is used. But this class does not exist anymore (it existed in pagerfanta/pagerfanta, which was removed).Does anyone have the same problem? Thank you very much.