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

Stop using the deprecated json_array type internally #2782

Merged
merged 3 commits into from
Jul 22, 2017

Conversation

lcobucci
Copy link
Member

No description provided.

@lcobucci lcobucci added this to the 2.6 milestone Jul 19, 2017
@lcobucci lcobucci self-assigned this Jul 19, 2017
@lcobucci lcobucci requested review from Ocramius and deeky666 July 19, 2017 20:10
@lcobucci lcobucci force-pushed the fix/stop-using-deprecated-types branch from 3f56f92 to c611df2 Compare July 20, 2017 08:32
@lcobucci lcobucci force-pushed the fix/stop-using-deprecated-types branch from c611df2 to 0b50739 Compare July 20, 2017 08:37
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

@lcobucci any user-side change required here? Parch seems good otherwise.

@lcobucci
Copy link
Member Author

@Ocramius I think it shouldn't required but TBQH I'm not sure.

@Ocramius
Copy link
Member

YOLO, 🚢

@Ocramius Ocramius merged commit 6fb7a4b into doctrine:master Jul 22, 2017
@lcobucci lcobucci deleted the fix/stop-using-deprecated-types branch July 22, 2017 17:22
@Ocramius Ocramius changed the title Stop using deprecated "json_array" type Stop using the deprecated json_array type internally Jul 22, 2017
@bendavies
Copy link
Contributor

bendavies commented Aug 14, 2017

@Ocramius @lcobucci
there is a BC break/bug here.

changing the default doctrineTypeMapping from json_array to json causes unfixable schema comparison.

i have an old column using json_array and this PR results in a schema diff (postgres) of:

ALTER TABLE settings ALTER parameters TYPE JSON
ALTER TABLE settings ALTER parameters DROP DEFAULT

Applying the diff does nothing. the same diff persists afterwards.

Only way for the user to fix this is to change the column type from json_array to json

@lcobucci
Copy link
Member Author

@bendavies that's sad news, sorry for causing this issue.

I'll be checking the options to fix the problem caused by 31d0128.

Thanks for letting us know of that

@bendavies
Copy link
Contributor

Thanks @lcobucci!

@stof
Copy link
Member

stof commented Sep 7, 2017

this requires changing which type requires SQL comment hint. currently, json_array says it does not require a SQL comment hint when native json type is supported in the platform, because platforms would map the native type to it. But as you changed it, you have to change the comment hint requirement here

lcobucci added a commit to lcobucci/dbal that referenced this pull request Sep 11, 2017
On 31d0128 we made JsonType the default
one, which caused some unexpected results with the comparator.

This tests validates that if users have a JSON column but are using the
JsonArrayType we'll just add a comment to the column.

Reference: doctrine#2782
@lcobucci
Copy link
Member Author

@bendavies @stof I think I've managed to fix the reported BC-break on #2855, could you please check (it's still WIP, though)?

lcobucci added a commit to lcobucci/dbal that referenced this pull request Sep 11, 2017
On 31d0128 we made JsonType the default
one, which caused some unexpected results with the comparator.

This tests validates that if users have a JSON column but are using the
JsonArrayType we'll just add a comment to the column.

Reference: doctrine#2782
lcobucci added a commit to lcobucci/dbal that referenced this pull request Sep 11, 2017
On 31d0128 we made JsonType the default
one, which caused some unexpected results with the comparator.

This tests validates that if users have a JSON column but are using the
JsonArrayType we'll just add a comment to the column.

Reference: doctrine#2782
kopaygorodsky added a commit to kopaygorodsky/JMSJobQueueBundle that referenced this pull request Sep 20, 2017
lcobucci added a commit to lcobucci/dbal that referenced this pull request Oct 25, 2017
On 31d0128 we made JsonType the default
one, which caused some unexpected results with the comparator.

This tests validates that if users have a JSON column but are using the
JsonArrayType we'll just add a comment to the column.

Reference: doctrine#2782
lcobucci added a commit to lcobucci/dbal that referenced this pull request Nov 18, 2017
On 31d0128 we made JsonType the default
one, which caused some unexpected results with the comparator.

This tests validates that if users have a JSON column but are using the
JsonArrayType we'll just add a comment to the column.

Reference: doctrine#2782
lcobucci added a commit to lcobucci/dbal that referenced this pull request Nov 18, 2017
On 31d0128 we made JsonType the default
one, which caused some unexpected results with the comparator.

This tests validates that if users have a JSON column but are using the
JsonArrayType we'll just add a comment to the column.

Reference: doctrine#2782
lcobucci added a commit to lcobucci/dbal that referenced this pull request Nov 18, 2017
On 31d0128 we made JsonType the default
one, which caused some unexpected results with the comparator.

This tests validates that if users have a JSON column but are using the
JsonArrayType we'll just add a comment to the column.

Reference: doctrine#2782
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 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.

4 participants