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

Fixing the maximum PHP version #473

Closed
s1lver opened this issue Feb 21, 2023 · 9 comments
Closed

Fixing the maximum PHP version #473

s1lver opened this issue Feb 21, 2023 · 9 comments

Comments

@s1lver
Copy link
Member

s1lver commented Feb 21, 2023

We ran into problems when using AMQP queues. At the same time, tests for solving problems cannot be written anymore, since some packages have ceased to support PHP 5.6, including phpunit.
If you try to use a newer version of phpunit for PHP 8.0 or PHP 8.1, then you are faced with the fall of most tests for different drivers.

I spent some time and couldn't find a way to not have to rewrite all the tests and still be compatible with PHP 5.6 (#470)

In this regard, I have a suggestion to fix the maximum version of PHP 7.4 in README.md and suggest switching to queues from Yii3 if you need to work on PHP 8 or higher

Additional info

Q A
Yii version 2.0.35
PHP version 8.0, 8.1
Operating system Apline, CentOS, Debian
@samdark
Copy link
Member

samdark commented Feb 21, 2023

https://github.com/yiisoft/phpunit-patches ?

@samdark
Copy link
Member

samdark commented Feb 21, 2023

I don't think it will be easy to work with Yii3 queues within Yii2 but, honestly, I haven't tried. Maybe it's not as hard.

@s1lver
Copy link
Member Author

s1lver commented Feb 21, 2023

https://github.com/yiisoft/phpunit-patches ?

aw, didn't see that i'll try again of course

@s1lver
Copy link
Member Author

s1lver commented Feb 21, 2023

Something patches are not applied. I tried to return phpunit 4.8.36 the result is similar. I'm not sure I want to find out why fixes aren't being applied)

изображение

@samdark maybe I'm doing something wrong?

@samdark
Copy link
Member

samdark commented Feb 21, 2023

@razvanphp
Copy link

Would this mean that we can't reliably use yii2-queue with PHP 8.x or just the tests?

@samdark
Copy link
Member

samdark commented Aug 26, 2023

Just tests.

@s1lver
Copy link
Member Author

s1lver commented Sep 22, 2023

Not really. Some drivers do not work partially or completely, some have difficulties with support.
For example:

  • there is no supported version of pecl for gearman, it is difficult to verify correct operation
  • modern versions are not supported for beanstalk, currently there is a limit of 3 versions
  • sqs is in an unclear state
  • amqp contains errors, for example, heartbeat fixed in amqplib

I ran tests. The maximum working version of PHP is now 8.0. To support further, you must limit yourself to a minimum version of PHP 8.1

@mtangoo
Copy link
Contributor

mtangoo commented Sep 23, 2023

@s1lver @samdark what about pinning max version to 8.0/8.1 whichever is fully working and then open individual tickets for issues for higher versions so that only when all are fixed then we can raise that too?

What do you both think?

@s1lver s1lver closed this as completed Oct 4, 2023
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

4 participants