I am trying to get FOSElasticaBundle to work. An ElasticSearch instance runs on localhost: 9200 and responds.
I followed every step in the docs https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Resources/doc/setup.md
but in the last step I get this error in the console:
c:\xampp\htdocs\my\folder>php app/console fos:elastica:populate Resetting app Fatal error: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]]) in C:\xampp\htdocs\my\folder\vendor\rufli n\elastica\lib\Elastica\Exception\ResponseException.php on line 34 [Symfony\Component\Debug\Exception\FatalErrorException] Error: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]]) fos:elastica:populate [--index[="..."]] [--type[="..."]] [--no-reset] [--offset="..."] [--sleep="..."] [--batch-size="..."] [--ignore-errors] [--no-overwrite-format]
It seems that 3 parameters are required for the "__construct" function, but there are only 2 of them. I just tried to add a "NULL" parameter to make it work, but then another function causes an error.
public function __construct(Request $request, Response $response) { $this->_request = $request; $this->_response = $response; parent::__construct($response->getError()); }
Is this a common problem? How to solve it?
source share