symfony-cmf / resource-bundle

Resource Location for CMF documents based on Puli
https://cmf.symfony.com
5 stars 7 forks source link

Change repository configuration structure #7

Closed dantleech closed 9 years ago

dantleech commented 9 years ago

It would make more sense for the configuration to be:

repository:
    repository_1:
        type: doctrine_phpcr_odm
        basepath: /foo/bar
    repository_2:
        type: filesystem
        basedir: /tmp/foo

Rather than the somewhat inverted:

repository:
    doctrine_phpcr_odm:
        repository_1:
             basepath: /foo/bar

The reason it is as it is is because it allows us to have strict configuration. But .. It also limits the extensibility of the bundle so it is probably better to have loose validation in the DI and strict validation at "runtime".