Add support for Solarium 4.2

このコミットが含まれているのは:
Sebastian Meyer 2021-01-19 10:21:35 +01:00
コミット b8a4e7a6d0
3個のファイルの変更15行の追加7行の削除

ファイルの表示

@ -624,13 +624,15 @@ class Solr
$this->loadSolrConnectionInfo();
// Configure connection adapter.
$adapter = GeneralUtility::makeInstance(\Solarium\Core\Client\Adapter\Http::class);
$adapter->setTimeout($this->config['timeout']);
// Todo: When updating to TYPO3 >=10.x and Solarium >=6.x
// the timeout must be set with the adapter instead of the
// endpoint (see below).
// $adapter->setTimeout($this->config['timeout']);
// Configure event dispatcher.
// Todo: When updating to TYPO3 >=10.x and Solarium >=6.x
// we have to provide an PSR-14 Event Dispatcher instead of
// "null".
// $eventDispatcher = GeneralUtility::makeInstance(\TYPO3\CMS\Core\EventDispatcher\EventDispatcher::class);
$eventDispatcher = null;
// Configure endpoint.
$config = [
'endpoint' => [
@ -641,12 +643,18 @@ class Solr
'path' => '/' . $this->config['path'],
'core' => $core,
'username' => $this->config['username'],
'password' => $this->config['password']
'password' => $this->config['password'],
'timeout' => $this->config['timeout'] // Remove when upgrading to Solarium 6.x
]
]
];
// Instantiate Solarium\Client class.
$this->service = GeneralUtility::makeInstance(\Solarium\Client::class, $adapter, $eventDispatcher, $config);
$this->service = GeneralUtility::makeInstance(\Solarium\Client::class, $config);
$this->service->setAdapter($adapter);
// Todo: When updating to TYPO3 >=10.x and Solarium >=6.x
// $adapter and $eventDispatcher are mandatory arguments
// of the \Solarium\Client constructor.
// $this->service = GeneralUtility::makeInstance(\Solarium\Client::class, $adapter, $eventDispatcher, $config);
// Check if connection is established.
$query = $this->service->createCoreAdmin();
$action = $query->createStatus();

ファイルの表示

@ -193,7 +193,7 @@
<label index="config.solrHttps">Use HTTPS: (default is "FALSE")</label>
<label index="config.solrHost">Solr Server Host: (default is "localhost")</label>
<label index="config.solrPort">Solr Server Port: (default is "8983")</label>
<label index="config.solrPath">Solr Server Path: without API endpoint "/solr" (default is "/")</label>
<label index="config.solrPath">Solr Server Path: omit API endpoint "/solr" when using Solarium 5.x (default is "/")</label>
<label index="config.solrUser">Solr Server User: (default is "")</label>
<label index="config.solrPass">Solr Server Password: (default is "")</label>
<label index="config.solrTimeout">Solr Server Timeout: (default is "10")</label>
@ -378,7 +378,7 @@
<label index="config.solrHttps">HTTPS verwenden: (Standard ist "FALSE")</label>
<label index="config.solrHost">Solr Server Host: (Standard ist "localhost")</label>
<label index="config.solrPort">Solr Server Port: (Standard ist "8983")</label>
<label index="config.solrPath">Solr Server Pfad: ohne API-Endpunkt "/solr" (Standard ist "/")</label>
<label index="config.solrPath">Solr Server Pfad: bei Solarium 5.x ohne API-Endpunkt "/solr" (Standard ist "/")</label>
<label index="config.solrUser">Solr Server Benutzername: (Standard ist "")</label>
<label index="config.solrPass">Solr Server Kennwort: (Standard ist "")</label>
<label index="config.solrTimeout">Solr Server Timeout: (Standard ist "10")</label>

ファイルの表示

@ -35,7 +35,7 @@
"typo3/cms-core": "~8.7.32|~9.5.17",
"typo3/cms-tstemplate": "~8.7.32|~9.5.17",
"ubl/php-iiif-prezi-reader": "0.3.0",
"solarium/solarium": "^5.2"
"solarium/solarium": "^4.2|^5.2"
},
"replace": {
"typo3-ter/dlf": "self.version"