summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-12-22 12:29:33 +0100
committerRemi Collet <remi@remirepo.net>2020-12-22 12:29:33 +0100
commit0dfb77cb537d5c150327f2993ed1dde2b1321dd0 (patch)
tree98d341f87a3800bfdc12527ae598e21f5a3e2daf
parentb062c588573a1455ce854670f5c2a41f2e19295c (diff)
update to 2.17.2
switch to phpunit9 with phpspec/prophecy-phpunit and sanmai/phpunit-legacy-adapter
-rw-r--r--composer.json4
-rw-r--r--php-cs-fixer.spec32
2 files changed, 26 insertions, 10 deletions
diff --git a/composer.json b/composer.json
index 0e4ac37..dabab19 100644
--- a/composer.json
+++ b/composer.json
@@ -40,9 +40,11 @@
"php-cs-fixer/accessible-object": "^1.0",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
- "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
+ "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.4.4 <9.5",
"phpunitgoodpractices/polyfill": "^1.5",
"phpunitgoodpractices/traits": "^1.9.1",
+ "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
"symfony/phpunit-bridge": "^5.1",
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
},
diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec
index 0597f93..08253f9 100644
--- a/php-cs-fixer.spec
+++ b/php-cs-fixer.spec
@@ -10,7 +10,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit 5198b7308ed63f26799387fd7f3901c3db6bd7fd
+%global gh_commit aaee4f3d16a996fc0b570be0c69d3b80c909c507
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner FriendsOfPHP
@@ -26,7 +26,7 @@
%global gh_diff_short %(c=%{gh_diff_commit}; echo ${c:0:7})
Name: php-cs-fixer
-Version: 2.17.1
+Version: 2.17.2
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
@@ -43,7 +43,8 @@ Patch0: %{name}-autoload.patch
BuildArch: noarch
%if %{with_tests}
# For tests
-BuildRequires: php(language) >= 7.2
+# as we use phpunit9
+BuildRequires: php(language) >= 7.3
BuildRequires: php-tokenizer
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
@@ -87,9 +88,11 @@ BuildRequires: php-symfony3-debug
# "php-cs-fixer/accessible-object": "^1.0",
# "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
# "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
-# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
+# "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
+# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.4.4 <9.5",
# "phpunitgoodpractices/polyfill": "^1.5",
# "phpunitgoodpractices/traits": "^1.9.1",
+# "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
# "symfony/phpunit-bridge": "^5.1",
# "symfony/yaml": "^3.0 || ^4.0 || ^5.0"
# ignored as test using it fail strangely
@@ -102,20 +105,24 @@ BuildRequires: (php-composer(mikey179/vfsstream)
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)
-# remirepo:9
+BuildRequires: (php-composer(sanmai/phpunit-legacy-adapter) >= 8.2.1 with php-composer(sanmai/phpunit-legacy-adapter) < 9)
+# remirepo:11
%else
BuildRequires: php-justinrainbow-json-schema5
BuildRequires: php-mikey179-vfsstream >= 1.6
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-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}/phpunit7
-BuildRequires: phpunit7 >= 7.1
+%global phpunit %{_bindir}/phpunit9
+BuildRequires: phpunit9 >= 9.4.4
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -281,6 +288,8 @@ 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/PhpUnit/autoload.php',
+ '%{php_home}/LegacyPHPUnit/autoload.php',
'%{php_home}/PHPUnitGoodPractices/Polyfill/autoload.php',
'%{buildroot}%{php_home}/PhpCsFixer/autoload.php',
]);
@@ -309,10 +318,10 @@ sed -e 's:%{php_home}:%{buildroot}%{php_home}:' -i %{name}
ret=0
# skip testFix74Deprecated as we don't use symfony/phpunit-bridge
-for cmdarg in "php %{phpunit}" php72 php73 php74; do
+for cmdarg in "php %{phpunit}" php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
- $1 -d memory_limit=2G ${2:-%{_bindir}/phpunit7} \
+ $1 -d memory_limit=2G ${2:-%{_bindir}/phpunit9} \
--filter '^((?!(testFixerContainsAllPhpunitStaticMethodsInItsList|testFix74Deprecated|testFixersPriorityPairsHaveIntegrationTest|testThereAreNoExtraFiles|testFixersDocumentationIndexFileIsUpToDate)).)*$' \
|| ret=1
fi
@@ -334,6 +343,11 @@ exit $ret
%changelog
+* Mon Dec 21 2020 Remi Collet <remi@remirepo.net> - 2.17.2-1
+- update to 2.17.2
+- switch to phpunit9
+ with phpspec/prophecy-phpunit and sanmai/phpunit-legacy-adapter
+
* Wed Dec 9 2020 Remi Collet <remi@remirepo.net> - 2.17.1-1
- update to 2.17.1