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

php8.2 - dynamic-properties-deprecated #988

Closed
3kbest opened this issue Dec 8, 2022 · 10 comments
Closed

php8.2 - dynamic-properties-deprecated #988

3kbest opened this issue Dec 8, 2022 · 10 comments

Comments

@3kbest
Copy link

3kbest commented Dec 8, 2022

Creation of dynamic property React\Socket\Connection::$decor is deprecated in /vendor/cboden/ratchet/src/Ratchet/Server/IoServer.php:86

https://php.watch/versions/8.2/dynamic-properties-deprecated#exempt

@sips-richard
Copy link

There are quite a few of these peppered around the codebase where data pushed on to connections. I've forked the latest version to address the issue for my own project and have conformed the code to PSR-12 and started applying PHPStan. Would be happy to contribute when the changes are complete.

@jonnywilliamson
Copy link

There are quite a few of these peppered around the codebase where data pushed on to connections. I've forked the latest version to address the issue for my own project and have conformed the code to PSR-12 and started applying PHPStan. Would be happy to contribute when the changes are complete.

Yes it's polluting my logs a lot. I hope they take you up on your offer!

@simPod
Copy link
Contributor

simPod commented Feb 27, 2023

Does anyone have any viable alternative?

@SimonFrings
Copy link

SimonFrings commented Mar 15, 2023

@simPod Currently working on testing the project against PHP 8.0, PHP 8.1 and PHP 8.1, so I opened up a ticket to post my progress, see #1003. Once I reach the point to run the testsuite with the current PHP versions (up to 8.2), I think I will automatically have a closer look at this 👍

@dlhenke
Copy link

dlhenke commented Jul 18, 2023

to solve all problems with php8.2 use "plesk/ratchetphp": "^1.0"

@sips-richard
Copy link

When I came to look at this problem again it turned out there were other options to updating this code myself, so I took a different route. If you aren't deeply invested in Ratchet and React, you can migrate to the new amphp which uses the Revolt event loop, and use their websocket library: https://github.com/amphp/websocket

@clue
Copy link
Member

clue commented Jul 20, 2023

We're on it! 🚀

I understand the current situation is frustrating and I agree that this is something that should have highest priority.

We're currently working out an action plan and a sponsoring concept to make sure that Ratchet receives adequate attention. As much as I'd like to commit to having this done in the next couple of days, I'm sure you'll understand this is going to take a couple of weeks (not months, pinky swear).

We're already keeping track of the progress for newer PHP versions in #1003, so I'll close this one for now, but I'm happy to continue the discussion nonetheless!

We're still working out the details, but if you're interested in helping with this, please feel free to reach out, plus we also very much appreciate sponsors! ❤️

@clue clue closed this as completed Jul 20, 2023
@3kbest
Copy link
Author

3kbest commented Jul 30, 2023

@simPod

Does anyone have any viable alternative?

Alternative a hack, use: error_reporting(E_ALL ^ E_DEPRECATED); on the file that use Ratchet on php8.2 untill they fix the problem.

@SimonFrings
Copy link

@3kbest Good catch, this is definitely a good temporary solution 👍

It's actually quite obvious when you think about it, but for some reason, I didn't mention it before. Thanks for your input!

@Tofandel
Copy link

Tofandel commented Jun 28, 2024

The fix is #1060

this is going to take a couple of weeks (not months, pinky swear).

Uhoh 🙈

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

No branches or pull requests

8 participants