Skip to content

Do not replace json by json_array when making an Entity #447

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

Closed
vbourdeix opened this issue Jul 19, 2019 · 4 comments · Fixed by #482
Closed

Do not replace json by json_array when making an Entity #447

vbourdeix opened this issue Jul 19, 2019 · 4 comments · Fixed by #482
Labels

Comments

@vbourdeix
Copy link

When I create an entity with make:entity and type json for the type of a field, it is replaced by json_array, which is deprecated since Doctrine 2.6 if I remember well.

There already has been a pull request to remove the support to json_array, yet I have this behaviour. When I look at the code, the only place (inside the MakerBundle) I can found the json_array string is in src/GeneratorTwigHelper.php but I don't know if this is related, because if there is a possibility of extending the types managed by the maker bundle (didn't search deep enough to know), this behaviour could come from another bundle.

As a side note, the json_array is displayed among the "Other Types" section.

@LeJeanbono
Copy link
Contributor

It's due to the autocomplete :
json_array
If yout type Enter, json_array is filled instead of json

Autocomplete is based on Doctrine\DBAL\Types\Type and json_array is before json that's why he's trigger before

@vbourdeix
Copy link
Author

Then it would be a good idea to remove json_array of the possibilities, right ? If necessary I can make a pull request for this.

@romaricdrigon
Copy link
Contributor

As explained on #448, I fully agree with @vbourdeix
Help needed to remove json_array from the types :)

@LeJeanbono
Copy link
Contributor

@romaricdrigon I will ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants