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

PostgreSQL: backslashes in DC2 comment are quoted when persisted, but aren't unquoted when retrieved from DB #3029

Closed
ostrolucky opened this issue Feb 21, 2018 · 2 comments

Comments

@ostrolucky
Copy link
Member

So, we wanted to use https://github.com/acelaya/doctrine-enum-type with FCQN used for name of custom column type.

If type is named App\\Enum\\AuthMethod, DBAL generates this

COMMENT ON COLUMN auth_login_history.auth_method IS '(DC2Type:App\\Enum\\AuthMethod)'

This happens in PostgreSqlPlatform#quoteStringLiteral.

No reverse process happens when reading these values from DB.

Retrieving this value happens in AbstractSchemaManager#extractDoctrineTypeFromComment

In practise, this means DBAL is able to generate schema with such values, but not read it (would fail on invalid type), because Type::$_typeObjects contains unquoted FCQNs, be receives argument with quoted backslashes.

PostgreSQL 9.6.6 from official postgres docker hub and default configuration.

@ostrolucky
Copy link
Member Author

Dupe of #2926

@github-actions
Copy link

github-actions bot commented Aug 2, 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 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant