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

Comparator incorrectly diffs default values (regression in master) #3336

Closed
Majkl578 opened this issue Oct 31, 2018 · 1 comment
Closed

Comparator incorrectly diffs default values (regression in master) #3336

Majkl578 opened this issue Oct 31, 2018 · 1 comment

Comments

@Majkl578
Copy link
Contributor

Majkl578 commented Oct 31, 2018

BC Break Report

Q A
BC Break yes
Version 2.9.0-dev

Summary

After applying Doctrine CS 5.0, weak comparisons became strict comparisons.
One of the affected places is Comparator which compares default values as is (always string|null from the DB while it's scalar|null when declared in ORM):

if ($properties1['default'] !== $properties2['default'] ||

Previous behaviour

The following test works with snapshot/develop/2018-04-17
https://github.com/doctrine/doctrine2/blob/2726636e55fdbdf6fb1ed466f22d34de116fb8f9/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DBAL483Test.php#L24-L41

Current behavior

Comparator now produces diff SQL when default is (int) 0.

How to reproduce

Run ORM 2.6 test suite with DBAL 2.9.0-dev.
https://travis-ci.org/doctrine/doctrine2/jobs/448657137#L608

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants