Skip to content

Commit

Permalink
[TASK] Update dependencies for TYPO3 13.0.x
Browse files Browse the repository at this point in the history
Updates dev dependencies for TYPO3 13 LTS:

*   phpstan/phpstan: ^1.12
*   phpstan/phpstan-phpunit: ^1.4
*   sclable/xml-lint: 0.8.0 (former global requirement)
*   Apache Solr: 9.7
  • Loading branch information
dkd-friedrich committed Oct 7, 2024
1 parent e38da56 commit 3a7fe80
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
-
Expand Down Expand Up @@ -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
-
Expand Down
2 changes: 1 addition & 1 deletion Classes/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 6 additions & 4 deletions Tests/Unit/Service/Tika/AbstractServiceTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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
Expand All @@ -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()
Expand Down
20 changes: 8 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand All @@ -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": {
Expand All @@ -159,7 +155,7 @@
"ext-tika": {
"require": {
"Tika": "1.28.5",
"Solr": "9.5.*",
"Solr": "9.7.*",
"EXT:solr": "13.0.*"
}
}
Expand Down

0 comments on commit 3a7fe80

Please sign in to comment.