danielstjules / Stringy

A PHP string manipulation library with multibyte support
MIT License
2.46k stars 216 forks source link

[PHP 8.1] Add #[\ReturnTypeWillChange] #208

Open samsonasik opened 2 years ago

samsonasik commented 2 years ago

without this, it can cause error :

PHP Deprecated:  Return type of Stringy\Stringy::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 270
Deprecated: Return type of Stringy\Stringy::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 270
PHP Deprecated:  Return type of Stringy\Stringy::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 453
Deprecated: Return type of Stringy\Stringy::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 453
PHP Deprecated:  Return type of Stringy\Stringy::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 850
Deprecated: Return type of Stringy\Stringy::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 850
PHP Deprecated:  Return type of Stringy\Stringy::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 873
Deprecated: Return type of Stringy\Stringy::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 873
PHP Deprecated:  Return type of Stringy\Stringy::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 893
Deprecated: Return type of Stringy\Stringy::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 893
PHP Deprecated:  Return type of Stringy\Stringy::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 /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 906
Deprecated: Return type of Stringy\Stringy::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 /home/runner/work/rector-src/rector-src/vendor/danielstjules/stringy/src/Stringy.php on line 906