elasticsearch-php
elasticsearch-php copied to clipboard
ConnectionInterface::performRequest method signature does not match Connection::performRequest
Summary of problem or feature request
ConnectionInterface::performRequest method signature does not match Connection::performRequest method signature.
This causes mocking the class with Phake to fail.
Code snippet of problem
ConnectionInterface.php
/**
* @param null $body
* @return mixed
*/
public function performRequest(string $method, string $uri, array $params = [], $body = null, array $options = [], Transport $transport = null);
Connection.php
/**
* @param string $method
* @param string $uri
* @param array $params
* @param null $body
* @param array $options
* @param Transport $transport
* @return mixed
*/
public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], Transport $transport = null)
{
// ....
}
System details
- PHP Version: 7.1
- ES-PHP client version: 7.4 and 7.5
I'm happy to push up the fix for this, though if you'd rather just do it as part of whatever you're in the middle of that might make more sense as it's a 1 character change. If I were to push it up I'd also fix up the PHPDoc comment a bit.
https://github.com/elastic/elasticsearch-php/pull/1121 for version 6.8.x - function signature missing all type hinting
it can break Magento2 if a new install/upgrade