flat3 / lodata

The OData v4.01 Producer for Laravel
https://lodata.io/
MIT License
80 stars 27 forks source link

Unable to install lodata into Laravel 11 #813

Closed mgerzabek closed 7 months ago

mgerzabek commented 7 months ago

Hi @27pchrisl !

Look's like Friday is lodata day ;-)

I started a new project with Laravel 11 but failed to require the latest lodata release with composer require flat3/lodata. Also composer require flat3/lodata:5.33.4 failed.

./composer.json has been updated
Running composer update flat3/lodata
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 flat3/lodata 5.33.4 -> satisfiable by flat3/lodata[v5.33.4].
    - carbonphp/carbon-doctrine-types 3.2.0 conflicts with doctrine/dbal 3.8.3.
    - flat3/lodata v5.33.4 requires doctrine/dbal ^3 -> satisfiable by doctrine/dbal[3.0.0, ..., 3.8.3].
    - nesbot/carbon 3.2.4 requires carbonphp/carbon-doctrine-types * -> satisfiable by carbonphp/carbon-doctrine-types[3.2.0].
    - symfony/http-foundation v7.0.6 conflicts with doctrine/dbal 3.5.4.
    - symfony/http-foundation v7.0.6 conflicts with doctrine/dbal 3.4.6.
    - symfony/http-foundation v7.0.6 conflicts with doctrine/dbal 3.3.8.
    - symfony/http-foundation v7.0.6 conflicts with doctrine/dbal 3.3.5.
    - symfony/http-foundation v7.0.6 conflicts with doctrine/dbal 3.2.2.
    - symfony/http-foundation v7.0.6 conflicts with doctrine/dbal 3.1.5.
    - symfony/http-foundation v7.0.6 conflicts with doctrine/dbal 3.1.0.
    - symfony/http-foundation v7.0.6 conflicts with doctrine/dbal 3.0.0.
    - laravel/framework v11.4.0 requires nesbot/carbon ^2.72.2|^3.0 -> satisfiable by nesbot/carbon[3.2.4].
    - laravel/framework v11.4.0 requires symfony/http-foundation ^7.0 -> satisfiable by symfony/http-foundation[v7.0.6].
    - laravel/framework is locked to version v11.4.0 and an update of this package was not requested.

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

What can I do to make this work?

27pchrisl commented 7 months ago

That is weird, and might be a composer bug or a limitation of its ability to find a set of packages that can be installed together.

Long story short, if you do composer require carbonphp/carbon-doctrine-types:2.0.0 first, followed by composer require flat3/lodata then it'll work.

The line - nesbot/carbon 3.2.4 requires carbonphp/carbon-doctrine-types * -> satisfiable by carbonphp/carbon-doctrine-types[3.2.0]. shows that the requirement is satisfiable by carbonphp/carbon-doctrine-types 3.2.0, but it's also satisfiable by 2.0.0 which the whole chain supports but it doesn't try this version.

mgerzabek commented 7 months ago

As ever, awesome answer in record time! Thank's a lot!!!