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

Replaced json_array with json due to Doctrine Dbal 3.0 #1294

Merged
merged 1 commit into from
Apr 3, 2023
Merged

Replaced json_array with json due to Doctrine Dbal 3.0 #1294

merged 1 commit into from
Apr 3, 2023

Conversation

NovakHonza
Copy link
Contributor

This should be a fix for #1293

@makasim
Copy link
Member

makasim commented Mar 30, 2023

Is it backward compatible ?

@Steveb-p
Copy link
Contributor

Is it backward compatible ?

Doctrine team recommended this change for years, and both types are present in dbal 2.x.

@NovakHonza
Copy link
Contributor Author

As I think about it, there might be a need for migration for existing installations? Because of the need to change the comment on the data column (DC2Type:json_array) to (DC2Type:json)?

@Steveb-p
Copy link
Contributor

As I think about it, there might be a need for migration for existing installations? Because of the need to change the comment on the data column (DC2Type:json_array) to (DC2Type:json)?

Comment on column type is not used by Doctrine ORM code itself. It is generated so that reverse-engineering tools can properly recover schema in cases where a custom type (like json or json_array) is used.

See https://symfony.com/doc/6.3/doctrine/reverse_engineering.html

The doctrine:mapping:import command used to generate Doctrine entities from existing databases was deprecated by Doctrine in 2019 and there's no replacement for it.

See https://www.doctrine-project.org/projects/doctrine-orm/en/2.14/reference/tools.html#reverse-engineering

Reverse Engineering is a one-time process that can get you started with a project. Converting an existing database schema into mapping files only detects about 70-80% of the necessary mapping information. Additionally the detection from an existing database cannot detect inverse associations, inheritance types, entities with foreign keys as primary keys and many of the semantical operations on associations such as cascade.

@Steveb-p Steveb-p changed the title Replaced from json_array to json due to Doctrine Dbal 3.0 Replaced json_array with json due to Doctrine Dbal 3.0 Mar 30, 2023
@makasim makasim merged commit dd93f09 into php-enqueue:master Apr 3, 2023
@NovakHonza NovakHonza deleted the json_array_to_json branch April 3, 2023 18:57
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.

3 participants