TYPO3-Solr / ext-tika

A TYPO3 CMS extension that provides Apache Tika functionality
GNU General Public License v3.0
7 stars 29 forks source link

[BUG] SolrCell broken #212

Closed dkd-friedrich closed 1 year ago

dkd-friedrich commented 1 year ago

Describe the bug

EXT:solr 12 requires separate configurations for core and path, if authentication is required also username and password must be given separately.

Configuration options and connection initialization in SolrCellService and TikaStatus have to be adapted.

To Reproduce

Expected behavior

Used versions (please complete the following information):

dkd-kaehm commented 1 year ago

See https://github.com/TYPO3-Solr/ext-tika/actions/runs/6271604515/job/17768895917#step:9:66 (available up to 2023.11.17):

Run PHPStan analysis
> phpstan analyze -c Build/Test/phpstan.neon
  0/34 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0%
 34/34 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

Error: Call to an undefined method ApacheSolrForTypo3\Solr\ConnectionManager::getSolrConnectionForNodes().
 ------ ------------------------------------------------------------------------- 
  Line   Classes/Service/Tika/SolrCellService.php                                 
 ------ ------------------------------------------------------------------------- 
  55     Call to an undefined method                                              
         ApacheSolrForTypo3\Solr\ConnectionManager::getSolrConnectionForNodes().  
 ------ ------------------------------------------------------------------------- 

Error:  [ERROR] Found 1 error                                                          

Script phpstan analyze -c Build/Test/phpstan.neon handling the tests:phpstan event returned with error code 1
Error during running the PHPStan analysis, please check and fix them.
Tip for working on them: 
  TYPO3_VERSION="12.4.x-dev" composer tests:setup && composer tests:phpstan

Run unit tests
> phpunit --colors -c Build/Test/UnitTests.xml --bootstrap=Build/Test/UnitTestsBootstrap.php '--coverage-clover=coverage.unit.clover'
PHPUnit 9.6.13 by Sebastian Bergmann and contributors.

..............                                                    14 / 14 (100%)

Time: 00:00.219, Memory: 40.00 MB

OK (14 tests, 60 assertions)

Generating code coverage report in Clover XML format ... done [00:00.057]

Run integration tests
> phpunit --colors -c Build/Test/IntegrationTests.xml --bootstrap=Build/Test/IntegrationTestsBootstrap.php '--coverage-clover=coverage.integration.clover'
PHPUnit 9.6.13 by Sebastian Bergmann and contributors.

.......................................................E.EEEEE    62 / 62 (100%)

Time: 02:29.411, Memory: 12.00 MB

There were 6 errors:

1) ApacheSolrForTypo3\Tika\Tests\Integration\Service\Tika\ServiceFactoryTest::getTikaReturnsSolrCellServiceForSolrExtractor
Error: Call to undefined method ApacheSolrForTypo3\Solr\ConnectionManager::getSolrConnectionForNodes()

/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/SolrCellService.php:55
/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/AbstractService.php:48
/home/runner/work/ext-tika/ext-tika/.Build/vendor/typo3/cms-core/Classes/Utility/GeneralUtility.php:2969
/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/ServiceFactory.php:52
/home/runner/work/ext-tika/ext-tika/Tests/Integration/Service/Tika/ServiceFactoryTest.php:74

2) ApacheSolrForTypo3\Tika\Tests\Integration\Service\Tika\SolrCellServiceTest::newInstancesAreInitializedWithASolrConnection
Error: Call to undefined method ApacheSolrForTypo3\Solr\ConnectionManager::getSolrConnectionForNodes()

/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/SolrCellService.php:55
/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/AbstractService.php:48
/home/runner/work/ext-tika/ext-tika/Tests/Integration/Service/Tika/SolrCellServiceTest.php:49

3) ApacheSolrForTypo3\Tika\Tests\Integration\Service\Tika\SolrCellServiceTest::extractByQueryTextReturnsTextElementFromResponse
Error: Call to undefined method ApacheSolrForTypo3\Solr\ConnectionManager::getSolrConnectionForNodes()

/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/SolrCellService.php:55
/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/AbstractService.php:48
/home/runner/work/ext-tika/ext-tika/Tests/Integration/Service/Tika/SolrCellServiceTest.php:78

4) ApacheSolrForTypo3\Tika\Tests\Integration\Service\Tika\SolrCellServiceTest::extractByQueryTextUsesSolariumExtractQuery
Error: Call to undefined method ApacheSolrForTypo3\Solr\ConnectionManager::getSolrConnectionForNodes()

/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/SolrCellService.php:55
/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/AbstractService.php:48
/home/runner/work/ext-tika/ext-tika/Tests/Integration/Service/Tika/SolrCellServiceTest.php:111

5) ApacheSolrForTypo3\Tika\Tests\Integration\Service\Tika\SolrCellServiceTest::extractMetaDataUsesSolariumExtractQuery
Error: Call to undefined method ApacheSolrForTypo3\Solr\ConnectionManager::getSolrConnectionForNodes()

/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/SolrCellService.php:55
/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/AbstractService.php:48
/home/runner/work/ext-tika/ext-tika/Tests/Integration/Service/Tika/SolrCellServiceTest.php:151

6) ApacheSolrForTypo3\Tika\Tests\Integration\Service\Tika\SolrCellServiceTest::extractsMetaDataFromMp3File
Error: Call to undefined method ApacheSolrForTypo3\Solr\ConnectionManager::getSolrConnectionForNodes()

/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/SolrCellService.php:55
/home/runner/work/ext-tika/ext-tika/Classes/Service/Tika/AbstractService.php:48
/home/runner/work/ext-tika/ext-tika/Tests/Integration/Service/Tika/SolrCellServiceTest.php:171