DDC-2069: Spaces are not ignored in the "column" list of a uniqueConstraints #2750

doctrinebot opened this Issue Oct 12, 2012 · 3 comments

1 participant


Jira issue originally created by user mnapoli:

In a YAML configuration file

Behavior correct for this:

      columns: column1,column2

However, if I add a space in the "columns" list:

      columns: column1, column2

I end up with the following exception:

exception 'Doctrine\DBAL\Schema\SchemaException' with message 'There is no column with name ' column2' on table 'myTable'.

This can be very confusing, especially if (by any chance) you have a line return just on the space in the command line: you never see the space in the exception message.

It seems that YAML allows spaces in lists (http://en.wikipedia.org/wiki/YAML#Lists), but this line doesn't seem to be a YAML list. If it is parsed by Doctrine (split on ","), spaces should be ignored (or trimmed).


Comment created by mnapoli:

Note that using the correct YAML format works:

      columns: [column1, column2]

So it's confusing to have 2 possibilities to write the same thing, and that they don't behave the same.


Comment created by @FabioBatSilva:

Fixed by : 814f2f9


Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.3.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment