spatie / async

Easily run code asynchronously

Home Page:https://spatie.be/en/opensource/php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 8.1 - when supported?

tweber68 opened this issue · comments

Will spatie/async be supported with PHP 8.1? As far as I can see, it's not compatible to PHP 8.1 yet...

What makes you say that? composer.json claims support for ^8.0 which includes anything 8.*. I don't see any obvious issues with 8.1 here.

I'm getting these errors:

[PHP Deprecated:  Return type of Spatie\Async\Pool::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 .../vendor/spatie/async/src/Pool.php on line 237
[PHP Deprecated:  Return type of Spatie\Async\Pool::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 .../vendor/spatie/async/src/Pool.php on line 244
[PHP Deprecated:  Return type of Spatie\Async\Pool::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/spatie/async/src/Pool.php on line 249
[PHP Deprecated:  Return type of Spatie\Async\Pool::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/spatie/async/src/Pool.php on line 254

I do run php 8.1, but not 100% sure if these errors are actually php 8.1 related.

Sorry, I had no time for testing it again. But these were some errors which came up. And they are PHP 8.1 related.

@bvandevliet #184 solves these issues. It just needs to be merged by someone. I'm running async on 8.1 and apart from the deprecation notices, it seems to be working fine

commented

Seems like the pull request with fixes referencing this package has been merged. So this issue could also be closed. @tweber68 @freekmurze :)