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

#3306 introduced at least one bug #3349

Closed
svycka opened this issue Nov 16, 2018 · 3 comments
Closed

#3306 introduced at least one bug #3349

svycka opened this issue Nov 16, 2018 · 3 comments

Comments

@svycka
Copy link
Contributor

svycka commented Nov 16, 2018

Bug Report

replacing all == to === and !== to !== should not be made with cs fixer as this can cause bugs for example here:

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

Q A
BC Break no
Version 2.9.x-dev

Summary

Becouse of #3306 change != to !== now Schema comparator return false changes

Current behaviour

incorrectly treats default value because from database it returns string '1' but schema retun integer 1 and counts as changed default value

How to reproduce

doctrine/dbal:2.9.x-dev
maraidb:10.2.14 and mariadb:10.3.10

/**
 * @ORM\Column(type="integer", options={"default" = 1})
 */
protected $fuelType;
doctrine-module orm:schema-tool:update --dump-sql
ALTER TABLE purchase CHANGE fuelType fuelType INT DEFAULT 1 NOT NULL;

Expected behaviour

doctrine-module orm:schema-tool:update --dump-sql
[OK] Nothing to update - your database is already in sync with the current entity metadata
@morozov
Copy link
Member

morozov commented Nov 16, 2018

@svycka it looks similar to #3336.

@svycka
Copy link
Contributor Author

svycka commented Nov 19, 2018

yep looks like it, sorry :)

@github-actions
Copy link

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 Jul 31, 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

3 participants