diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 423278b1..468fb28d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -32,7 +32,7 @@ If applicable, add screenshots to help explain your problem. - Browser: [e.g. chrome, safari] - EXT:solr Version: [e.g. 13.0.x] - EXT:tika Version: [e.g. 13.0.2] - - Used Apache Solr Version: [e.g. 9.6.0] + - Used Apache Solr Version: [e.g. 9.7.0] - PHP Version: [e.g. 8.2.0] - MySQL Version: [e.g. 8.0.0] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b99cc0a..1c9645f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,7 +100,7 @@ jobs: name: CI-Bootstrap run: | composer info - composer tests:setup && composer tests:setup:global-require + composer tests:setup echo "Current Size of EXT:tika build Artefacts: " \ && sudo du -sh "${{ env.CI_BUILD_DIRECTORY }}" - @@ -149,7 +149,7 @@ jobs: name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.2 extensions: intl, mbstring, json, zip, curl tools: composer:v2 - diff --git a/Classes/Process.php b/Classes/Process.php index f167c358..bf0c3922 100644 --- a/Classes/Process.php +++ b/Classes/Process.php @@ -102,7 +102,7 @@ public function findPid(): ?int exec($ps, $output); foreach ($output as $line) { - [$pid, $command] = explode(' ', trim($line ?? ''), 2); + [$pid, $command] = explode(' ', trim($line), 2); $command = $this->escapePsOutputCommand($command); if ($command == $processCommand) { return (int)$pid; diff --git a/Tests/Unit/Service/Tika/AbstractServiceTestBase.php b/Tests/Unit/Service/Tika/AbstractServiceTestBase.php index cb3aa712..146615bc 100644 --- a/Tests/Unit/Service/Tika/AbstractServiceTestBase.php +++ b/Tests/Unit/Service/Tika/AbstractServiceTestBase.php @@ -2,10 +2,6 @@ declare(strict_types=1); -namespace ApacheSolrForTypo3\Tika\Tests\Unit\Service\Tika; - -use ApacheSolrForTypo3\Tika\Tests\Unit\UnitTestCase; - /* * This file is part of the TYPO3 CMS project. * @@ -19,7 +15,12 @@ * The TYPO3 project - inspiring people to share! */ +namespace ApacheSolrForTypo3\Tika\Tests\Unit\Service\Tika; + +use ApacheSolrForTypo3\Tika\Service\Tika\AbstractService; +use ApacheSolrForTypo3\Tika\Tests\Unit\UnitTestCase; use PHPUnit\Framework\Attributes\Test; +use PHPUnit\Framework\MockObject\MockObject; /** * Base test class AbstractServiceTestBase @@ -31,6 +32,7 @@ abstract class AbstractServiceTestBase extends UnitTestCase #[Test] public function constructorCallsInitializeService(): void { + /** @var AbstractService&MockObject $service */ $service = $this->getMockBuilder($this->serviceClass) ->onlyMethods(['initializeService']) ->disableOriginalConstructor() diff --git a/composer.json b/composer.json index 0b685008..44c233fa 100644 --- a/composer.json +++ b/composer.json @@ -35,9 +35,10 @@ "require-dev": { "apache-solr-for-typo3/solr": "13.0.x-dev", "dg/bypass-finals": "^1.6", - "phpstan/phpstan": "^1.10", - "phpstan/phpstan-phpunit": "^1.3", + "phpstan/phpstan": "^1.12", + "phpstan/phpstan-phpunit": "^1.4", "phpunit/phpunit": "^11.4", + "sclable/xml-lint": "^0.8.0", "typo3/cms-lowlevel": "*", "typo3/coding-standards": "v0.8.0", "typo3/testing-framework": "dev-main#47bf0daab24b4210221f46a1fde59b9c3e245e39 as 9.0" @@ -77,13 +78,12 @@ "t3:docs:clean": "Deletes all rendered docs created by t3:docs:build or t3:docs:build:prod.", "t3:standards:fix": "Fixes a possible TYPO3 coding standards errors.", - "tests:env": "Checks the requierements in environment for tests.", + "tests:env": "Checks the requirements in environment for tests.", "tests:integration": "Runs integration tests", - "tests:lint-xml": "Lints the XML/XLF files. Depends on global installed sclable/xml-lint. See tests:setup:global-require", + "tests:lint-xml": "Lints the XML/XLF files.", "tests:phpstan": "Runs PHPStan analys", "tests:restore-git": "[Internal script], which is used after tests:setup to restore the composer.json.", - "tests:setup": "Installs composer dependencies, requiered for tests.", - "tests:setup:global-require": "Installs global composer dependencies. Those are moved to global, to avoid collisions and downgrades on libs.", + "tests:setup": "Installs composer dependencies, required for tests.", "tests:unit": "Runs unit tests", "tika:download": "Download Tika binaries/\".jar\" files. App and Server files.", @@ -121,10 +121,6 @@ "if [ -z ${TIKA_PATH+x} ]; then echo \"Can not proceed, because env var TIKA_PATH is not set\"; exit 1; fi", "if echo $TYPO3_VERSION | grep -q \"dev\"; then $COMPOSER_BINARY config minimum-stability dev; fi" ], - "tests:setup:global-require": [ - "echo \"Install global composer dependencies.\"", - "@composer global require sclable/xml-lint --ignore-platform-reqs" - ], "tests:setup": [ "# @todo: Abort if composer.json has not staged/commited changes on composer.json, to avoid losing necessery changes.", "@tests:env", @@ -143,7 +139,7 @@ ], "tests:lint-xml": [ "echo \"Run XML Lint\"", - "if ! $($COMPOSER_BINARY config home)/vendor/bin/xmllint Resources/Private/Language/ --pattern='*.xlf' --exclude=.Build/*; then echo \"Some XML files are not valid\" && echo \"Please fix the files listed above\" && export EXIT_CODE=4; else echo \"No syntax errors! Great job!\"; fi" + "if ! xmllint Resources/Private/Language/ --pattern='*.xlf' --exclude=.Build/*; then echo \"Some XML files are not valid\" && echo \"Please fix the files listed above\" && export EXIT_CODE=4; else echo \"No syntax errors! Great job!\"; fi" ] }, "extra": { @@ -159,7 +155,7 @@ "ext-tika": { "require": { "Tika": "1.28.5", - "Solr": "9.5.*", + "Solr": "9.7.*", "EXT:solr": "13.0.*" } }