Search code examples
phpsymfonysonatasymfony-3.4

Installation of Sonata ClassificationBundle autoload ClassNotFound


I'm try to install Sonata ClassificationBundle on my project in symfony 3.4.

But i can't install it correctly, i thinks i have missing something.

I have pass all step but my application display this message:

Attempted to load class "ApplicationSonataClassificationBundle" from namespace "Application\Sonata\ClassificationBundle". 
Did you forget a "use" statement for another namespace?

I have try to add class to autoload with

"psr-4": {
   ...
   "Application\\Sonata\\ClassificationBundle": "src/Application/Sonata/ClassificationBundle",
   "Application\\": "/src/Application"
    },

Without result same error.

My class was perfectly generate.

ApplicationSonataClassificationBundle

How can i do ?

Thanks

Sonata ClassificationBundle Documentation


Solution

  • no need for an extra PSR-4 entry.

    Application\\ -> src/Application

    is enough, but you should remove the leading / before src.