Torann / laravel-geoip

Determine the geographical location of website visitors based on their IP addresses.
http://lyften.com/projects/laravel-geoip
BSD 2-Clause "Simplified" License
2.07k stars 372 forks source link

Error installing in L7+PHP8 #210

Open jfernandes-dtm opened 2 years ago

jfernandes-dtm commented 2 years ago

I'm struggling to use laravel-geoip in a new laravel 7 instalation. Even if it's the first package I install I keep getting this error.

composer output:

  Problem 1
    - torann/geoip 3.0.1 requires php ^7.2 -> your php version (8.0.12) does not satisfy that requirement.
    - torann/geoip 3.0.2 requires illuminate/support ^8.0 -> found illuminate/support[v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires torann/geoip ^3.0 -> satisfiable by torann/geoip[3.0.1, 3.0.2].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require torann/geoip:*" to figure out if any version is installable, or "composer require torann/geoip:^2.1" if you know which you need.

Thanks in advance

Torann commented 2 years ago

You'll need to use an older version: https://packagist.org/packages/torann/geoip#1.2.1

kelvz-hub commented 1 year ago

You'll need to use an older version: https://packagist.org/packages/torann/geoip#1.2.1

I have the same issue and I try this fix it by downgrading to 1.2.1 but it shows Problem 1

soundsgoodsofar commented 1 year ago

Same problem with Laravel 6.0 + PHP 8.0. Valid combination for Laravel and most every other library. GeoIP seems to just have a bad composer.json. I don't notice much breaking change between 1.2.1 and 3.0.1 that seems to make this a problem. IMO should issue a 1.2.2 that bumps PHP support to ">=7.2" or "^7.2 || ^8.0"