friends-of-reactphp / mysql

Async MySQL database client for ReactPHP.
MIT License
334 stars 66 forks source link

PHP 8.2 deprecated creation of dynamic property #177

Closed hasanparasteh closed 1 year ago

hasanparasteh commented 1 year ago

I surprisingly get Deprecated: Creation of dynamic property React\MySQL\Commands\QueryCommand::$resultFields is deprecated warning in this specific line of code in 5.7 version

https://github.com/friends-of-reactphp/mysql/blob/c36b92f1ede95f49036b6ba1805736f80fa4d4e0/src/Io/Parser.php#L340

hasanparasteh commented 1 year ago

This belongs to #161 PR

SimonFrings commented 1 year ago

Hey @hasanparasteh, this has been fixed in #170 and is currently part of the v0.6.0 milestone which is not released yet. You can either check out the current development branch (0.6.x) in order to make use of our recent changes, or wait for the upcoming releases.

To give you some more insights, we're planning to work towards the release of v0.6.0, which will involve some API refactoring and other changes. With this in mind and all the other stuff we're currently working on, it might take a while before we get to release this version, but I don't want to push a release too far into the future. Maybe it makes sense to release a v0.5.8 before the bigger release, WDYT?

hasanparasteh commented 1 year ago

I see. Because there'd be breaking changes in the future and people may want to stick with 5.x version for a while (it takes time to fully upgrade all services to new API), it makes sense to release a new version with the latest patches.

This way, people have 100% compatibility with PHP 8.2, and it's an End Of Life release which means there's no more 5.x version in the future and everybody should upgrade.

I think it's good practice to approach future breaking changes like this.

SimonFrings commented 1 year ago

I see. Because there'd be breaking changes in the future and people may want to stick with 5.x version for a while (it takes time to fully upgrade all services to new API), it makes sense to release a new version with the latest patches.

There's already one BC-break merged (#165) that we're going to introduce in v0.6.0, but we're always trying to make these major switches between (major) versions as comfortable as possible.

Releasing a v0.5.8 will also be a temporary solution before v0.6.0 is going to be released. We may also want to invest the time in releasing v0.6.0 without an additional release before that. I have to run this through the team and see what approach makes the most sense.

I think the original question in here is answered, so I'll close this ticket :+1: