Вопрос

i installed FOSElasticaBundle using Composer, After that as per the given instruction on https://github.com/FriendsOfSymfony/FOSElasticaBundle i registered FOSElasticaBundle Class in Appkernel.php file, demo code is as following

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new FOS\ElasticaBundle\FOSElasticaBundle(),
    );
}

But the Problem is after registering new FOS\ElasticaBundle\FOSElasticaBundle(), in the AppKernel.php file. i am trying to run Symfony command from netbeans but it is showing Error

Fatal error: Class 'FOS\ElasticaBundle\FOSElasticaBundle' not found in AppKernel.php file

Please Give me Some Solution for this problem. Thank you

Это было полезно?

Решение

I found the solution.

After doing complete configuration of FosElasticaBundle.

Add this line

$loader->add('FOS', DIR.'/../vendor/friendsofsymfony/elastica-bundle/FOS');

into your app/autoloader.php file. that's work for me.

thank you.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top