diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 202f4e0..af289ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,12 +41,20 @@ lint:php-mass-detection: script: - ./vendor/bin/phpmd src text phpmd.xml > result/phpmd.txt -test:7.1: &PHP-UNITTESTING - image: php:7.1-alpine +test:5.6: &PHP-UNITTESTING + image: php:5.6-alpine stage: test script: - ./vendor/bin/phpunit +test:7.0: + <<: *PHP-UNITTESTING + image: php:7.0-alpine + +test:7.1: + <<: *PHP-UNITTESTING + image: php:7.1-alpine + test:latest: <<: *PHP-UNITTESTING image: php:7-alpine diff --git a/Documentation/source/index.rst b/Documentation/source/index.rst index 709f4ec..1dd04c3 100644 --- a/Documentation/source/index.rst +++ b/Documentation/source/index.rst @@ -19,7 +19,8 @@ Requirements To install the project you need ``composer`` to be installed and inside your ``$PATH``. Otherwise run ``make install-composer`` to install composer. -At least PHP 7.1 is required. +We recommend to use at least PHP 5.6, we do not test with lower versions as 5.6 is latest maintained +version. Installation ============ diff --git a/composer.json b/composer.json index 87aab93..623bfde 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ ] }, "require": { - "php": "~7.1", + "php": ">=5.6", "helmich/typo3-typoscript-parser": "1.1.*", "squizlabs/php_codesniffer": "2.8.*", "symfony/yaml": "3.2.*", diff --git a/src/Standards/Typo3Update/Feature/AbstractYamlRemovedUsage.php b/src/Standards/Typo3Update/Feature/AbstractYamlRemovedUsage.php index 9395d44..d5463d6 100644 --- a/src/Standards/Typo3Update/Feature/AbstractYamlRemovedUsage.php +++ b/src/Standards/Typo3Update/Feature/AbstractYamlRemovedUsage.php @@ -49,10 +49,17 @@ abstract class AbstractYamlRemovedUsage implements FeatureInterface $this->sniff = $sniff; $this->configured = new RemovedByYamlConfiguration( $this->getRemovedConfigFiles(), - \Closure::fromCallable([$this, 'prepareStructure']) + $this->getPrepateStructure() ); } + protected function getPrepateStructure() + { + return function (array $typo3Versions) { + return call_user_func_array([$this, 'prepareStructure'], [$typo3Versions]); + }; + } + /** * Prepares structure from config for later usage. * diff --git a/src/Standards/Typo3Update/Sniffs/Removed/AbstractGenericUsage.php b/src/Standards/Typo3Update/Sniffs/Removed/AbstractGenericUsage.php index ff67d4f..ba2ba40 100644 --- a/src/Standards/Typo3Update/Sniffs/Removed/AbstractGenericUsage.php +++ b/src/Standards/Typo3Update/Sniffs/Removed/AbstractGenericUsage.php @@ -39,10 +39,17 @@ abstract class AbstractGenericUsage implements PhpCsSniff { $this->configured = new RemovedByYamlConfiguration( $this->getRemovedConfigFiles(), - \Closure::fromCallable([$this, 'prepareStructure']) + $this->getPrepateStructure() ); } + protected function getPrepateStructure() + { + return function (array $typo3Versions) { + return call_user_func_array([$this, 'prepareStructure'], [$typo3Versions]); + }; + } + /** * Prepares structure from config for later usage. *