Stringy icon indicating copy to clipboard operation
Stringy copied to clipboard

PHP 8.1 compatibility

Open Sweetchuck opened this issue 3 years ago • 7 comments

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 /.../vendor/danielstjules/stringy/src/Stringy.php on line 893

The solution could be very similar to this: https://github.com/cebe/php-openapi/pull/143/files


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.

Sweetchuck avatar Jan 02 '22 14:01 Sweetchuck

https://github.com/danielstjules/Stringy/network/dependents

  • 36,124 Repositories
  • 279 Packages

Last commit in 3.x (master) branch happened more than 4 years ago.

It is interesting that the PHP 8.1 compatibility issue just come up now. Or do they know something that I don't know?

Sweetchuck avatar Jan 02 '22 21:01 Sweetchuck

PR will be coming soon. :factory_worker:

Sweetchuck avatar Jan 03 '22 16:01 Sweetchuck

Sorry. I just noticed that there is an open PR which is related to PHP 8.1 compatibility. #208

Before I opened this issue, I had searched for an existing issue, but I forgot to look through the pull requests.

Sweetchuck avatar Jan 03 '22 21:01 Sweetchuck

Hello @danielstjules

A little attention here, please. :pray:

Sweetchuck avatar Jan 11 '22 12:01 Sweetchuck

It's funny to think such package still exist on packagist. Creating an open source library then suddenly ignoring it leaving thousands of projects broken and outdated lol.

noriellecruz avatar May 08 '22 17:05 noriellecruz

+1 on this !

TCB13 avatar Aug 02 '22 18:08 TCB13

https://packagist.org/packages/voku/stringy

simogeo avatar Aug 10 '22 14:08 simogeo