There is no extension able to load the configuration

后端 未结 2 532
温柔的废话
温柔的废话 2021-01-14 00:48

I\'m trying to load custom config but getting exception:

1/2 InvalidArgumentException in YamlFileLoader.php

There is no extension able to load the

2条回答
  •  一向
    一向 (楼主)
    2021-01-14 01:06

    You have to manually register extension class, how to do it is described here http://symfony.com/doc/current/cookbook/bundles/extension.html#manually-registering-an-extension-class

    Something like this:

    //.....
    class CwiczeniaDependencyInjectionBundle extends Bundle
    {
    
      public function getContainerExtension()
      {
        if (null === $this->extension) {
            $this->extension = new CwiczeniaExtension();
        }
        return $this->extension;
      }
    }
    

提交回复
热议问题