diff --git a/Classes/Report/SolrVersionStatus.php b/Classes/Report/SolrVersionStatus.php index f6b6513af0..9b666ef82c 100644 --- a/Classes/Report/SolrVersionStatus.php +++ b/Classes/Report/SolrVersionStatus.php @@ -21,6 +21,7 @@ use ApacheSolrForTypo3\Solr\Domain\Site\Exception\UnexpectedTYPO3SiteInitializationException; use ApacheSolrForTypo3\Solr\System\Solr\SolrConnection; use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity; +use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Reports\Status; @@ -32,11 +33,6 @@ */ class SolrVersionStatus extends AbstractSolrStatus { - /** - * Required Solr version. The version that gets installed when using the provided Docker image. - */ - public const REQUIRED_SOLR_VERSION = '9.3.0'; - /** * Compiles a version check against each configured Solr server. * @@ -65,9 +61,10 @@ public function getStatus(): array } $solrVersion = $coreAdmin->getSolrServerVersion(); - $isOutdatedVersion = version_compare($this->getCleanSolrVersion($solrVersion), self::REQUIRED_SOLR_VERSION, '<'); + $supportedSolrVersions = $this->getSupportedSolrVersions(); + $isSupported = in_array($this->getCleanSolrVersion($solrVersion), $supportedSolrVersions); - if (!$isOutdatedVersion) { + if ($isSupported) { $reports[] = GeneralUtility::makeInstance( Status::class, 'Apache Solr Version', @@ -79,12 +76,16 @@ public function getStatus(): array } $formattedVersion = $this->formatSolrVersion($solrVersion); - $variables = ['requiredVersion' => self::REQUIRED_SOLR_VERSION, 'currentVersion' => $formattedVersion, 'solr' => $coreAdmin]; + $variables = [ + 'supportedSolrVersions' => $supportedSolrVersions, + 'currentVersion' => $formattedVersion, + 'solr' => $coreAdmin, + ]; $report = $this->getRenderedReport('SolrVersionStatus.html', $variables); $status = GeneralUtility::makeInstance( Status::class, 'Apache Solr Version', - 'Outdated, Unsupported', + 'Unsupported', $report, ContextualFeedbackSeverity::ERROR ); @@ -95,6 +96,13 @@ public function getStatus(): array return $reports; } + protected function getSupportedSolrVersions(): array + { + $composerContents = file_get_contents(ExtensionManagementUtility::extPath('solr') . 'composer.json'); + $composerConfiguration = json_decode($composerContents, true, 25, JSON_OBJECT_AS_ARRAY); + return $composerConfiguration['extra']['TYPO3-Solr']['version-matrix']['Apache-Solr'] ?? []; + } + /** * {@inheritDoc} */ diff --git a/Docker/SolrServer/Dockerfile b/Docker/SolrServer/Dockerfile index feb88c72eb..8b4744a161 100644 --- a/Docker/SolrServer/Dockerfile +++ b/Docker/SolrServer/Dockerfile @@ -1,4 +1,4 @@ -FROM solr:9.3.0 +FROM solr:9.5.0 MAINTAINER dkd Internet Service GmbH ENV TERM linux diff --git a/Documentation/Appendix/VersionMatrix.rst b/Documentation/Appendix/VersionMatrix.rst index 9a14f49349..d9662ae379 100644 --- a/Documentation/Appendix/VersionMatrix.rst +++ b/Documentation/Appendix/VersionMatrix.rst @@ -14,14 +14,15 @@ List of EXT:solr versions and the matching versions of Apache Solr and TYPO3 tha ------------------------------- ---------------------------------------------- -------------------------------- --------------- --------------------------------- TYPO3 EXT:solr EXT:tika EXT:solrfal EXT:solrconsole EXT:solrdebugtools EXT:solrfluidgrouping EXT:solrmlt Apache Solr Configset ========= ========== ========== =========== =============== ================== ================================ =============== =============== ================= -12.4 12.0 12.0 12.0 12.0 (Ø) 12.0 N/A (integrated in EXT:solr) 12.0 (Ø) 9.3.0 ext_solr_12_0_0 -11.5 11.5 11.0 11.0 11.0 11.0 11.0 11.0 (Ø) 8.11.1 ext_solr_11_5_0 +12.4 12.0 12.0 12.0 12.0 12.0 N/A (integrated in EXT:solr) 12.0 (Ø) 9.5.0¹ ext_solr_12_0_0 +11.5 11.5 11.0 11.0 11.0 11.0 11.0 11.0 (Ø) 8.11.2¹ ext_solr_11_5_0 ========= ========== ========== =========== =============== ================== ================================ =============== =============== ================= | Ø - not yet available | ᾱ - non stable alpha release | β - non stable beta release | rc - release candidate available +|¹ - recommended Apache Solr version, check version matrix in composer.json (composer info:solr-versions) for full list .. important:: @@ -40,13 +41,14 @@ selected older versions. The following table illustrates the offers and availabl -------------------------------- ---------------------------------------------- ------------------------------------ TYPO3 EXT:solr EXT:tika EXT:solrfal EXT:solrconsole EXT:solrdebugtools Apache Solr Configset ========= =========== ========== =========== =============== ================== =============== ==================== -10.4 11.2.4+ Ø 10.0 10.0 10.0 10.0 9.2.1 ext_solr_11_2_0_elts -9.5-10.4 11.0.8+ 6.0.3+ 8.0.2+ 4.0.2+ 1.1.3+ 9.2.1 ext_solr_11_0_0_elts +10.4 11.2.4+ 10.0 10.0 10.0 10.0 9.5.0¹ ext_solr_11_2_0_elts +9.5-10.4 11.0.9+ 6.0.3+ 8.0.2+ 4.0.2+ 1.1.3+ 9.5.0¹ ext_solr_11_0_0_elts ========= =========== ========== =========== =============== ================== =============== ==================== Our Apache Solr for TYPO3 EB-partners newsletter will keep you updated! Ø - not yet available +¹ - recommended Apache Solr version, check version matrix in composer.json (composer info:solr-versions) for full list No longer supported versions ---------------------------- diff --git a/Resources/Private/Templates/Backend/Reports/SolrVersionStatus.html b/Resources/Private/Templates/Backend/Reports/SolrVersionStatus.html index c4f5fa7873..6141b53614 100644 --- a/Resources/Private/Templates/Backend/Reports/SolrVersionStatus.html +++ b/Resources/Private/Templates/Backend/Reports/SolrVersionStatus.html @@ -1,22 +1,34 @@ -

Found an - outdated Apache Solr server version.
The minimum - required version is {requiredVersion}, you have {currentVersion}.

+ + +

Found an unsupported Apache Solr server version.
+ It is strongly recommended to use one of the explicitly tested versions, preferably the latest one.
+ The currently supported versions are: + + {version}{f:if(condition: '{iterator.isLast}', then: '.', else: ',')} + +
Your version is: {currentVersion}. +

- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +
Affected Solr server
Host{solr.primaryEndpoint.host}
Path{solr.corePath}
Port{solr.primaryEndpoint.port}
Affected Solr server
Host{solr.primaryEndpoint.host}
Path{solr.corePath}
Port{solr.primaryEndpoint.port}
+ + diff --git a/composer.json b/composer.json index 816d51ddf4..e6e97aa645 100644 --- a/composer.json +++ b/composer.json @@ -80,6 +80,12 @@ } }, "scripts": { + "info:solr-versions": [ + "@composer config extra.TYPO3-Solr.version-matrix.Apache-Solr" + ], + "info:recommended-solr-version": [ + "@composer config extra.TYPO3-Solr.version-matrix.Apache-Solr.0" + ], "post-autoload-dump": [ "mkdir -p .Build/vendor/apache-solr-for-typo3", "[ -L .Build/vendor/apache-solr-for-typo3/solr ] || ln -snvf ../../../. .Build/vendor/apache-solr-for-typo3/solr" @@ -143,7 +149,12 @@ "ext-solrconsole": "^12.0", "ext-solrdebugtools": "^12.0", "ext-solrmlt": "^12.0", - "Apache-Solr": "9.3.0", + "Apache-Solr": [ + "9.5.0", + "9.4.1", + "9.4.0", + "9.3.0" + ], "configset": "ext_solr_12_0_0" }, "ext-solrfal": {