Compare commits

...
Sign in to create a new pull request.

17 commits

Author SHA1 Message Date
Remi Collet
03c8f82dbb v2.2.19 2018-03-21 06:48:56 +01:00
Remi Collet
85801bbfe1 v2.2.18 2018-03-08 13:56:21 +01:00
Remi Collet
595a466f64 Update to 2.2.17
drop dependency on gecko-packages/gecko-php-unit
2018-02-23 07:05:39 +01:00
Remi Collet
eb2d2d07d8 v2.2.16 2018-02-06 10:54:38 +01:00
Remi Collet
167ac5d949 v2.2.14 2018-01-11 07:36:02 +01:00
Remi Collet
65bd779cd9 v2.2.13 2017-12-13 09:33:21 +01:00
Remi Collet
7d1b034622 v2.2.12 2017-11-27 07:36:24 +01:00
Remi Collet
ef8c6bcfc7 v2.2.11 2017-11-20 10:10:43 +01:00
Remi Collet
0e1f88485b v2.2.10 2017-11-10 08:18:04 +01:00
Remi Collet
c1ea3640e9 v2.2.9 2017-11-03 05:31:03 +01:00
Remi Collet
be9258824d update patch 2017-10-02 15:56:58 +02:00
Remi Collet
7f30ea6da5 v2.2.8 2017-10-02 15:52:22 +02:00
Remi Collet
12a4cd3520 Update to 2.2.7
add dependency on composer/semver
2017-09-12 06:50:37 +02:00
Remi Collet
182ea6ac15 v2.2.6 (sources) 2017-08-23 09:30:35 +02:00
Remi Collet
55381d7141 v2.2.6 2017-08-23 09:29:16 +02:00
Remi Collet
65ce4f994e add dependency on symfony/polyfill-php72
Update to 2.2.5
2017-08-03 13:18:18 +02:00
Remi Collet
fbc6b0534e Update to 2.2.4
add dependency on gecko-packages/gecko-php-unit
only Symfony 2
2017-05-25 08:23:50 +02:00
4 changed files with 212 additions and 96 deletions

26
.gitignore vendored
View file

@ -1,11 +1,17 @@
/php-cs-fixer-1.12.4-c5a9d66.tgz
/php-cs-fixer-1.13.0-ac04a51.tgz
/php-cs-fixer-2.0.0-f3baf72.tgz
/php-cs-fixer-2.0.1-863ad25.tgz
/php-cs-fixer-2.1.0-2c69f4d.tgz
/php-cs-fixer-2.1.2-c7de769.tgz
/php-cs-fixer-2.1.3-d30ca69.tgz
/php-cs-fixer-2.2.0-d6f1742.tgz
/php-cs-fixer-2.2.1-aff95e0.tgz
/php-cs-fixer-2.2.2-362d7bd.tgz
clog
/php-cs-fixer-2.2.3-8f33cf3.tgz
/php-cs-fixer-2.2.4-5191e01.tgz
/php-cs-fixer-2.2.5-27c2cd9.tgz
/php-cs-fixer-2.2.6-c1cc52c.tgz
/php-cs-fixer-2.2.7-b6202cc.tgz
/php-cs-fixer-2.2.8-aca23e7.tgz
/php-cs-fixer-2.2.9-eace538.tgz
/php-cs-fixer-2.2.10-b0e0f1d.tgz
/php-cs-fixer-2.2.11-11937d6.tgz
/php-cs-fixer-2.2.12-362ad63.tgz
/php-cs-fixer-2.2.13-669e232.tgz
/php-cs-fixer-2.2.14-dcf6443.tgz
/php-cs-fixer-2.2.16-f67918e.tgz
/php-cs-fixer-2.2.17-12f95d2.tgz
/php-cs-fixer-2.2.18-44f73c3.tgz
/php-cs-fixer-2.2.19-2de0ac9.tgz

View file

