- Issue created by @mparker17
- 🇨🇦Canada mparker17 UTC-4
Here's a patch for the connector types currently in elasticsearch_connector
Postponing as this is a backwards-compatibility break.
Currently, \Drupal\elasticsearch_connector\Connector\ElasticSearchConnectorInterface::getClient()
's signature returns a \Elastic\Elasticsearch\Client
.
But making the signature specify the Client instead of its interface, (i.e.: \Elastic\Elasticsearch\ClientInterface
) makes it difficult to substitute a test double. Being able to substitute a test double would make it easier to write automated tests.
Change the method signature to return a \Elastic\Elasticsearch\ClientInterface
instead of a \Elastic\Elasticsearch\Client
. Note that Symfony considers changing the type of a public method a backwards-compatibility break.
\Drupal\elasticsearch_connector\Connector\ElasticSearchConnectorInterface::getClient()
\Drupal\elasticsearch_connector\Plugin\ElasticSearch\Connector\BasicAuthConnector::getClient()
\Drupal\elasticsearch_connector\Plugin\ElasticSearch\Connector\StandardConnector::getClient()
None.
Yes, see above. Note this issue would introduce a backwards-compatibility break, and thus would need to happen on a major version release.
None.
Active
8.0
Code
Here's a patch for the connector types currently in elasticsearch_connector
Postponing as this is a backwards-compatibility break.