In Symfony2, can the validation.yml file be split into multiple files using imports?

前端 未结 8 1154
旧巷少年郎
旧巷少年郎 2020-12-13 10:48

Right now, I have a file called validation.yml with the validation of all the bundle\'s entities in one file.

validation.yml

Blogger\\BlogBundle\\Ent         


        
8条回答
  •  情书的邮戳
    2020-12-13 11:14

    Solutions above are not working in Symfony 2.3.

    In 2.3 it's easier to load multiple Yml files from loader. For example:

        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yml');
        $loader->load('services/menu.yml'); //new file to load
    

提交回复
热议问题