algolia / algoliasearch-client-php

⚡️ A fully-featured and blazing-fast PHP API client to interact with Algolia.
https://www.algolia.com/doc/api-client/php/getting-started/
MIT License
671 stars 116 forks source link

psr compatibility issue #691

Closed murethi closed 2 years ago

murethi commented 2 years ago

SDK is not compatible with PSR v3. Installing SDK requires one to downgrade from v3 to v1

Downgrading psr/log (3.0.0 => 1.1.4): Extracting archive

CedsTrash commented 2 years ago

Hi, same issue here with different versions. I'm trying to import the SDK into a Laravel 8 project which requires psr/log ^2.0 but this package requires ^1.0

it-can commented 2 years ago

Same issue

composer require algolia/algoliasearch-client-php
Using version ^3.1 for algolia/algoliasearch-client-php
./composer.json has been updated
Running composer update algolia/algoliasearch-client-php
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires algolia/algoliasearch-client-php ^3.1 -> satisfiable by algolia/algoliasearch-client-php[3.1.0].
    - algolia/algoliasearch-client-php 3.1.0 requires psr/log ^1.0 -> found psr/log[1.0.0, ..., 1.1.4] but the package is fixed to 2.0.0 (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.

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 algolia/algoliasearch-client-php:*" to figure out if any version is installable, or "composer require algolia/algoliasearch-client-php:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
StanBarrows commented 2 years ago

Same here

damcou commented 2 years ago

Fixed in https://github.com/algolia/algoliasearch-client-php/pull/696

it-can commented 2 years ago

@damcou wil there be a new version soon?

damcou commented 2 years ago

Hello @it-can ,

Sorry I don't have any ETA to provide for now but it should happen soon, once we integrate PHP8.1 check in our CI.