@ -1,28 +1,56 @@
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
--- ./php-cs-fixer.rpm 2017-04-01 08:35:52.000000000 +0200
+++ ./php-cs-fixer 2017-04-01 08:48:58.016723873 +0200
@@ -42,12 +42,7 @@ set_error_handler(function ($severity, $
--- ./php-cs-fixer.rpm 2018-03-21 06:42:07.838432372 +0100
+++ ./php-cs-fixer 2018-03-21 06:43:59.948972275 +0100
@@ -41,25 +41,7 @@ set_error_handler(function ($severity, $
}
});
-// installed via composer?
-if (file_exists($a = __DIR__.'/../../autoload.php')) {
- require_once $a;
-} else {
- require_once __DIR__.'/vendor/autoload.php';
-$require = true;
-if (class_exists('Phar')) {
- // Maybe this file is used as phar-stub? Let's try!
- try {
- Phar::mapPhar('php-cs-fixer.phar');
- require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
- $require = false;
- } catch (PharException $e) {
- }
-}
-if ($require) {
- // OK, it's not, let give Composer autoloader a try!
- if (file_exists($a = __DIR__.'/../../autoload.php')) {
- require_once $a;
- } else {
- require_once __DIR__.'/vendor/autoload.php';
- }
-}
-unset($require);
+require_once '/usr/share/php/PhpCsFixer/autoload.php';
use PhpCsFixer\Console\Application;
diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCommand.php
--- ./src/Console/Command/HelpCommand.php.rpm 2018-03-21 06:41:56.000000000 +0100
+++ ./src/Console/Command/HelpCommand.php 2018-03-21 06:42:07.838432372 +0100
@@ -348,6 +348,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 2017-04-01 08:50:31.217299123 +0200
+++ ./tests/AutoReview/ProjectCodeTest.php 2017-04-01 08:51:10.127539283 +0200
@@ -314,6 +314,7 @@ final class ProjectCodeTest extends \PHP
--- ./tests/AutoReview/ProjectCodeTest.php.rpm 2018-03-21 06:41:56.000000000 +0100
+++ ./tests/AutoReview/ProjectCodeTest.php 2018-03-21 06:42:07.838432372 +0100
@@ -425,8 +425,10 @@ final class ProjectCodeTest extends Test
->files()
->name('*.php')
->in(__DIR__.'/../../src')
+ ->notName('autoload.php')
->exclude(array(
'Resources',
+ 'tests',
))
;

View file

@ -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 8f33cf3da0da94b67b9cd696b2b9dda81c928f72
%global gh_commit 2de0ac9c1d0d48a9b969814f43698223c6e03d6d
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner FriendsOfPHP
@ -15,11 +15,10 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-cs-fixer
Version: 2.2.3
Version: 2.2.19
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
Group: Development/Tools
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
# git snapshot to get upstream test suite
@ -34,26 +33,23 @@ BuildArch: noarch
# For tests
BuildRequires: php(language) >= 5.4
BuildRequires: php-tokenizer
BuildRequires: php-composer(composer/semver) < 2
BuildRequires: php-composer(composer/semver) >= 1.4
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-symfony-console
BuildRequires: php-symfony-event-dispatcher
BuildRequires: php-symfony-filesystem
BuildRequires: php-symfony-finder
BuildRequires: php-symfony-options-resolver
BuildRequires: php-composer(symfony/polyfill-php55) < 2
BuildRequires: php-composer(symfony/polyfill-php55) >= 1.4
BuildRequires: php-composer(symfony/polyfill-php70) < 2
BuildRequires: php-composer(symfony/polyfill-php70) >= 1.4
BuildRequires: php-composer(symfony/polyfill-php72) < 2
BuildRequires: php-composer(symfony/polyfill-php72) >= 1.4
BuildRequires: php-symfony-process
BuildRequires: php-symfony-stopwatch
BuildRequires: php-composer(sebastian/diff) < 2
BuildRequires: php-composer(sebastian/diff) >= 1.4
BuildRequires: php-mbstring
@ -66,76 +62,79 @@ BuildRequires: php-phar
BuildRequires: php-spl
BuildRequires: php-xml
# From composer.json, "require-dev": {
# "gecko-packages/gecko-php-unit": "^2.0",
# NOTICE: listener disabled
# "johnkary/phpunit-speedtrap": "^1.0.1 || ^2.0 || ^3.0",
# "justinrainbow/json-schema": "^5.0",
# "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
# "keradus/cli-executor": "^1.0",
# "mikey179/vfsStream": "^1.6",
# "satooshi/php-coveralls": "^1.0.2",
# "phpunit/phpunit": "^4.8.35 || ^5.4.3",
# "symfony/phpunit-bridge": "^3.2 || ^4.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)
#BuildRequires: php-composer(keradus/cli-executor) < 2
#BuildRequires: php-composer(keradus/cli-executor) >= 1
BuildRequires: php-composer(mikey179/vfsStream) < 2
BuildRequires: php-composer(mikey179/vfsStream) >= 1.6
BuildRequires: php-composer(phpunit/phpunit) >= 4.8.35
BuildRequires: php-symfony-phpunit-bridge
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
BuildRequires: php-fedora-autoloader-devel
%endif
# From composer.json, "require": {
# "php": "^5.3.6 || >=7.0 <7.2",
# "doctrine/annotations": "^1.2",
# "php": "^5.3.6 || >=7.0 <7.3",
# "ext-json": "*",
# "ext-tokenizer": "*",
# "composer/semver": "^1.4",
# "doctrine/annotations": "^1.2",
# "sebastian/diff": "^1.4",
# "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/event-dispatcher": "^2.1 || ^3.0 || ^4.0",
# "symfony/filesystem": "^2.4 || ^3.0 || ^4.0",
# "symfony/finder": "^2.2 || ^3.0 || ^4.0",
# "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0",
# "symfony/polyfill-php54": "^1.0",
# "symfony/polyfill-php55": "^1.3",
# "symfony/polyfill-php70": "^1.0",
# "symfony/polyfill-xml": "^1.3",
# "symfony/process": "^2.3 || ^3.0",
# "symfony/stopwatch": "^2.5 || ^3.0"
# "symfony/polyfill-php72": "^1.4",
# "symfony/process": "^2.3 || ^3.0 || ^4.0",
# "symfony/stopwatch": "^2.5 || ^3.0 || ^4.0"
# use 5.4 to avoid polyfill
Requires: php(language) >= 5.4
Requires: php-json
Requires: php-tokenizer
Requires: php-composer(composer/semver) < 2
Requires: php-composer(composer/semver) >= 1.4
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.4
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-symfony-console
Requires: php-symfony-event-dispatcher
Requires: php-symfony-filesystem
Requires: php-symfony-finder
Requires: php-symfony-options-resolver
Requires: php-composer(symfony/polyfill-php55) < 2
Requires: php-composer(symfony/polyfill-php55) >= 1.3
Requires: php-composer(symfony/polyfill-php55) >= 1.4
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
Requires: php-composer(symfony/polyfill-php70) >= 1.4
Requires: php-composer(symfony/polyfill-php72) < 2
Requires: php-composer(symfony/polyfill-php72) >= 1.4
Requires: php-symfony-process
Requires: php-symfony-stopwatch
# From composer.json, "suggest": {
# "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
Requires: php-xml
# From phpcompatinfo report for version 2.0.0
# From phpcompatinfo report for version 2.2.5
Requires: php-cli
Requires: php-reflection
Requires: php-dom
Requires: php-json
Requires: php-pcre
Requires: php-phar
Requires: php-spl
Requires: php-xml
# Autoloader
Requires: php-composer(fedora/autoloader)
@ -156,18 +155,37 @@ 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
cat << 'EOF' | tee src/autoload.php
<?php
/* Autoloader for %{name} and its dependencies */
# from composer.json, "autoload" / "classmap"
TESTS="
tests/Test/AbstractFixerTestCase.php
tests/Test/AbstractIntegrationCaseFactory.php
tests/Test/AbstractIntegrationTestCase.php
tests/Test/Constraint/SameStringsConstraint.php
tests/Test/IntegrationCase.php
tests/Test/IntegrationCaseFactory.php
tests/Test/IntegrationCaseFactoryInterface.php
tests/Test/InternalIntegrationCaseFactory.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:../../../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
cat << 'EOF' | tee -a src/autoload.php
require_once '%{php_home}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\', __DIR__);
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/Composer/Semver/autoload.php',
'%{php_home}/Doctrine/Common/Annotations/autoload.php',
[
'%{php_home}/Symfony3/Component/autoload.php',
'%{php_home}/Symfony/Component/autoload.php',
],
'%{php_home}/Symfony/Component/autoload.php',
'%{php_home}/SebastianBergmann/Diff/autoload.php',
'%{php_home}/Symfony/Polyfill/autoload.php',
]);
@ -193,24 +211,38 @@ mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?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}/Symfony/Bridge/PhpUnit/autoload.php',
'%{php_home}/org/bovigo/vfs/autoload.php',
'%{php_home}/JsonSchema5/autoload.php',
'%{buildroot}%{php_home}/PhpCsFixer/autoload.php',
]);
\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\Tests\\', dirname(__DIR__) . '/tests');
EOF
# Ignore integration test
sed -e "/README.rst/s:__DIR__.*':'$PWD/README.rst':" \
-i tests/Console/Command/ReadmeCommandTest.php
# use 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
# Redirect to buildroot
sed -e 's:%{php_home}:%{buildroot}%{php_home}:' -i %{name}
# see https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/.travis.yml
if php -r 'exit (version_compare(PHP_VERSION, "5.6", "<") ? 0 : 1);'; then
VERID=$(php -r 'echo PHP_VERSION_ID;')
if [ $VERID -lt 50600 ]; then
export SKIP_LINT_TEST_CASES=1
fi
if [ $VERID -lt 50500 ]; then
rm tests/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixerTest.php
rm tests/AutoReview/ProjectCodeTest.php
fi
%{_bindir}/phpunit --verbose
%{_bindir}/phpunit -d memory_limit=2G --verbose
%else
: Test suite disabled
%endif
@ -226,6 +258,56 @@ fi
%changelog
* Wed Mar 21 2018 Remi Collet <remi@remirepo.net> - 2.2.19-1
- update to 2.2.19
* Thu Mar 8 2018 Remi Collet <remi@remirepo.net> - 2.2.18-1
- update to 2.2.18
* Fri Feb 23 2018 Remi Collet <remi@remirepo.net> - 2.2.17-1
- Update to 2.2.17
- drop dependency on gecko-packages/gecko-php-unit
* Tue Feb 6 2018 Remi Collet <remi@remirepo.net> - 2.2.16-1
- Update to 2.2.16
* Thu Jan 11 2018 Remi Collet <remi@remirepo.net> - 2.2.14-1
- Update to 2.2.14
* Wed Dec 13 2017 Remi Collet <remi@remirepo.net> - 2.2.13-1
- Update to 2.2.13
* Mon Nov 27 2017 Remi Collet <remi@remirepo.net> - 2.2.12-1
- Update to 2.2.12
* Mon Nov 20 2017 Remi Collet <remi@remirepo.net> - 2.2.11-1
- Update to 2.2.11
* Fri Nov 10 2017 Remi Collet <remi@remirepo.net> - 2.2.10-1
- Update to 2.2.10
* Fri Nov 3 2017 Remi Collet <remi@remirepo.net> - 2.2.9-1
- Update to 2.2.9
* Mon Oct 2 2017 Remi Collet <remi@remirepo.net> - 2.2.8-1
- Update to 2.2.8
* Tue Sep 12 2017 Remi Collet <remi@remirepo.net> - 2.2.7-1
- Update to 2.2.7
- add dependency on composer/semver
* Wed Aug 23 2017 Remi Collet <remi@remirepo.net> - 2.2.6-1
- Update to 2.2.6
* Thu Aug 3 2017 Remi Collet <remi@remirepo.net> - 2.2.5-1
- add dependency on symfony/polyfill-php72
- Update to 2.2.5
* Thu May 25 2017 Remi Collet <remi@remirepo.net> - 2.2.4-1
- Update to 2.2.4
- add dependency on gecko-packages/gecko-php-unit
- only Symfony 2
* Wed Apr 26 2017 Remi Collet <remi@remirepo.net> - 2.2.3-1
- Update to 2.2.3

View file

@ -1 +1 @@
SHA512 (php-cs-fixer-2.2.3-8f33cf3.tgz) = 51451799b412715e35eee354050e7d566ff9af33719a33f8aa782324bb68a7b81386937612a721e7a81c74c49f6eab78548d4e5948f7c1bb712840165e8b579e
SHA512 (php-cs-fixer-2.2.19-2de0ac9.tgz) = 2a2b22b763aade63aba03079a5e43ac232fa6ef3a157203b7437dc11cf350b7b9527bb510ceff37c7b955d2283e3e0e799320d895885bfac52db6a7584400492