From 1f4cb2a203411cf02022b11fd79e435f1a7687dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20R?= <289757+andrerom@users.noreply.github.com> Date: Fri, 13 Nov 2020 17:18:04 +0100 Subject: [PATCH] [CS] Update PHP-CS-Fixer to 2.15.9 in order to support Composer v2 (#3079) * [CS] Update PHP-CS-Fixer to 2.15.9 in order to support Composer v2 Closes #3075 * Force composer root version with solr to make sure to install latests version Workaround for 1.13 branch, AFAIK not to be ported to newer branches. --- .php_cs | 6 ++++++ .travis.yml | 2 +- composer.json | 2 +- .../EventListener/IndexRequestListener.php | 1 - .../FileLister/FileIterator/LegacyStorageFileIterator.php | 2 +- eZ/Bundle/EzPublishRestBundle/Tests/Functional/RoleTest.php | 1 - eZ/Publish/Core/FieldType/Image/ImageStorage.php | 2 +- 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.php_cs b/.php_cs index b3d4aad67c1..7918a92273c 100644 --- a/.php_cs +++ b/.php_cs @@ -26,6 +26,12 @@ return PhpCsFixer\Config::create() 'php_unit_construct' => false, 'standardize_increment' => false, 'fopen_flags' => false, + // Rules changed between php-cs-fixer 2.15.3 and 2.15.9 that we don't care to adapt 6.13 for at this point due to conflicts + 'no_superfluous_phpdoc_tags' => false, + 'ordered_imports' => false, + 'phpdoc_trim' => false, + 'phpdoc_trim_consecutive_blank_line_separation' => false, + 'function_to_constant' => false, ]) ->setRiskyAllowed(true) ->setFinder( diff --git a/.travis.yml b/.travis.yml index d101f78c419..f8846bdb0fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ matrix: env: TEST_CONFIG="phpunit-integration-legacy.xml" DB="postgresql" DATABASE="pgsql://postgres@localhost/testdb" # 7.0 - php: 7.0 - env: SOLR_VERSION="6.4.2" TEST_CONFIG="phpunit-integration-legacy-solr.xml" CUSTOM_CACHE_POOL="singleredis" CORES_SETUP="shared" SOLR_CONFIG="vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/schema.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/custom-fields-types.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/language-fieldtypes.xml" + env: COMPOSER_ROOT_VERSION=6.13.x-dev SOLR_VERSION="6.4.2" TEST_CONFIG="phpunit-integration-legacy-solr.xml" CUSTOM_CACHE_POOL="singleredis" CORES_SETUP="shared" SOLR_CONFIG="vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/schema.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/custom-fields-types.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/language-fieldtypes.xml" # 7.1 - php: 7.1 env: PHP_IMAGE=ezsystems/php:7.1-v1 BEHAT_OPTS="--profile=core --tags=~@broken" RUN_INSTALL=1 SYMFONY_ENV=behat SYMFONY_DEBUG=1 COMPOSER_MEMORY_LIMIT=-1 diff --git a/composer.json b/composer.json index 40a641bd1bd..fe65e4d0ca3 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "twig/twig": "~1.35|~2.4" }, "require-dev": { - "friendsofphp/php-cs-fixer": "2.15.3", + "friendsofphp/php-cs-fixer": "2.15.9", "phpunit/phpunit": "^5.7", "matthiasnoback/symfony-dependency-injection-test": "~1.0", "symfony/assetic-bundle": "~2.8.2", diff --git a/eZ/Bundle/EzPublishCoreBundle/EventListener/IndexRequestListener.php b/eZ/Bundle/EzPublishCoreBundle/EventListener/IndexRequestListener.php index a33271a59cd..b2592ae92a9 100644 --- a/eZ/Bundle/EzPublishCoreBundle/EventListener/IndexRequestListener.php +++ b/eZ/Bundle/EzPublishCoreBundle/EventListener/IndexRequestListener.php @@ -13,7 +13,6 @@ use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpFoundation\Request; class IndexRequestListener implements EventSubscriberInterface { diff --git a/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php b/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php index 484774f58ac..714c04e8ea3 100644 --- a/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php +++ b/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php @@ -19,7 +19,7 @@ final class LegacyStorageFileIterator implements FileIteratorInterface /** @var mixed Last fetched item. */ private $item; - /** @var int Iteration cursor on $statement. */ + /** @var int Iteration cursor on statement. */ private $cursor; /** @var \eZ\Bundle\EzPublishIOBundle\Migration\FileLister\FileRowReaderInterface Used to get file rows. */ diff --git a/eZ/Bundle/EzPublishRestBundle/Tests/Functional/RoleTest.php b/eZ/Bundle/EzPublishRestBundle/Tests/Functional/RoleTest.php index d2f4329b11f..72937764273 100644 --- a/eZ/Bundle/EzPublishRestBundle/Tests/Functional/RoleTest.php +++ b/eZ/Bundle/EzPublishRestBundle/Tests/Functional/RoleTest.php @@ -9,7 +9,6 @@ namespace eZ\Bundle\EzPublishRestBundle\Tests\Functional; use eZ\Bundle\EzPublishRestBundle\Tests\Functional\TestCase as RESTFunctionalTestCase; -use eZ\Publish\API\Repository\Values\User\Limitation; class RoleTest extends RESTFunctionalTestCase { diff --git a/eZ/Publish/Core/FieldType/Image/ImageStorage.php b/eZ/Publish/Core/FieldType/Image/ImageStorage.php index e67ad372225..8870007f687 100644 --- a/eZ/Publish/Core/FieldType/Image/ImageStorage.php +++ b/eZ/Publish/Core/FieldType/Image/ImageStorage.php @@ -37,7 +37,7 @@ class ImageStorage extends GatewayBasedStorage /** @var \eZ\Publish\Core\FieldType\Image\AliasCleanerInterface */ protected $aliasCleaner; - /** @var \eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway $gateway */ + /** @var \eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway */ protected $gateway; public function __construct(