Skip to content

For autocomplete json_array type must be after json #448

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
wants to merge 3 commits into from

Conversation

LeJeanbono
Copy link
Contributor

Fix #447
image
Maybe a little ugly, I'm open to suggestions

$input[Type::JSON_ARRAY] = $json_array;

return $input;
}
Copy link
Member

Choose a reason for hiding this comment

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

Hmm. Could we use https://www.php.net/manual/en/function.asort.php

The idea would be that, I think, json comes after json_array alphabetically... so that should sort it like we want it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

arsort do the job, thanks @weaverryan

@javiereguiluz
Copy link
Member

Instead of this ... which I'm not sure I like much as a solution ... couldn't we instead filter the list of Doctrine types by hand and remove the json_array type because it's deprecated since Doctrine 2.6 and shouldn't be used anymore in new entities?

@romaricdrigon
Copy link
Contributor

I agree with @javiereguiluz suggestion of removing entirely json_array.
Maker bundle is moving towards supporting only doctrine 2.6+, released in 2017. We should remove deprecated types.

@LeJeanbono would you like to work on that? I will close this PR since it does not make sense anymore.

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.

Do not replace json by json_array when making an Entity
4 participants