Code Monkey home page Code Monkey logo

Comments (2)

jbelien avatar jbelien commented on July 22, 2024

Hello @digitall-it ,

I think this is unrelated to Geocoder PHP.
Latest version of geocoder-php/google-maps-provider uses geocoder-php/common-http version ^4.0 (see https://github.com/geocoder-php/google-maps-provider/blob/master/composer.json#L16).
Latest version of geocoder-php/common-http is compatible with PHP ^8.0 (so including PHP 8.2) (see https://github.com/geocoder-php/php-common-http/blob/master/composer.json#L17).

Could you try the recommended solution by running composer require with --with-all-dependencies ?

from geocoder.

digitall-it avatar digitall-it commented on July 22, 2024

On my instance, that lead to a downgrade of a package. Allow me to redo everything on a fresh installation, just in case. I'll make sure to install and configure Sail as I always use it. From that point on, I use sail artisan and sail composer just to be sure to work in a predictable ambient.

composer create-project laravel/laravel issue-1199
cd issue-1199
composer require laravel/sail --dev
php artisan sail:install --with=mariadb,selenium,redis
./vendor/bin/sail up -d
sail composer require filament/filament:"^3.0-stable" -W

at that point my composer.json is like this:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The skeleton application for the Laravel framework.",
    "keywords": ["laravel", "framework"],
    "license": "MIT",
    "require": {
        "php": "^8.1",
        "filament/filament": "^3.0-stable",
        "guzzlehttp/guzzle": "^7.2",
        "laravel/framework": "^10.10",
        "laravel/sanctum": "^3.2",
        "laravel/tinker": "^2.8"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/pint": "^1.0",
        "laravel/sail": "^1.25",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^7.0",
        "phpunit/phpunit": "^10.1",
        "spatie/laravel-ignition": "^2.0"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "allow-plugins": {
            "pestphp/pest-plugin": true,
            "php-http/discovery": true
        }
    },
    "minimum-stability": "stable",
    "prefer-stable": true
}

so I issue

sail composer require cheesegrits/filament-google-maps "^3.0"

and receive this message

Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update cheesegrits/filament-google-maps
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - cheesegrits/filament-google-maps[v3.0.0, ..., v3.0.10] require geocoder-php/google-maps-provider ^4.7 -> satisfiable by geocoder-php/google-maps-provider[4.7.0, 4.7.1].
    - geocoder-php/google-maps-provider[4.7.0, ..., 4.7.1] require geocoder-php/common-http ^4.0 -> satisfiable by geocoder-php/common-http[4.0.0, ..., 4.5.0].
    - geocoder-php/common-http[4.0.0, ..., 4.2.0] require php ^7.0 -> your php version (8.2.10) does not satisfy that requirement.
    - geocoder-php/common-http 4.3.0 requires php ^7.2 -> your php version (8.2.10) does not satisfy that requirement.
    - geocoder-php/common-http[4.4.0, ..., 4.5.0] require psr/http-message ^1.0 -> found psr/http-message[1.0, 1.0.1, 1.1] but the package is fixed to 2.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.
    - Root composer.json requires cheesegrits/filament-google-maps ^3.0 -> satisfiable by cheesegrits/filament-google-maps[v3.0.0, ..., v3.0.10].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

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

if I then issue this

sail composer require cheesegrits/filament-google-maps "^3.0" -W

then a downgrade happens

./composer.json has been updated
Running composer update cheesegrits/filament-google-maps --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 13 installs, 1 update, 0 removals
  - Locking cheesegrits/filament-google-maps (v3.0.10)
  - Locking clue/stream-filter (v1.6.0)
  - Locking geocoder-php/common-http (4.5.0)
  - Locking geocoder-php/google-maps-provider (4.7.1)
  - Locking mastani/laravel-google-static-map (2.3)
  - Locking php-http/discovery (1.19.1)
  - Locking php-http/guzzle7-adapter (1.0.0)
  - Locking php-http/httplug (2.4.0)
  - Locking php-http/message (1.16.0)
  - Locking php-http/message-factory (1.1.0)
  - Locking php-http/promise (1.1.0)
  - Downgrading psr/http-message (2.0 => 1.1)
  - Locking spatie/guzzle-rate-limiter-middleware (2.0.1)
  - Locking willdurand/geocoder (4.6.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 13 installs, 1 update, 0 removals
  - Downloading php-http/discovery (1.19.1)
  - Downloading psr/http-message (1.1)
  - Downloading spatie/guzzle-rate-limiter-middleware (2.0.1)
  - Downloading clue/stream-filter (v1.6.0)
  - Downloading php-http/message (1.16.0)
  - Downloading php-http/promise (1.1.0)
  - Downloading php-http/httplug (2.4.0)
  - Downloading php-http/guzzle7-adapter (1.0.0)
  - Downloading mastani/laravel-google-static-map (2.3)
  - Downloading willdurand/geocoder (4.6.0)
  - Downloading php-http/message-factory (1.1.0)
  - Downloading geocoder-php/common-http (4.5.0)
  - Downloading geocoder-php/google-maps-provider (4.7.1)
  - Downloading cheesegrits/filament-google-maps (v3.0.10)
  - Installing php-http/discovery (1.19.1): Extracting archive
  - Downgrading psr/http-message (2.0 => 1.1): Extracting archive
  - Installing spatie/guzzle-rate-limiter-middleware (2.0.1): Extracting archive
  - Installing clue/stream-filter (v1.6.0): Extracting archive
  - Installing php-http/message (1.16.0): Extracting archive
  - Installing php-http/promise (1.1.0): Extracting archive
  - Installing php-http/httplug (2.4.0): Extracting archive
  - Installing php-http/guzzle7-adapter (1.0.0): Extracting archive
  - Installing mastani/laravel-google-static-map (2.3): Extracting archive
  - Installing willdurand/geocoder (4.6.0): Extracting archive
  - Installing php-http/message-factory (1.1.0): Extracting archive
  - Installing geocoder-php/common-http (4.5.0): Extracting archive
  - Installing geocoder-php/google-maps-provider (4.7.1): Extracting archive
  - Installing cheesegrits/filament-google-maps (v3.0.10): Extracting archive
3 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.  

  blade-ui-kit/blade-heroicons ................................................................................................................ DONE
  blade-ui-kit/blade-icons .................................................................................................................... DONE
  cheesegrits/filament-google-maps ............................................................................................................ DONE
  filament/actions ............................................................................................................................ DONE
  filament/filament ........................................................................................................................... DONE
  filament/forms .............................................................................................................................. DONE
  filament/infolists .......................................................................................................................... DONE
  filament/notifications ...................................................................................................................... DONE
  filament/support ............................................................................................................................ DONE
  filament/tables ............................................................................................................................. DONE
  filament/widgets ............................................................................................................................ DONE
  kirschbaum-development/eloquent-power-joins ................................................................................................. DONE
  laravel/sail ................................................................................................................................ DONE
  laravel/sanctum ............................................................................................................................. DONE
  laravel/tinker .............................................................................................................................. DONE
  livewire/livewire ........................................................................................................................... DONE
  mastani/laravel-google-static-map ........................................................................................................... DONE
  nesbot/carbon ............................................................................................................................... DONE
  nunomaduro/collision ........................................................................................................................ DONE
  nunomaduro/termwind ......................................................................................................................... DONE
  ryangjchandler/blade-capture-directive ...................................................................................................... DONE
  spatie/laravel-ignition ..................................................................................................................... DONE

98 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan vendor:publish --tag=laravel-assets --ansi --force

   INFO  No publishable resources for tag [laravel-assets].  

No security vulnerability advisories found.

the isolated downgrade follows

Downgrading psr/http-message (2.0 => 1.1)

as you can see, this happens while installing a module that has this as a requirement, called cheesegrits/filament-google-maps available here which has this requirements in the composer.json

"require": {
        "php": "^8.0",
        "spatie/laravel-package-tools": "^1.9",
        "guzzlehttp/guzzle": "^7.5",
        "geocoder-php/google-maps-provider": "^4.7",
        "php-http/guzzle7-adapter": "^1.0",
        "spatie/guzzle-rate-limiter-middleware": "^2.0",
        "php-http/message": "^1.13",
        "ryangjchandler/blade-capture-directive": "^0.3",
        "mastani/laravel-google-static-map": "^2.2",
        "laravel/prompts": "^0.1.4"
    },

ah, there it is, it is requiring php-http/message v1 instead of v2. So it is his fault after all. I'll have to open an issue there. Just posted here for the sake of fun.

from geocoder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.