Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.1 support #425

Open
pszalko opened this issue Jul 22, 2022 · 2 comments
Open

PHP 8.1 support #425

pszalko opened this issue Jul 22, 2022 · 2 comments

Comments

@pszalko
Copy link

pszalko commented Jul 22, 2022

I use bernard with PHP 8.1, and it works, however there are some deprecation issues:

PHP Deprecated:  Return type of Bernard\QueueFactory\PersistentFactory::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /webapps/vendor/bernard/bernard/src/Bernard/QueueFactory/PersistentFactory.php on line 68

Deprecated: Return type of Bernard\QueueFactory\PersistentFactory::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /webapps/vendor/bernard/bernard/src/Bernard/QueueFactory/PersistentFactory.php on line 68
PHP Deprecated:  Return type of Bernard\Queue\PersistentQueue::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /webapps/vendor/bernard/bernard/src/Bernard/Queue/PersistentQueue.php on line 49

Deprecated: Return type of Bernard\Queue\PersistentQueue::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /webapps/vendor/bernard/bernard/src/Bernard/Queue/PersistentQueue.php on line 49
@pluc
Copy link

pluc commented Aug 16, 2022

I see the #[ReturnTypeWillChange] attribute on Bernard\QueueFactory\PersistentFactory::count and it seems to predate your issue? Are you using dev-master?

https://github.com/bernardphp/bernard/blob/master/src/QueueFactory/PersistentFactory.php#L64

@pszalko
Copy link
Author

pszalko commented Aug 20, 2022

No, I was using official release as advised "to not depend on master at all".

This is the last alpha release, somewhat maintaining backwards compatibility. Major breaks are coming (mostly related to drivers). Please lock your dependencies or even better, do not depend on master at all.

Are there any breaking changes when switching to master branch from 0.13?

// edit:

I checked master branch and see that there are indeed breaking changes:

  • SQS and PHP Redis drivers are missing
  • FlatFileDriver relocated

So maybe it's worth considering to backport PHP 8.1 changes to last stable release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants