philiplb / CRUDlex

CRUDlex is an easy to use CRUD generator for Symfony 4 and Silex 2 which is great for auto generated admin pages
https://philiplb.de/crudlex/
MIT License
109 stars 23 forks source link

Duplicate fields in crud.yml #72

Closed jmfayard closed 7 years ago

jmfayard commented 7 years ago

Given a crud.ymlcontaining

I made a couple of times a mistake where I add two times the same attribute

user:
    label: User
    table: user
    fields:
        attribute:
            type: integer
            unique: true
        attribute:
            type: text
            unique: false

The one I was modifying was silently ignored, keeping me confused why nothing I did was taken into account.

If would be good if the validation step can add a warning here.

philiplb commented 7 years ago

I'm afraid this is totally legid YAML: https://github.com/symfony/symfony/issues/11538 But thank you for pointing this out.