geotools icon indicating copy to clipboard operation
geotools copied to clipboard

Deprecation warnings in PHP 8.1

Open BrekiTomasson opened this issue 3 years ago • 1 comments

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.

BrekiTomasson avatar Jan 06 '22 11:01 BrekiTomasson

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().

wivaku avatar Mar 28 '22 10:03 wivaku

Hello, It's fixed in the release 1.1.0, thanks!

Surfoo avatar Oct 26 '22 19:10 Surfoo