geotools
geotools copied to clipboard
Deprecation warnings in PHP 8.1
Running the latest released version of league\geotools, noticed the following deprecation warnings after upgrading to PHP 8.1:
PHP Deprecated: Return type of League\Geotools\Coordinate\Coordinate::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vendor/league/geotools/src/Coordinate/Coordinate.php on line 265
PHP Deprecated: Implicit conversion from float-string "49.47600" to int loses precision in /var/www/vendor/league/geotools/src/Coordinate/Coordinate.php on line 97
Nothing major, obviously, but just thought I'd let you know.
And similar warnings for ArrayCollection.php
Return type of League\Geotools\ArrayCollection::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/league/geotools/src/ArrayCollection.php on line 79
Shows this warning for e.g. offsetExists(), offsetGet(), offsetSet(), offsetUnset(), count(), getIterator().
Hello, It's fixed in the release 1.1.0, thanks!