diff --git a/Build/Test/bootstrap.sh b/Build/Test/bootstrap.sh index b058fa5ef1..5f098935d7 100755 --- a/Build/Test/bootstrap.sh +++ b/Build/Test/bootstrap.sh @@ -91,23 +91,7 @@ echo "Using extension path $EXTENSION_ROOTPATH" echo "Using package path $TYPO3_PATH_PACKAGES" echo "Using web path $TYPO3_PATH_WEB" -# Install TYPO3 sources -if [[ $TYPO3_VERSION = *"main"* ]]; then - composer config minimum-stability dev -fi - -if ! composer require --dev --update-with-dependencies --prefer-source \ - typo3/cms-core:"$TYPO3_VERSION" \ - typo3/cms-backend:"$TYPO3_VERSION" \ - typo3/cms-recordlist:"$TYPO3_VERSION" \ - typo3/cms-fluid:"$TYPO3_VERSION" \ - typo3/cms-fluid-styled-content:"$TYPO3_VERSION" \ - typo3/cms-frontend:"$TYPO3_VERSION" \ - typo3/cms-extbase:"$TYPO3_VERSION" \ - typo3/cms-reports:"$TYPO3_VERSION" \ - typo3/cms-scheduler:"$TYPO3_VERSION" \ - typo3/cms-tstemplate:"$TYPO3_VERSION" \ - typo3/cms-install:"$TYPO3_VERSION" +if ! composer tests:setup then echo "The test environment could not be installed by composer as expected. Please fix this issue." exit 1 diff --git a/Build/Test/cibuild.sh b/Build/Test/cibuild.sh index f8840ffa32..a3a7f6ddab 100755 --- a/Build/Test/cibuild.sh +++ b/Build/Test/cibuild.sh @@ -43,7 +43,7 @@ else echo "Some files are not compliant to TYPO3 Coding Standards" echo "Please fix the files listed above." echo "Tip for auto fix: " - echo " composer install && composer exec php-cs-fixer fix" + echo " TYPO3_VERSION="${TYPO3_VERSION}" composer tests:setup && composer t3:standards:fix" exit 1 else echo "The code is TYPO3 Coding Standards compliant! Great job!" diff --git a/Classes/ViewHelpers/TranslateViewHelper.php b/Classes/ViewHelpers/TranslateViewHelper.php index ca87657e3e..2ffc05a347 100644 --- a/Classes/ViewHelpers/TranslateViewHelper.php +++ b/Classes/ViewHelpers/TranslateViewHelper.php @@ -42,7 +42,6 @@ class TranslateViewHelper extends AbstractViewHelper * Register required keys for translation * * @see \TYPO3\CMS\Fluid\ViewHelpers\TranslateViewHelper::initializeArguments - * @return void */ public function initializeArguments(): void { diff --git a/Tests/Integration/GarbageCollectorTest.php b/Tests/Integration/GarbageCollectorTest.php index c0e97047fa..bc37c6b125 100644 --- a/Tests/Integration/GarbageCollectorTest.php +++ b/Tests/Integration/GarbageCollectorTest.php @@ -41,7 +41,7 @@ class GarbageCollectorTest extends IntegrationTest /** * @var array */ - protected $coreExtensionsToLoad = [ + protected array $coreExtensionsToLoad = [ 'extensionmanager', 'scheduler', ]; diff --git a/Tests/Integration/IndexQueue/RecordMonitorTest.php b/Tests/Integration/IndexQueue/RecordMonitorTest.php index 1acae208b7..015530ed71 100644 --- a/Tests/Integration/IndexQueue/RecordMonitorTest.php +++ b/Tests/Integration/IndexQueue/RecordMonitorTest.php @@ -46,7 +46,7 @@ class RecordMonitorTest extends IntegrationTest /** * @var array */ - protected $coreExtensionsToLoad = [ + protected array $coreExtensionsToLoad = [ 'extensionmanager', 'scheduler', ]; diff --git a/Tests/Integration/IntegrationTest.php b/Tests/Integration/IntegrationTest.php index 80e2dcbe88..91417ff3b5 100644 --- a/Tests/Integration/IntegrationTest.php +++ b/Tests/Integration/IntegrationTest.php @@ -64,7 +64,7 @@ abstract class IntegrationTest extends FunctionalTestCase { use SiteBasedTestTrait; - protected $coreExtensionsToLoad = [ + protected array $coreExtensionsToLoad = [ 'scheduler', 'fluid_styled_content', ]; @@ -81,7 +81,7 @@ abstract class IntegrationTest extends FunctionalTestCase /** * @var array */ - protected $testExtensionsToLoad = [ + protected array $testExtensionsToLoad = [ 'typo3conf/ext/solr', ]; @@ -97,17 +97,12 @@ abstract class IntegrationTest extends FunctionalTestCase /** * @var array */ - protected $configurationToUseInTestInstance = [ + protected array $configurationToUseInTestInstance = [ 'SYS' => [ 'exceptionalErrors' => E_WARNING | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED, ], ]; - /** - * @var string - */ - protected $instancePath; - /** * If set to true in subclasses, the import of configured root pages will be skipped. * diff --git a/Tests/Integration/Task/EventQueueWorkerTaskTest.php b/Tests/Integration/Task/EventQueueWorkerTaskTest.php index b78d7aae4d..2b6a3e3e31 100644 --- a/Tests/Integration/Task/EventQueueWorkerTaskTest.php +++ b/Tests/Integration/Task/EventQueueWorkerTaskTest.php @@ -35,7 +35,7 @@ class EventQueueWorkerTaskTest extends IntegrationTest /** * @var array */ - protected $coreExtensionsToLoad = [ + protected array $coreExtensionsToLoad = [ 'extensionmanager', 'scheduler', ]; diff --git a/Tests/Integration/Task/IndexQueueWorkerTaskTest.php b/Tests/Integration/Task/IndexQueueWorkerTaskTest.php index 2fbe2b3ee3..4325a2fa7d 100644 --- a/Tests/Integration/Task/IndexQueueWorkerTaskTest.php +++ b/Tests/Integration/Task/IndexQueueWorkerTaskTest.php @@ -43,7 +43,7 @@ class IndexQueueWorkerTaskTest extends IntegrationTest /** * @var array */ - protected $coreExtensionsToLoad = [ + protected array $coreExtensionsToLoad = [ 'scheduler', ]; diff --git a/Tests/Integration/Task/ReIndexTaskTest.php b/Tests/Integration/Task/ReIndexTaskTest.php index ee3bb75e0d..8f530983bd 100644 --- a/Tests/Integration/Task/ReIndexTaskTest.php +++ b/Tests/Integration/Task/ReIndexTaskTest.php @@ -52,7 +52,7 @@ class ReIndexTaskTest extends IntegrationTest /** * @var array */ - protected $coreExtensionsToLoad = [ + protected array $coreExtensionsToLoad = [ 'scheduler', ]; diff --git a/Tests/Unit/UnitTest.php b/Tests/Unit/UnitTest.php index 4612bd48b7..841ee3b3b0 100644 --- a/Tests/Unit/UnitTest.php +++ b/Tests/Unit/UnitTest.php @@ -27,7 +27,7 @@ */ abstract class UnitTest extends UnitTestCase { - protected $resetSingletonInstances = true; + protected bool $resetSingletonInstances = true; protected function setUp(): void { diff --git a/composer.json b/composer.json index bf6052666e..98549d5511 100644 --- a/composer.json +++ b/composer.json @@ -21,14 +21,14 @@ "docs": "https://docs.typo3.org/p/apache-solr-for-typo3/solr/main/en-us/" }, "require": { - "php": "^7.4.0 || ^8.0", + "php": "^8.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-simplexml": "*", "solarium/solarium": "6.2.7", "typo3/cms-backend": "*", - "typo3/cms-core": "^12.0.0 || dev-main", + "typo3/cms-core": "^12", "typo3/cms-extbase": "*", "typo3/cms-fluid": "*", "typo3/cms-frontend": "*", @@ -40,7 +40,7 @@ "typo3/coding-standards": ">=0.5.0", "phpunit/phpunit": "^9.5", "phpspec/prophecy-phpunit":"*", - "typo3/testing-framework": "^6.12", + "typo3/testing-framework": "dev-main", "typo3/cms-fluid-styled-content": "*", "scrutinizer/ocular": "*", "sclable/xml-lint": "*" @@ -58,7 +58,7 @@ "autoload-dev": { "psr-4": { "ApacheSolrForTypo3\\Solr\\Tests\\": "Tests/", - "TYPO3\\CMS\\Core\\Tests\\": ".Build/Web/typo3/sysext/core/Tests/" + "TYPO3\\CMS\\Core\\Tests\\": ".Build/Web/vendor/typo3/cms-core/Tests/" } }, "minimum-stability": "stable", @@ -82,7 +82,7 @@ "tests:restore-git": "echo \"Retore composer.json to initial state:\" && git checkout composer.json", "tests:env": [ "if [ -z ${TYPO3_VERSION+x} ]; then >&2 echo \"Can not proceed, because env var TYPO3_VERSION is not set\"; exit 1; else echo \"Setup test environment for TYPO3 ${TYPO3_VERSION}\"; fi", - "if [ \"${TYPO3_VERSION#*dev}\" != \"dev\" ]; then $COMPOSER_BINARY config minimum-stability dev; fi" + "if [ $(echo $TYPO3_VERSION | grep -c dev) -eq 1 ]; then $COMPOSER_BINARY config minimum-stability dev; fi" ], "tests:setup": [ "@tests:env",