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

[5.7] Cast sqlite foreign key constraints configuration #26303

Closed
wants to merge 1 commit into from
Closed

[5.7] Cast sqlite foreign key constraints configuration #26303

wants to merge 1 commit into from

Conversation

roberto-aguilar
Copy link
Contributor

@roberto-aguilar roberto-aguilar commented Oct 30, 2018

Instead of delegating the value casting to every caller of this method (which is going to be used for boolean operations), it now handles it itself.

This is a safe refactor because missing configurations are going to return null and therefore be casted as false.

@roberto-aguilar roberto-aguilar changed the title Cast sqlite foreign key constraints configuration [5.7] Cast sqlite foreign key constraints configuration Oct 30, 2018
Instead of delegating the value casting to every caller of this method
(which is going to be used for boolean operations), it now handles it
itself.
@sisve
Copy link
Contributor

sisve commented Oct 30, 2018

This is a safe refactor because missing configurations are going to return null and therefore be casted as false.

Could you expand on this? I imagine that if I have written code that $obj->getForeignKeyConstraintsConfigurationValue() === null, then that would never match anymore.

The return type is part of the method signature, and changing method signatures are often breaking changes.

@roberto-aguilar
Copy link
Contributor Author

You're right, @sisve

The PR that introduced this method (#26298) was just merged today, and even though this has not been tagged yet, i agree with you that is a breaking change at this point.

Thanks for the feedback!

@roberto-aguilar roberto-aguilar deleted the refactor/sqlite-connection branch October 30, 2018 04:52
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

Successfully merging this pull request may close these issues.

None yet

2 participants