summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json18
-rw-r--r--php-cs-fixer-autoload.patch10
-rw-r--r--php-cs-fixer-autoload.php2
-rw-r--r--php-cs-fixer.spec48
4 files changed, 50 insertions, 28 deletions
diff --git a/composer.json b/composer.json
index 24a8660..4bb45d1 100644
--- a/composer.json
+++ b/composer.json
@@ -18,13 +18,15 @@
"ext-tokenizer": "*",
"symfony/console": "^2.3 || ^3.0",
"symfony/event-dispatcher": "^2.1 || ^3.0",
- "symfony/filesystem": "^2.1 || ^3.0",
- "symfony/finder": "^2.1 || ^3.0",
+ "symfony/filesystem": "^2.4 || ^3.0",
+ "symfony/finder": "^2.2 || ^3.0",
+ "symfony/polyfill-php54": "^1.0",
"symfony/process": "^2.3 || ^3.0",
"symfony/stopwatch": "^2.5 || ^3.0",
"sebastian/diff": "^1.1"
},
"require-dev": {
+ "gecko-packages/gecko-php-unit": "^2.0",
"phpunit/phpunit": "^4.5|^5",
"satooshi/php-coveralls": "^1.0"
},
@@ -32,7 +34,15 @@
"hhvm": "<3.9"
},
"autoload": {
- "psr-4": { "Symfony\\CS\\": "Symfony/CS/" }
+ "psr-4": { "PhpCsFixer\\": "src/" }
},
- "bin": ["php-cs-fixer"]
+ "autoload-dev": {
+ "psr-4": { "PhpCsFixer\\Tests\\": "tests/" }
+ },
+ "bin": ["php-cs-fixer"],
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ }
}
diff --git a/php-cs-fixer-autoload.patch b/php-cs-fixer-autoload.patch
index 7552b68..149c6e3 100644
--- a/php-cs-fixer-autoload.patch
+++ b/php-cs-fixer-autoload.patch
@@ -1,7 +1,7 @@
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
---- ./php-cs-fixer.rpm 2016-09-09 16:14:16.000000000 +0200
-+++ ./php-cs-fixer 2016-09-09 16:36:48.052810179 +0200
-@@ -31,12 +31,7 @@ set_error_handler(function ($severity, $
+--- ./php-cs-fixer.rpm 2016-12-01 15:13:25.882871262 +0100
++++ ./php-cs-fixer 2016-12-01 15:14:08.756051245 +0100
+@@ -32,12 +32,7 @@ set_error_handler(function ($severity, $
}
});
@@ -11,7 +11,7 @@ diff -up ./php-cs-fixer.rpm ./php-cs-fixer
-} else {
- require_once __DIR__.'/vendor/autoload.php';
-}
-+require_once '/usr/share/php/Symfony/CS/autoload.php';
++require_once '/usr/share/php/PhpCsFixer/autoload.php';
- use Symfony\CS\Console\Application;
+ use PhpCsFixer\Console\Application;
diff --git a/php-cs-fixer-autoload.php b/php-cs-fixer-autoload.php
index 5523869..e6c1c9f 100644
--- a/php-cs-fixer-autoload.php
+++ b/php-cs-fixer-autoload.php
@@ -3,7 +3,7 @@
require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('Symfony\\CS\\', __DIR__);
+\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\', __DIR__);
\Fedora\Autoloader\Dependencies::required(array(
'/usr/share/php/Symfony/Component/autoload.php',
diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec
index 5e1b97a..4fc6681 100644
--- a/php-cs-fixer.spec
+++ b/php-cs-fixer.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit ac04a510bed5407e91664f8a37b9d58072d96768
+%global gh_commit f3baf72eb2f58bf275b372540f5b47d25aed910f
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner FriendsOfPHP
@@ -15,7 +15,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-cs-fixer
-Version: 1.13.0
+Version: 2.0.0
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
@@ -34,12 +34,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%if %{with_tests}
# For tests
-BuildRequires: php(language) >= 5.3.6
+BuildRequires: php(language) >= 5.4
BuildRequires: php-tokenizer
BuildRequires: php-composer(symfony/console) >= 2.3
BuildRequires: php-composer(symfony/event-dispatcher) >= 2.1
-BuildRequires: php-composer(symfony/filesystem) >= 2.1
-BuildRequires: php-composer(symfony/finder) >= 2.1
+BuildRequires: php-composer(symfony/filesystem) >= 2.4
+BuildRequires: php-composer(symfony/finder) >= 2.4
BuildRequires: php-composer(symfony/process) >= 2.3
BuildRequires: php-composer(symfony/stopwatch) >= 2.5
BuildRequires: php-composer(sebastian/diff) >= 1.1
@@ -49,6 +49,7 @@ BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-phar
BuildRequires: php-spl
+BuildRequires: php-tokenizer
BuildRequires: php-xml
# From composer.json, "require-dev": {
# "phpunit/phpunit": "^4.5|^5",
@@ -63,21 +64,23 @@ BuildRequires: php-composer(fedora/autoloader)
# "ext-tokenizer": "*",
# "symfony/console": "^2.3 || ^3.0",
# "symfony/event-dispatcher": "^2.1 || ^3.0",
-# "symfony/filesystem": "^2.1 || ^3.0",
-# "symfony/finder": "^2.1 || ^3.0",
+# "symfony/filesystem": "^2.4 || ^3.0",
+# "symfony/finder": "^2.2 || ^3.0",
+# "symfony/polyfill-php54": "^1.0",
# "symfony/process": "^2.3 || ^3.0",
# "symfony/stopwatch": "^2.5 || ^3.0",
# "sebastian/diff": "^1.1"
-Requires: php(language) >= 5.3.6
+# use 5.4 to avoid polyfill
+Requires: php(language) >= 5.4
Requires: php-tokenizer
Requires: php-composer(symfony/console) >= 2.3
Requires: php-composer(symfony/event-dispatcher) >= 2.1
-Requires: php-composer(symfony/filesystem) >= 2.1
-Requires: php-composer(symfony/finder) >= 2.1
+Requires: php-composer(symfony/filesystem) >= 2.4
+Requires: php-composer(symfony/finder) >= 2.4
Requires: php-composer(symfony/process) >= 2.3
Requires: php-composer(symfony/stopwatch) >= 2.5
Requires: php-composer(sebastian/diff) >= 1.1
-# From phpcompatinfo report for version 1.12.1
+# From phpcompatinfo report for version 2.0.0
Requires: php-cli
Requires: php-reflection
Requires: php-dom
@@ -86,6 +89,7 @@ Requires: php-pcre
Requires: php-phar
Requires: php-spl
Requires: php-xml
+Requires: php-tokenizer
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -106,7 +110,7 @@ projects. This tool does not only detect them, but also fixes them for you.
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1 -b .rpm
-cp %{SOURCE2} Symfony/CS/autoload.php
+cp %{SOURCE2} src/autoload.php
%build
@@ -117,8 +121,8 @@ cp %{SOURCE2} Symfony/CS/autoload.php
rm -rf %{buildroot}
: Library
-mkdir -p %{buildroot}%{php_home}
-cp -pr Symfony %{buildroot}%{php_home}/Symfony
+mkdir -p %{buildroot}%{php_home}
+cp -pr src %{buildroot}%{php_home}/PhpCsFixer
: Command
install -Dpm755 %{name} %{buildroot}%{_bindir}/%{name}
@@ -127,7 +131,12 @@ install -Dpm755 %{name} %{buildroot}%{_bindir}/%{name}
%check
%if %{with_tests}
mkdir vendor
-ln -s %{buildroot}%{php_home}/Symfony/CS/autoload.php vendor/
+cat << 'EOF' | tee vendor/autoload.php
+<?php
+require_once '%{buildroot}%{php_home}/PhpCsFixer/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\Tests\\', dirname(__DIR__) . '/tests');
+EOF
+
# remirepo:11
run=0
@@ -160,13 +169,16 @@ rm -rf %{buildroot}
%license LICENSE
%doc composer.json
%doc *.md *.rst
-%{php_home}/Symfony/CS
-%exclude %{php_home}/Symfony/CS/Tests
-%exclude %{php_home}/Symfony/CS/Resources
+%{php_home}/PhpCsFixer
+%exclude %{php_home}/PhpCsFixer/Tests
+%exclude %{php_home}/PhpCsFixer/Resources
%{_bindir}/%{name}
%changelog
+* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
+- update to 2.0.0
+
* Tue Nov 29 2016 Remi Collet <remi@fedoraproject.org> - 1.13.0-1
- update to 1.13.0