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

Make all mapped database types case insensitive #6321

Merged
merged 1 commit into from Mar 3, 2024

Conversation

Rainrider
Copy link
Contributor

@Rainrider Rainrider commented Mar 2, 2024

Q A
Type improvement
Fixed issues

Summary

Currently, a custom mapping type has to return an array of lowercase strings in getMappedDatabaseTypes or else Doctrine fails to retrieve the added type as both AbstractPlatform::getDoctrineTypeMapping and AbstractPlatform::hasDoctrineTypeMappingFor do a lowercase conversion before the look-up. A devolper should not depend on internal representation.

This PR addresses this by storing the mapped type in lowercase to AbstractPlatform#doctrineTypeMapping. This is in line with AbstractPlatform::registerDoctrineTypeMapping, which does a lowercase conversion as well.

@Rainrider Rainrider changed the base branch from 4.0.x to 3.8.x March 3, 2024 08:58
@derrabus derrabus merged commit 6fc2230 into doctrine:3.8.x Mar 3, 2024
90 checks passed
@derrabus
Copy link
Member

derrabus commented Mar 3, 2024

Thank you!

derrabus added a commit to derrabus/dbal that referenced this pull request Mar 3, 2024
* 3.8.x:
  Bump CI workflows (doctrine#6323)
  Make all mapped database types case insensitive (doctrine#6321)
derrabus added a commit to derrabus/dbal that referenced this pull request Mar 3, 2024
* 3.8.x:
  Bump CI workflows (doctrine#6323)
  Make all mapped database types case insensitive (doctrine#6321)
derrabus added a commit that referenced this pull request Mar 3, 2024
* 4.0.x:
  Bump CI workflows (#6323)
  Make all mapped database types case insensitive (#6321)
  Add gssencmode option to connection string for PgSQL & PDO PgSQL driver (#6320)
  Remove Type::canRequireSQLConversion from docs (#6318)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants