summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-06-03 14:05:05 +0200
committerRemi Collet <remi@remirepo.net>2021-06-03 14:05:05 +0200
commitbd534f4aafa78da6a81b99500219c6386efd74c0 (patch)
tree38c7b6cbccdaa7b4360a310a799676b78dfbc6d9
parentd52108110ae2a1ac8cb468c74d6dc87a40095149 (diff)
update to 3.0.0
rename to php-cs-fixer3 install php-cs-fixer3 command and use /usr/share/php/PhpCsFixer3 switch to Symfony 4 raise dependency on composer/semver 3.2 raise dependency on doctrine/annotations 1.12
-rw-r--r--composer-diff.json15
-rw-r--r--composer.json65
-rw-r--r--php-cs-fixer3-autoload.patch18
-rw-r--r--php-cs-fixer3.spec213
4 files changed, 129 insertions, 182 deletions
diff --git a/composer-diff.json b/composer-diff.json
index 2c4b3ad..910267f 100644
--- a/composer-diff.json
+++ b/composer-diff.json
@@ -1,6 +1,6 @@
{
"name": "php-cs-fixer/diff",
- "description": "sebastian/diff v2 backport support for PHP5.6",
+ "description": "sebastian/diff v3 backport support for PHP 5.6+",
"keywords": ["diff"],
"homepage": "https://github.com/PHP-CS-Fixer",
"license": "BSD-3-Clause",
@@ -12,9 +12,6 @@
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
- },
- {
- "name": "SpacePossum"
}
],
"require": {
@@ -24,6 +21,10 @@
"phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
"symfony/process": "^3.3"
},
+ "config": {
+ "optimize-autoloader": true,
+ "sort-packages": true
+ },
"autoload": {
"classmap": [
"src/"
@@ -31,11 +32,7 @@
},
"autoload-dev": {
"psr-4": {
- "PhpCsFixer\\Diff\\v1_4\\Tests\\": "tests/v1_4",
- "PhpCsFixer\\Diff\\v2_0\\Tests\\": "tests/v2_0",
- "PhpCsFixer\\Diff\\v3_0\\": "tests/v3_0",
- "PhpCsFixer\\Diff\\GeckoPackages\\DiffOutputBuilder\\Tests\\": "tests/GeckoPackages/DiffOutputBuilder/Tests",
- "PhpCsFixer\\Diff\\GeckoPackages\\DiffOutputBuilder\\Utils\\": "tests/GeckoPackages/DiffOutputBuilder/Utils"
+ "PhpCsFixer\\Diff\\": "tests"
}
}
}
diff --git a/composer.json b/composer.json
index b53d2b4..2f8600d 100644
--- a/composer.json
+++ b/composer.json
@@ -14,71 +14,50 @@
}
],
"require": {
- "php": "^5.6 || ^7.0 || ^8.0",
+ "php": "^7.1.3 || ^8.0",
"ext-json": "*",
"ext-tokenizer": "*",
- "composer/semver": "^1.4 || ^2.0 || ^3.0",
- "composer/xdebug-handler": "^1.2 || ^2.0",
- "doctrine/annotations": "^1.2",
- "php-cs-fixer/diff": "^1.3",
- "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0",
- "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0",
- "symfony/filesystem": "^3.0 || ^4.0 || ^5.0",
- "symfony/finder": "^3.0 || ^4.0 || ^5.0",
- "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0",
- "symfony/polyfill-php70": "^1.0",
- "symfony/polyfill-php72": "^1.4",
- "symfony/process": "^3.0 || ^4.0 || ^5.0",
- "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
+ "composer/semver": "^3.2",
+ "composer/xdebug-handler": "^2.0",
+ "doctrine/annotations": "^1.12",
+ "php-cs-fixer/diff": "^2.0",
+ "symfony/console": "^4.4.20 || ^5.1.3",
+ "symfony/event-dispatcher": "^4.4.20 || ^5.0",
+ "symfony/filesystem": "^4.4.20 || ^5.0",
+ "symfony/finder": "^4.4.20 || ^5.0",
+ "symfony/options-resolver": "^4.4.20 || ^5.0",
+ "symfony/polyfill-php72": "^1.22",
+ "symfony/process": "^4.4.20 || ^5.0",
+ "symfony/stopwatch": "^4.4.20 || ^5.0"
},
"require-dev": {
- "justinrainbow/json-schema": "^5.0",
+ "justinrainbow/json-schema": "^5.2",
"keradus/cli-executor": "^1.4",
- "mikey179/vfsstream": "^1.6",
- "php-coveralls/php-coveralls": "^2.4.2",
- "php-cs-fixer/accessible-object": "^1.0",
+ "mikey179/vfsstream": "^1.6.8",
+ "php-coveralls/php-coveralls": "^2.4.3",
+ "php-cs-fixer/accessible-object": "^1.1",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
+ "phpspec/prophecy": "^1.10.3",
"phpspec/prophecy-phpunit": "^1.1 || ^2.0",
- "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5",
"phpunitgoodpractices/polyfill": "^1.5",
"phpunitgoodpractices/traits": "^1.9.1",
- "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
- "symfony/phpunit-bridge": "^5.2.1",
- "symfony/yaml": "^3.0 || ^4.0 || ^5.0"
+ "symfony/phpunit-bridge": "^5.2.4",
+ "symfony/yaml": "^4.4.20 || ^5.0"
},
"suggest": {
"ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters.",
- "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
- "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
"symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
},
"config": {
"sort-packages": true
},
- "extra": {
- "branch-alias": {
- "dev-master": "2.19-dev"
- }
- },
"autoload": {
"psr-4": {
"PhpCsFixer\\": "src/"
- },
- "classmap": [
- "tests/Test/AbstractFixerTestCase.php",
- "tests/Test/AbstractIntegrationCaseFactory.php",
- "tests/Test/AbstractIntegrationTestCase.php",
- "tests/Test/Assert/AssertTokensTrait.php",
- "tests/Test/IntegrationCase.php",
- "tests/Test/IntegrationCaseFactory.php",
- "tests/Test/IntegrationCaseFactoryInterface.php",
- "tests/Test/InternalIntegrationCaseFactory.php",
- "tests/Test/IsIdenticalConstraint.php",
- "tests/Test/TokensWithObservedTransformers.php",
- "tests/TestCase.php"
- ]
+ }
},
"autoload-dev": {
"psr-4": {
diff --git a/php-cs-fixer3-autoload.patch b/php-cs-fixer3-autoload.patch
index e24ef55..6c348f2 100644
--- a/php-cs-fixer3-autoload.patch
+++ b/php-cs-fixer3-autoload.patch
@@ -1,7 +1,7 @@
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
--- ./php-cs-fixer.rpm 2020-12-08 10:29:13.190515695 +0100
+++ ./php-cs-fixer 2020-12-08 10:30:26.191258296 +0100
-@@ -52,39 +52,7 @@ set_error_handler(static function ($seve
+@@ -67,39 +67,7 @@ set_error_handler(static function ($seve
}
});
@@ -38,26 +38,14 @@ diff -up ./php-cs-fixer.rpm ./php-cs-fixer
- unset($possibleFiles, $possibleFile, $file);
-}
-unset($require);
-+require_once '/usr/share/php/PhpCsFixer/autoload.php';
++require_once '/usr/share/php/PhpCsFixer3/autoload.php';
use Composer\XdebugHandler\XdebugHandler;
use PhpCsFixer\Console\Application;
-diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCommand.php
---- ./src/Console/Command/HelpCommand.php.rpm 2020-12-08 07:57:58.000000000 +0100
-+++ ./src/Console/Command/HelpCommand.php 2020-12-08 10:29:13.190515695 +0100
-@@ -374,6 +374,8 @@ EOF
- {
- static $version = null;
-
-+ return Application::VERSION;
-+
- if (null !== $version) {
- return $version;
- }
diff -up ./tests/AutoReview/ProjectCodeTest.php.rpm ./tests/AutoReview/ProjectCodeTest.php
--- ./tests/AutoReview/ProjectCodeTest.php.rpm 2020-12-08 07:57:59.000000000 +0100
+++ ./tests/AutoReview/ProjectCodeTest.php 2020-12-08 10:29:13.190515695 +0100
-@@ -690,8 +690,11 @@ final class ProjectCodeTest extends Test
+@@ -721,8 +721,11 @@ final class ProjectCodeTest extends Test
->files()
->name('*.php')
->in(__DIR__.'/../../src')
diff --git a/php-cs-fixer3.spec b/php-cs-fixer3.spec
index 5a08473..3434995 100644
--- a/php-cs-fixer3.spec
+++ b/php-cs-fixer3.spec
@@ -1,4 +1,4 @@
-# remirepo/fedora spec file for php-cs-fixer
+# remirepo/fedora spec file for php-cs-fixer3
#
# Copyright (c) 2016-2021 Remi Collet
# License: CC-BY-SA
@@ -10,23 +10,24 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit d5b8a9d852b292c2f8a035200fa6844b1f82300b
+%global gh_commit c15377bdfa8d1ecf186f1deadec39c89984e1167
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner FriendsOfPHP
%global gh_project PHP-CS-Fixer
%global php_home %{_datadir}/php
%global with_tests 0%{!?_without_tests:1}
+%global major 3
# Bundled this fork which is not designed for use outside of php-cs-fixer
# https://github.com/PHP-CS-Fixer/diff/releases
%global gh_diff_owner PHP-CS-Fixer
-%global gh_diff_version 1.3.1
-%global gh_diff_commit dbd31aeb251639ac0b9e7e29405c1441907f5759
+%global gh_diff_version 2.0.2
+%global gh_diff_commit 29dc0d507e838c4580d018bd8b5cb412474f7ec3
%global gh_diff_short %(c=%{gh_diff_commit}; echo ${c:0:7})
-Name: php-cs-fixer
-Version: 2.19.0
+Name: php-cs-fixer%{major}
+Version: 3.0.0
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
@@ -48,25 +49,25 @@ BuildRequires: php(language) >= 7.3
BuildRequires: php-tokenizer
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4)
-BuildRequires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 3)
-BuildRequires: (php-composer(doctrine/annotations) >= 1.2 with php-composer(doctrine/annotations) < 2)
-BuildRequires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2)
+BuildRequires: (php-composer(composer/semver) >= 3.2 with php-composer(composer/semver) < 4)
+BuildRequires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 3)
+BuildRequires: (php-composer(doctrine/annotations) >= 1.12 with php-composer(doctrine/annotations) < 2)
+BuildRequires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2)
# remirepo:6
%else
-BuildRequires: php-composer-semver3 >= 3.0
+BuildRequires: php-composer-semver3 >= 3.2
BuildRequires: php-composer-xdebug-handler2 >= 2.0
-BuildRequires: php-doctrine-annotations >= 1.2
+BuildRequires: php-doctrine-annotations >= 1.12
BuildRequires: php-phpunit-diff >= 1.4
%endif
-BuildRequires: php-symfony3-console
-BuildRequires: php-symfony3-event-dispatcher
-BuildRequires: php-symfony3-filesystem
-BuildRequires: php-symfony3-finder
-BuildRequires: php-symfony3-options-resolver
-BuildRequires: php-symfony3-process
-BuildRequires: php-symfony3-stopwatch
-BuildRequires: php-symfony3-yaml
+BuildRequires: php-symfony4-console >= 4.4.20
+BuildRequires: php-symfony4-event-dispatcher >= 4.4.20
+BuildRequires: php-symfony4-filesystem >= 4.4.20
+BuildRequires: php-symfony4-finder >= 4.4.20
+BuildRequires: php-symfony4-options-resolver >= 4.4.20
+BuildRequires: php-symfony4-process >= 4.4.20
+BuildRequires: php-symfony4-stopwatch >= 4.4.20
+BuildRequires: php-symfony4-yaml >= 4.4.20
BuildRequires: php-mbstring
BuildRequires: php-xml
BuildRequires: php-reflection
@@ -77,50 +78,50 @@ BuildRequires: php-phar
BuildRequires: php-spl
BuildRequires: php-xml
# Missing dependency for Console
-BuildRequires: php-symfony3-debug
-BuildRequires: php-symfony3-debug
+BuildRequires: php-symfony4-debug
+BuildRequires: php-symfony4-debug
# From composer.json, "require-dev": {
# NOTICE: listener disabled during test suite
# "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
# "keradus/cli-executor": "^1.4",
-# "justinrainbow/json-schema": "^5.0",
-# "mikey179/vfsstream": "^1.6",
-# "php-coveralls/php-coveralls": "^2.4.1",
-# "php-cs-fixer/accessible-object": "^1.0",
+# "justinrainbow/json-schema": "^5.2",
+# "mikey179/vfsstream": "^1.6.8",
+# "php-coveralls/php-coveralls": "^2.4.3",
+# "php-cs-fixer/accessible-object": "^1.1",
# "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
# "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
+# "phpspec/prophecy": "^1.10.3",
# "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
-# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5",
+# "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5",
# "phpunitgoodpractices/polyfill": "^1.5",
# "phpunitgoodpractices/traits": "^1.9.1",
-# "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
-# "symfony/phpunit-bridge": "^5.2.1",
-# "symfony/yaml": "^3.0 || ^4.0 || ^5.0"
+# "symfony/phpunit-bridge": "^5.2.4",
+# "symfony/yaml": "^4.4.20 || ^5.0"
# ignored as test using it fail strangely
#BuildRequires: php-composer(keradus/cli-executor) < 2
#BuildRequires: php-composer(keradus/cli-executor) >= 1.0
# remirepo:1
%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(justinrainbow/json-schema) >= 5.0 with php-composer(justinrainbow/json-schema) < 6)
-BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6 with php-composer(mikey179/vfsstream) < 2)
-BuildRequires: (php-composer(php-cs-fixer/accessible-object) >= 1.0 with php-composer(php-cs-fixer/accessible-object) < 2)
-BuildRequires: (php-composer(php-cs-fixer/phpunit-constraint-isidenticalstring) >= 1.2 with php-composer(php-cs-fixer/phpunit-constraint-isidenticalstring) < 2)
-BuildRequires: (php-composer(php-cs-fixer/phpunit-constraint-xmlmatchesxsd) >= 1.2.1 with php-composer(php-cs-fixer/phpunit-constraint-xmlmatchesxsd) < 2)
-BuildRequires: (php-composer(phpspec/prophecy-phpunit) >= 2.0 with php-composer(phpspec/prophecy-phpunit) < 3)
-BuildRequires: (php-composer(phpunitgoodpractices/polyfill) >= 1.5 with php-composer(phpunitgoodpractices/polyfill) < 2)
-BuildRequires: (php-composer(phpunitgoodpractices/traits) >= 1.9.1 with php-composer(phpunitgoodpractices/traits) < 2)
-BuildRequires: (php-composer(sanmai/phpunit-legacy-adapter) >= 8.2.1 with php-composer(sanmai/phpunit-legacy-adapter) < 9)
+BuildRequires: (php-composer(justinrainbow/json-schema) >= 5.2 with php-composer(justinrainbow/json-schema) < 6)
+BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6.8 with php-composer(mikey179/vfsstream) < 2)
+BuildRequires: (php-composer(php-cs-fixer/accessible-object) >= 1.0 with php-composer(php-cs-fixer/accessible-object) < 2)
+BuildRequires: (php-composer(php-cs-fixer/phpunit-constraint-isidenticalstring) >= 1.2 with php-composer(php-cs-fixer/phpunit-constraint-isidenticalstring) < 2)
+BuildRequires: (php-composer(php-cs-fixer/phpunit-constraint-xmlmatchesxsd) >= 1.2.1 with php-composer(php-cs-fixer/phpunit-constraint-xmlmatchesxsd) < 2)
+BuildRequires: (php-composer(phpspec/prophecy) >= 1.10.3 with php-composer(phpspec/prophecy) < 3)
+BuildRequires: (php-composer(phpspec/prophecy-phpunit) >= 2.0 with php-composer(phpspec/prophecy-phpunit) < 3)
+BuildRequires: (php-composer(phpunitgoodpractices/polyfill) >= 1.5 with php-composer(phpunitgoodpractices/polyfill) < 2)
+BuildRequires: (php-composer(phpunitgoodpractices/traits) >= 1.9.1 with php-composer(phpunitgoodpractices/traits) < 2)
# remirepo:11
%else
-BuildRequires: php-justinrainbow-json-schema5
-BuildRequires: php-mikey179-vfsstream >= 1.6
+BuildRequires: php-justinrainbow-json-schema5 >= 5.2
+BuildRequires: php-mikey179-vfsstream >= 1.6.8
BuildRequires: php-cs-fixer-accessible-object
BuildRequires: php-cs-fixer-phpunit-constraint-isidenticalstring >= 1.2
BuildRequires: php-cs-fixer-phpunit-constraint-xmlmatchesxsd >= 1.2.1
+BuildRequires: php-phpspec-prophecy >= 1.10.3
BuildRequires: php-phpspec-prophecy-phpunit >= 2.0
BuildRequires: php-phpunitgoodpractices-polyfill >= 1.5
BuildRequires: php-phpunitgoodpractices-traits >= 1.9.1
-BuildRequires: php-sanmai-phpunit-legacy-adapter >= 8.2.1
%endif
%global phpunit %{_bindir}/phpunit9
BuildRequires: phpunit9 >= 9.4.4
@@ -129,69 +130,62 @@ BuildRequires: phpunit9
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
-# "php": "^5.6 || ^7.0 || ^8.0",
+# "php": "^7.1.3 || ^8.0",
# "ext-json": "*",
# "ext-tokenizer": "*",
-# "composer/semver": "^1.4 || ^2.0 || ^3.0",
-# "composer/xdebug-handler": "^1.2 || ^2.0",
-# "doctrine/annotations": "^1.2",
-# "php-cs-fixer/diff": "^1.3",
-# "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0",
-# "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0",
-# "symfony/filesystem": "^3.0 || ^4.0 || ^5.0",
-# "symfony/finder": "^3.0 || ^4.0 || ^5.0",
-# "symfony/options-resolver": "^3.0 || ^4.0",
-# "symfony/polyfill-php70": "^1.0",
-# "symfony/polyfill-php72": "^1.4",
-# "symfony/polyfill-xml": "^1.3",
-# "symfony/process": "^3.0 || ^4.0 || ^5.0",
-# "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
+# "composer/semver": "^3.2",
+# "composer/xdebug-handler": "^2.0",
+# "doctrine/annotations": "^1.12",
+# "php-cs-fixer/diff": "^2.0",
+# "symfony/console": "^4.4.20 || ^5.1.3",
+# "symfony/event-dispatcher": "^4.4.20 || ^5.0",
+# "symfony/filesystem": "^4.4.20 || ^5.0",
+# "symfony/finder": "^4.4.20 || ^5.0",
+# "symfony/options-resolver": "^4.4.20 || ^5.0",
+# "symfony/polyfill-php72": "^1.22",
+# "symfony/process": "^4.4.20 || ^5.0",
+# "symfony/stopwatch": "^4.4.20 || ^5.0"
+# raised to 7.2 to avoid the polyfill
Requires: php(language) >= 7.2
Requires: php-json
Requires: php-tokenizer
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4)
-Requires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 3)
-Requires: (php-composer(doctrine/annotations) >= 1.2 with php-composer(doctrine/annotations) < 2)
-Requires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2)
+Requires: (php-composer(composer/semver) >= 3.2 with php-composer(composer/semver) < 4)
+Requires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 3)
+Requires: (php-composer(doctrine/annotations) >= 1.12 with php-composer(doctrine/annotations) < 2)
+Requires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2)
# remirepo:6
%else
-Requires: php-composer-semver3 >= 3.0
+Requires: php-composer-semver3 >= 3.2
Requires: php-composer-xdebug-handler2 >= 2.0
-Requires: php-doctrine-annotations >= 1.2
+Requires: php-doctrine-annotations >= 1.12
Requires: php-phpunit-diff >= 1.4
%endif
-Requires: php-symfony3-console
-Requires: php-symfony3-event-dispatcher
-Requires: php-symfony3-filesystem
-Requires: php-symfony3-finder
-Requires: php-symfony3-options-resolver
-Requires: php-symfony3-process
-Requires: php-symfony3-stopwatch
+Requires: php-symfony4-console
+Requires: php-symfony4-event-dispatcher
+Requires: php-symfony4-filesystem
+Requires: php-symfony4-finder
+Requires: php-symfony4-options-resolver
+Requires: php-symfony4-process
+Requires: php-symfony4-stopwatch
# Missing dependency for Console
-Requires: php-symfony3-debug
+Requires: php-symfony4-debug
# From composer.json, "suggest": {
# "ext-dom": "For handling output formats in XML",
# "ext-mbstring": "For handling non-UTF8 characters.",
-# "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
-# "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
# "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
Requires: php-dom
Requires: php-mbstring
-# remirepo:1
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Recommends: php-composer(php-cs-fixer/phpunit-constraint-isidenticalstring)
-Recommends: php-composer(php-cs-fixer/phpunit-constraint-xmlmatchesxsd)
-# remirepo:1
-%endif
-# From phpcompatinfo report for version 2.4.0
+# From phpcompatinfo report for version 3.0.0
Requires: php-cli
-Requires: php-reflection
+Requires: php-intl
+Requires: php-json
Requires: php-pcre
Requires: php-phar
+Requires: php-reflection
Requires: php-spl
-Requires: php-xml
+Requires: php-tokenizer
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -219,25 +213,6 @@ find src -name \*rpm -delete -print
# Fix version
sed -e '/VERSION/s/-DEV//' -i src/Console/Application.php
-# from composer.json, "autoload" / "classmap"
-TESTS="
- tests/Test/AbstractFixerTestCase.php
- tests/Test/AbstractIntegrationCaseFactory.php
- tests/Test/AbstractIntegrationTestCase.php
- tests/Test/Assert/AssertTokensTrait.php
- tests/Test/IntegrationCase.php
- tests/Test/IntegrationCaseFactory.php
- tests/Test/IntegrationCaseFactoryInterface.php
- tests/Test/InternalIntegrationCaseFactory.php
- tests/Test/IsIdenticalConstraint.php
- tests/Test/TokensWithObservedTransformers.php
- tests/TestCase.php
-"
-for i in $TESTS; do
- mkdir -p src/$(dirname $i)
- cp -p $i src/$i
-done
-
# fix dev-tools path
sed -e 's:../../../ci:ci:' -i src/Console/Command/HelpCommand.php
cp -pr ci-integration.sh src/Console/Command/
@@ -255,13 +230,13 @@ cat << 'EOF' | tee -a src/autoload.php
'%{php_home}/Composer/Semver3/autoload.php',
'%{php_home}/Composer/XdebugHandler2/autoload.php',
'%{php_home}/Doctrine/Common/Annotations/autoload.php',
- '%{php_home}/Symfony3/Component/Console/autoload.php',
- '%{php_home}/Symfony3/Component/EventDispatcher/autoload.php',
- '%{php_home}/Symfony3/Component/Filesystem/autoload.php',
- '%{php_home}/Symfony3/Component/Finder/autoload.php',
- '%{php_home}/Symfony3/Component/OptionsResolver/autoload.php',
- '%{php_home}/Symfony3/Component/Process/autoload.php',
- '%{php_home}/Symfony3/Component/Stopwatch/autoload.php',
+ '%{php_home}/Symfony4/Component/Console/autoload.php',
+ '%{php_home}/Symfony4/Component/EventDispatcher/autoload.php',
+ '%{php_home}/Symfony4/Component/Filesystem/autoload.php',
+ '%{php_home}/Symfony4/Component/Finder/autoload.php',
+ '%{php_home}/Symfony4/Component/OptionsResolver/autoload.php',
+ '%{php_home}/Symfony4/Component/Process/autoload.php',
+ '%{php_home}/Symfony4/Component/Stopwatch/autoload.php',
]);
\Fedora\Autoloader\Dependencies::optional([
'%{php_home}/PhpCsFixer/PhpunitConstraintIsIdenticalString/autoload.php',
@@ -277,10 +252,10 @@ EOF
%install
: Library
mkdir -p %{buildroot}%{php_home}
-cp -pr src %{buildroot}%{php_home}/PhpCsFixer
+cp -pr src %{buildroot}%{php_home}/PhpCsFixer%{major}
: Command
-install -Dpm755 %{name} %{buildroot}%{_bindir}/%{name}
+install -Dpm755 php-cs-fixer %{buildroot}%{_bindir}/%{name}
%check
@@ -293,11 +268,11 @@ cat << 'EOF' | tee vendor/autoload.php
'%{php_home}/org/bovigo/vfs/autoload.php',
'%{php_home}/JsonSchema5/autoload.php',
'%{php_home}/PhpCsFixer/AccessibleObject/autoload.php',
+ '%{php_home}/Prophecy/autoload.php',
'%{php_home}/Prophecy/PhpUnit/autoload.php',
- '%{php_home}/LegacyPHPUnit/autoload.php',
'%{php_home}/PHPUnitGoodPractices/Polyfill/autoload.php',
- '%{buildroot}%{php_home}/PhpCsFixer/autoload.php',
- '%{php_home}/Symfony3/Component/Yaml/autoload.php',
+ '%{buildroot}%{php_home}/PhpCsFixer%{major}/autoload.php',
+ '%{php_home}/Symfony4/Component/Yaml/autoload.php',
__DIR__ . '/ExpectDeprecationTrait.php',
]);
\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\Tests\\', dirname(__DIR__) . '/tests');
@@ -335,7 +310,7 @@ rm tests/Fixer/PhpUnit/PhpUnitNamespacedFixerTest.php
rm tests/AutoReview/ProjectCodeTest.php
# Redirect to buildroot
-sed -e 's:%{php_home}:%{buildroot}%{php_home}:' -i %{name}
+sed -e 's:%{php_home}:%{buildroot}%{php_home}:' -i php-cs-fixer
ret=0
# skip testFix74Deprecated as we don't use symfony/phpunit-bridge
@@ -359,11 +334,19 @@ exit $ret
%license LICENSE
%doc composer.json
%doc *.md
-%{php_home}/PhpCsFixer
+%{php_home}/PhpCsFixer%{major}
%{_bindir}/%{name}
%changelog
+* Thu Jun 3 2021 Remi Collet <remi@remirepo.net> - 3.0.0-1
+- update to 3.0.0
+- rename to php-cs-fixer3
+ install php-cs-fixer3 command and use /usr/share/php/PhpCsFixer3
+- switch to Symfony 4
+- raise dependency on composer/semver 3.2
+- raise dependency on doctrine/annotations 1.12
+
* Tue May 4 2021 Remi Collet <remi@remirepo.net> - 2.19.0-1
- update to 2.19.0