0

I would like to configure knp_doctrine_behaviors for knplabs/doctrine-behaviors like this:

knp_doctrine_behaviors:
    translatable:   true

but Symfony (flex) give me error:

[FileLoaderLoadException] There is no extension able to load the configuration for "knp_doctrine_behaviors" ... Looked for namespace "knp_doctrine_behaviors", found ...

Im new to Symfony Flex so I dont fully understand what should I do

symfony.lock:

"knplabs/doctrine-behaviors": {
    "version": "1.5.0"
},
Shaddow
  • 3,175
  • 3
  • 22
  • 42
  • 1
    Are you using Symfony 4? did you load the bundle in `config/bundles.php`? – Iwan Wijaya Feb 22 '18 at 13:51
  • @Orange18947 yes symfony 4 ... and u r right, thats the problem, I thought that bundles are registered automatically because I removed AppKernel and didnt know `bundles.php` exists ... so just recipes are added automatically there if I understand, THX – Shaddow Feb 22 '18 at 14:03
  • Yep. Only recipes automatically update the config stuff (bundles.php, routing, general config files). Lack of a recipe should actually raise a bit of a flag. Many third party bundles do not support S4. So be cautious. – Cerad Feb 22 '18 at 15:38
  • In latest version the config key is without prefix `doctrine_behaviors:` – Oleg Jan 21 '20 at 20:21

1 Answers1

2

You have to add

    Knp\DoctrineBehaviors\Bundle\DoctrineBehaviorsBundle::class => ['all' => true],

to your bundles.php