-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type #35987
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
[DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type #35987
Conversation
@@ -266,7 +265,6 @@ private function getPhpType($doctrineType) | |||
case self::$useDeprecatedConstants ? DBALType::TARRAY : 'array': | |||
case self::$useDeprecatedConstants ? DBALType::SIMPLE_ARRAY : Types::SIMPLE_ARRAY: | |||
case 'json_array': | |||
case self::$useDeprecatedConstants ? false : Types::JSON: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can keep the case
to show we handle it but return null intentionally?
JSON can only be |
@dunglas That would be |
@nicolas-grekas Does your approval mean you prefer to return nothing? |
yes :) |
Thank you @fancyweb. |
After checking the code, it appears that
json
have a different behavior thanjson_array
.@norkunas is right about this. Consequently, we cannot safely guess a built in type for the
json
Doctrine type.