Skip to content

Conversation

@derrabus
Copy link
Member

Q A
Type improvement
BC Break no
Fixed issues N/A

Summary

This PR addresses some issues I saw while working on the Statement class of the MySQLi driver. The class itself is final, has no ancestors and its constructor is flagged as @internal. Under these circumstances, I assume that none of my changes count as a BC break.

All protected properties have been made private because protected visibility in a final class is pretty much useless. Moreover, I've removed their _ prefix according to our CS rules. I realize that both changes have been applied to the 4.0.x branch already, but I see no reason not to deliver them with 3.2.0 already. That should also ease future merges from 3.x to 4.x.

The constructor requires a mysqli_stmt instance now. This way, the statement becomes fully unaware of the connection which is also consistent with the design of the corresponding class of the PDO driver.

Copy link
Member

@morozov morozov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from me! I believe other drivers could use the same cleanup at some point in time.

Signed-off-by: Alexander M. Turek <me@derrabus.de>
@derrabus derrabus force-pushed the improvement/refactor-mysqli-statement branch from 8458b52 to e435adc Compare October 19, 2021 07:52
@derrabus derrabus merged commit 07a2726 into doctrine:3.2.x Oct 19, 2021
@derrabus derrabus deleted the improvement/refactor-mysqli-statement branch October 19, 2021 15:02
@derrabus derrabus added this to the 3.2.0 milestone Oct 20, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants