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

Type names with backslashes cause failing upgrades #2926

Closed
greg0ire opened this issue Nov 27, 2017 · 3 comments
Closed

Type names with backslashes cause failing upgrades #2926

greg0ire opened this issue Nov 27, 2017 · 3 comments
Assignees

Comments

@greg0ire
Copy link
Member

I'm planning ahead and starting to use FQCNs as custom doctrine type getName implementation, as well as registering them under that name with Type::addType. Sadly, it seems SQL comments with backslashes are somehow not matched with the desired value, and the upgrade command fails with :

[Doctrine\DBAL\DBALException]                                                                                                                                                               
  Unknown column type "EMA\\MD\\Doctrine\\Type\\CountryType" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of  
   all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database introspection then you might have forgotten to register all database types for a   
  Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem wi  
  th the cache or forgot some mapping information. 

This is slightly different than what I described in doctrine/orm#6752 .

Here is the column comment I have:

| country_of_origin | character varying(255) |  not null   | extended  |         <null> | (DC2Type:EMA\\MD\\Doctrine\\Type\\CountryType)          |

@Majkl578
Copy link
Contributor

Observed this as well, possibly platform-dependent (double-)quoting issue, needs investigation.

@ostrolucky
Copy link
Member

Fixed by #3330

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants