diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-04-01 10:07:19 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-04-01 10:07:19 +0200 |
commit | a0f48d5611835b0920dbe19e49e0c349ce3d5255 (patch) | |
tree | dba5cf3f76791c2e9f5a3af9b46c8292bc5064cd /php-cs-fixer.spec | |
parent | fa143b9f906c321b3a31e1c594a5b960d482b533 (diff) |
v2.2.0
Diffstat (limited to 'php-cs-fixer.spec')
-rw-r--r-- | php-cs-fixer.spec | 80 |
1 files changed, 68 insertions, 12 deletions
diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec index 942a630..4e3a8b2 100644 --- a/php-cs-fixer.spec +++ b/php-cs-fixer.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit d30ca69f8bed931b5c630407f0a98306e33c2c39 +%global gh_commit d6f17423412d33df6b69c9aaf12037b91703533b %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: 2.1.3 +Version: 2.2.0 Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist} Summary: A tool to automatically fix PHP code style @@ -25,7 +25,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project} # git snapshot to get upstream test suite Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -Source2: %{name}-autoload.php # Use our autoloader Patch0: %{name}-autoload.patch @@ -35,14 +34,27 @@ BuildArch: noarch # For tests BuildRequires: php(language) >= 5.4 BuildRequires: php-tokenizer -BuildRequires: php-composer(symfony/console) >= 2.3 +BuildRequires: php-composer(doctrine/annotations) < 2 +BuildRequires: php-composer(doctrine/annotations) >= 1.2 +BuildRequires: php-composer(symfony/console) < 4 +BuildRequires: php-composer(symfony/console) >= 2.4 +BuildRequires: php-composer(symfony/event-dispatcher) < 4 BuildRequires: php-composer(symfony/event-dispatcher) >= 2.1 +BuildRequires: php-composer(symfony/filesystem) < 4 BuildRequires: php-composer(symfony/filesystem) >= 2.4 +BuildRequires: php-composer(symfony/finder) < 4 BuildRequires: php-composer(symfony/finder) >= 2.4 +BuildRequires: php-composer(symfony/options-resolver) < 4 +BuildRequires: php-composer(symfony/options-resolver) >= 2.6 +BuildRequires: php-composer(symfony/polyfill-php55) < 4 BuildRequires: php-composer(symfony/polyfill-php55) >= 1.3 +BuildRequires: php-composer(symfony/polyfill-php70) < 4 BuildRequires: php-composer(symfony/polyfill-php70) >= 1.3 +BuildRequires: php-composer(symfony/process) < 4 BuildRequires: php-composer(symfony/process) >= 2.3 +BuildRequires: php-composer(symfony/stopwatch) < 4 BuildRequires: php-composer(symfony/stopwatch) >= 2.5 +BuildRequires: php-composer(sebastian/diff) < 2 BuildRequires: php-composer(sebastian/diff) >= 1.1 BuildRequires: php-mbstring BuildRequires: php-xml @@ -59,7 +71,9 @@ BuildRequires: php-xml # "phpunit/phpunit": "^4.5 || ^5.0", # "satooshi/php-coveralls": "^1.0", # "symfony/phpunit-bridge": "^3.2" +BuildRequires: php-composer(gecko-packages/gecko-php-unit) < 3 BuildRequires: php-composer(gecko-packages/gecko-php-unit) >= 2.0 +BuildRequires: php-composer(justinrainbow/json-schema) < 6 BuildRequires: php-composer(justinrainbow/json-schema) >= 5 BuildRequires: php-composer(phpunit/phpunit) >= 4.5 BuildRequires: php-composer(symfony/phpunit-bridge) @@ -69,12 +83,14 @@ BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { # "php": "^5.3.6 || >=7.0 <7.2", +# "doctrine/annotations": "^1.2", # "ext-tokenizer": "*", # "sebastian/diff": "^1.1", -# "symfony/console": "^2.3 || ^3.0", +# "symfony/console": "^2.4 || ^3.0", # "symfony/event-dispatcher": "^2.1 || ^3.0", # "symfony/filesystem": "^2.4 || ^3.0", # "symfony/finder": "^2.2 || ^3.0", +# "symfony/options-resolver": "^2.6 || ^3.0", # "symfony/polyfill-php54": "^1.0", # "symfony/polyfill-php55": "^1.3", # "symfony/polyfill-php70": "^1.0", @@ -84,17 +100,30 @@ BuildRequires: php-composer(fedora/autoloader) # use 5.4 to avoid polyfill Requires: php(language) >= 5.4 Requires: php-tokenizer +Requires: php-composer(doctrine/annotations) < 2 +Requires: php-composer(doctrine/annotations) >= 1.2 +Requires: php-composer(sebastian/diff) < 2 Requires: php-composer(sebastian/diff) >= 1.1 -Requires: php-composer(symfony/console) >= 2.3 +Requires: php-composer(symfony/console) < 4 +Requires: php-composer(symfony/console) >= 2.4 +Requires: php-composer(symfony/event-dispatcher) < 4 Requires: php-composer(symfony/event-dispatcher) >= 2.1 +Requires: php-composer(symfony/filesystem) < 4 Requires: php-composer(symfony/filesystem) >= 2.4 +Requires: php-composer(symfony/finder) < 4 Requires: php-composer(symfony/finder) >= 2.4 +Requires: php-composer(symfony/options-resolver) < 4 +Requires: php-composer(symfony/options-resolver) >= 2.6 +Requires: php-composer(symfony/polyfill-php55) < 2 Requires: php-composer(symfony/polyfill-php55) >= 1.3 +Requires: php-composer(symfony/polyfill-php70) < 2 Requires: php-composer(symfony/polyfill-php70) >= 1.0 +Requires: php-composer(symfony/process) < 4 Requires: php-composer(symfony/process) >= 2.3 +Requires: php-composer(symfony/stopwatch) < 4 Requires: php-composer(symfony/stopwatch) >= 2.5 # From composer.json, "suggest": { -# "ext-mbstring": "For handling non-UTF8 characters in cache singature.", +# "ext-mbstring": "For handling non-UTF8 characters in cache signature.", # "ext-xml": "For better performance.", # "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." Requires: php-mbstring @@ -127,7 +156,22 @@ 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} src/autoload.php +cat << 'EOF' | tee src/autoload.php +<?php +/* Autoloader for %{name} and its dependencies */ + +require_once '%{php_home}/Fedora/Autoloader/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\', __DIR__); +\Fedora\Autoloader\Dependencies::required([ + '%{php_home}/Doctrine/Common/Annotations/autoload.php', + [ + '%{php_home}/Symfony3/Component/autoload.php', + '%{php_home}/Symfony/Component/autoload.php', + ], + '%{php_home}/SebastianBergmann/Diff/autoload.php', + '%{php_home}/Symfony/Polyfill/autoload.php', +]); +EOF %build @@ -148,10 +192,15 @@ install -Dpm755 %{name} %{buildroot}%{_bindir}/%{name} mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php -require_once '%{php_home}/GeckoPackages/PHPUnit/autoload.php'; -require_once '%{php_home}/Symfony/Bridge/PhpUnit/autoload.php'; -require_once '%{php_home}/JsonSchema5/autoload.php'; -require_once '%{buildroot}%{php_home}/PhpCsFixer/autoload.php'; +\Fedora\Autoloader\Dependencies::required([ + '%{php_home}/GeckoPackages/PHPUnit/autoload.php', + [ + '%{php_home}/Symfony3/Bridge/PhpUnit/autoload.php', + '%{php_home}/Symfony/Bridge/PhpUnit/autoload.php', + ], + '%{php_home}/JsonSchema5/autoload.php', + '%{buildroot}%{php_home}/PhpCsFixer/autoload.php', +]); \Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\Tests\\', dirname(__DIR__) . '/tests'); EOF @@ -192,6 +241,13 @@ exit $ret %changelog +* Sat Apr 1 2017 Remi Collet <remi@remirepo.net> - 2.2.0-1 +- Update to 2.2.0 +- add dependency on doctrine/annotations +- add dependency on symfony/options-resolver +- raise dependency on symfony 2.6 +- fix autoloader to allow Symfony 3 + * Fri Mar 31 2017 Remi Collet <remi@remirepo.net> - 2.1.3-1 - Update to 2.1.3 - add dependency on php-mbstring |