MenaraSolutions / geographer

PHP library that knows how countries and cities are called in any language
MIT License
763 stars 57 forks source link

Warnings PHP>=8.0 #53

Open tuktukvlad opened 1 year ago

tuktukvlad commented 1 year ago

Return type of MenaraSolutions\Geographer\Divisible::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../vendor/menarasolutions/geographer/src/Traits/ExposesFields.php on line 46

Return type of MenaraSolutions\Geographer\Collections\Traits\ImplementsArray::unserialize($serialized) should either be compatible with ArrayObject::unserialize(string $data): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../vendor/menarasolutions/geographer/src/Collections/Traits/ImplementsArray.php on line 74

ve3 commented 7 months ago

This repository maybe dead. They didn't update for very long time. Even the repo name geographer-data still didn't update. For example: Turkey had already changed to Türkiye (as I remember, since 2022). You may try stefangabos/world_countries as they are very up to date but they just don't have nice PHP API like this one.

Millon15 commented 4 months ago

Howdy! Fortunatelly this issue has been fixed in PRs, that has been already merged to the master branch of this repo by maintainer:

So, scince last Release in this repo has been created 2 yers ago, to fix the issue in your project, that depends from this (MenaraSolutions/geographer) package, you need to:

  1. Modify your composer.json
{
    "name": "you/your-awsome-project",
    "require": {
        "menarasolutions/geographer": "dev-master"
    }
}
  1. Fire: composer update menarasolutions/geographer