summaryrefslogtreecommitdiffstats
path: root/php-cs-fixer.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-cs-fixer.spec')
-rw-r--r--php-cs-fixer.spec44
1 files changed, 28 insertions, 16 deletions
diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec
index a56d567..dc73dd8 100644
--- a/php-cs-fixer.spec
+++ b/php-cs-fixer.spec
@@ -1,12 +1,12 @@
# remirepo/fedora spec file for php-cs-fixer
#
-# Copyright (c) 2016-2017 Remi Collet
+# Copyright (c) 2016-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 454ddbe65da6a9297446f442bad244e8a99a9a38
+%global gh_commit 513a3765b56dd029175f9f32995566657ee89dda
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner FriendsOfPHP
@@ -21,8 +21,8 @@
%global gh_diff_short %(c=%{gh_diff_commit}; echo ${c:0:7})
Name: php-cs-fixer
-Version: 2.9.0
-Release: 2%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
+Version: 2.10.0
+Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
Group: Development/Tools
@@ -85,12 +85,17 @@ BuildRequires: php-symfony3-debug
# From composer.json, "require-dev": {
# NOTICE: listener disabled during test suite
# "johnkary/phpunit-speedtrap": "^1.1 || ^2.0@dev",
+# "keradus/cli-executor": "^1.0",
# "justinrainbow/json-schema": "^5.0",
# "mikey179/vfsStream": "^1.6",
# "php-coveralls/php-coveralls": "^2.0",
# "php-cs-fixer/accessible-object": "^1.0",
# "phpunit/phpunit": "^5.7.23 || ^6.4.3",
+# "phpunitgoodpractices/traits": "^1.0",
# "symfony/phpunit-bridge": "^3.2.2 || ^4.0"
+# ignored as test using it fail strangely
+#BuildRequires: php-composer(keradus/cli-executor) < 2
+#BuildRequires: php-composer(keradus/cli-executor) >= 1.0
BuildRequires: php-composer(justinrainbow/json-schema) < 6
BuildRequires: php-composer(justinrainbow/json-schema) >= 5.0
BuildRequires: php-composer(mikey179/vfsStream) < 2
@@ -98,6 +103,9 @@ BuildRequires: php-composer(mikey179/vfsStream) >= 1.6
BuildRequires: php-composer(php-cs-fixer/accessible-object) < 2
BuildRequires: php-composer(php-cs-fixer/accessible-object) >= 1.0
BuildRequires: %{phpunit}
+# ignored as not yet available and optional (see TestCase.php)
+#BuildRequires: php-composer(phpunitgoodpractices/traits) < 2
+#BuildRequires: php-composer(phpunitgoodpractices/traits) >= 1.0
BuildRequires: php-symfony3-phpunit-bridge >= 3.2.2
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -184,11 +192,12 @@ find src -name \*rpm -delete -print
# from composer.json, "autoload" / "classmap"
TESTS="
- tests/Test/Assert/AssertTokensTrait.php
tests/Test/AbstractFixerTestCase.php
tests/Test/AbstractIntegrationTestCase.php
+ tests/Test/Assert/AssertTokensTrait.php
tests/Test/IntegrationCase.php
tests/Test/IntegrationCaseFactory.php
+ tests/TestCase.php
"
for i in $TESTS; do
mkdir -p src/$(dirname $i)
@@ -199,21 +208,19 @@ done
sed -e 's:../../../dev-tools/::' -i src/Console/Command/HelpCommand.php
cp -pr dev-tools/ci-integration.sh src/Console/Command/
-phpab --template fedora --output src/autoload.php src/tests src/diff
+# tolerant because conditional definition in tests/TestCase.php
+phpab --template fedora \
+ --tolerant \
+ --output src/autoload.php \
+ src/tests src/diff
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\', __DIR__);
if (class_exists('PHPUnit\\Runner\\Version') && version_compare(PHPUnit\Runner\Version::id(), '6', '>')) {
- $gecko = [
- '%{php_home}/GeckoPackages/PHPUnit3/autoload.php',
- '%{php_home}/GeckoPackages/PHPUnit/autoload.php',
- ];
+ $gecko = '%{php_home}/GeckoPackages/PHPUnit3/autoload.php';
} else {
- $gecko = [
- '%{php_home}/GeckoPackages/PHPUnit/autoload.php',
- '%{php_home}/GeckoPackages/PHPUnit3/autoload.php',
- ];
+ $gecko = '%{php_home}/GeckoPackages/PHPUnit/autoload.php';
}
\Fedora\Autoloader\Dependencies::required([
'%{php_home}//Composer/Semver/autoload.php',
@@ -263,7 +270,9 @@ EOF
# Fix integration test
sed -e "/README.rst/s:__DIR__.*':'$PWD/README.rst':" \
-i tests/Console/Command/ReadmeCommandTest.php
-rm tests/CiIntegrationTest.php
+# test using keradus/cli-executor
+rm tests/Smoke/CiIntegrationTest.php
+rm tests/Smoke/StdinTest.php
# Disable listener
sed -e 's/listeners/nolistener/' phpunit.xml.dist >phpunit.xml
@@ -272,7 +281,7 @@ sed -e 's/listeners/nolistener/' phpunit.xml.dist >phpunit.xml
sed -e 's:%{php_home}:%{buildroot}%{php_home}:' -i %{name}
ret=0
-for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do
+for cmdarg in "php %{phpunit}" php70 php71 php72; do
if which $cmdarg; then
set $cmdarg
$1 -d memory_limit=1G ${2:-%{_bindir}/phpunit6} || ret=1
@@ -294,6 +303,9 @@ exit $ret
%changelog
+* Thu Jan 11 2018 Remi Collet <remi@remirepo.net> - 2.10.0-1
+- Update to 2.10.0
+
* Thu Dec 28 2017 Remi Collet <remi@remirepo.net> - 2.9.0-2
- mikey179/vfsStream only required at builtime