meilisearch-symfony icon indicating copy to clipboard operation
meilisearch-symfony copied to clipboard

Symfony 6.0.9 and PHP 8.1.0 -> can't composer install meilisearch/search-bundle

Open shevabam opened this issue 2 years ago • 4 comments

Hello 👋

I'm using Symfony 6.0.9 with PHP 8.1.0. When I run composer install meilisearch/search-bundle, I get these errors:

Using version ^0.7.2 for meilisearch/search-bundle
./composer.json has been updated
Running composer update meilisearch/search-bundle
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - illuminate/contracts[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.1.0) does not satisfy that requirement.
    - illuminate/contracts[v8.12.0, ..., v8.83.16] require psr/container ^1.0 -> found psr/container[1.0.0, 1.1.0, 1.1.1, 1.1.2] but the package is fixed to 2.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - meilisearch/search-bundle v0.7.2 requires illuminate/collections ^8.47 -> satisfiable by illuminate/collections[v8.47.0, ..., v8.83.16].
    - illuminate/collections[v8.47.0, ..., v8.83.16] require illuminate/contracts ^8.0 -> satisfiable by illuminate/contracts[v8.0.0, ..., v8.83.16].
    - Root composer.json requires meilisearch/search-bundle ^0.7.2 -> satisfiable by meilisearch/search-bundle[v0.7.2].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require meilisearch/search-bundle:*" to figure out if any version is installable, or "composer require meilisearch/search-bundle:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

From what I understand, meilisearch/search-bundle is not (yet) compatible with PHP 8.1 but [with version 8.0](https://github.com/meilisearch/meilisearch-symfony/blob/main/composer .json#L21).

Are there plans to make meilisearch/search-bundle compatible on PHP 8.1?

Thanks !

shevabam avatar Jun 16 '22 14:06 shevabam

I'm running 0.7.2 with PHP 8.1 in development. So it should work.

illuminate/collections    v8.83.17
illuminate/contracts      v8.83.17
illuminate/macroable      v8.83.17

Edit: I'd love if we'd get rid of the illuminate things as these are blocking psr/container to go beyond v1 and this is blocking symfony/service-contracts to go beyond v2.

althaus avatar Jun 21 '22 14:06 althaus

Hi, @shevabam like @althaus said it is supposed to work: https://github.com/meilisearch/meilisearch-symfony/runs/6798976162?check_suite_focus=true

About your comment @althaus how we can trace a path to get rid of these dependencies, is something possible?

brunoocasali avatar Jun 23 '22 17:06 brunoocasali

@shevabam since we have ^8.0 according to the composer docs we support versions above 8.0 but lower than 9.0 :)

brunoocasali avatar Jun 23 '22 17:06 brunoocasali

About your comment @althaus how we can trace a path to get rid of these dependencies, is something possible?

Based on a quick view the collection stuff is "only" used to put some random stuff like config values into an array object class. So a way out would be, to create an own collection class mimicking the illuminate's API. Then you could deprecated all methods not required by this bundle.

althaus avatar Jun 27 '22 12:06 althaus