Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19d1bc4221 | ||
|
|
db50761848 | ||
|
|
fc68f777c4 | ||
|
|
d60fe03e0b | ||
|
|
8dd603244e | ||
|
|
c18ebecc2b | ||
|
|
a6c898c3b2 | ||
|
|
e282d615c0 |
5 changed files with 70 additions and 62 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -35,3 +35,9 @@ clog
|
|||
/php-cs-fixer-2.14.2-ff401e5.tgz
|
||||
/php-cs-fixer-2.15.0-adfab51.tgz
|
||||
/php-cs-fixer-2.15.1-2006451.tgz
|
||||
/php-cs-fixer-2.15.2-c9d30fd.tgz
|
||||
/php-cs-fixer-2.15.3-705490b.tgz
|
||||
/php-cs-fixer-2.16.0-ceaff36.tgz
|
||||
/php-cs-fixer-2.16.1-c8afb59.tgz
|
||||
/php-cs-fixer-2.16.2-c460a3c.tgz
|
||||
/php-cs-fixer-2.16.3-83baf82.tgz
|
||||
|
|
|
|||
22
4406.patch
22
4406.patch
|
|
@ -1,22 +0,0 @@
|
|||
From e5a5149bdb4b11e3b32130a4c0be62b6a7a3306b Mon Sep 17 00:00:00 2001
|
||||
From: Remi Collet <fedora@famillecollet.com>
|
||||
Date: Mon, 6 May 2019 11:38:26 +0200
|
||||
Subject: [PATCH] Fix escape sequence is invalid in character clas
|
||||
|
||||
---
|
||||
src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php b/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php
|
||||
index 1db72935b0..a3a24a8cb7 100644
|
||||
--- a/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php
|
||||
+++ b/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php
|
||||
@@ -84,7 +84,7 @@ private function convertElseifToIf(Tokens $tokens, $index)
|
||||
$whitespace = '';
|
||||
for ($previous = $index - 1; $previous > 0; --$previous) {
|
||||
$token = $tokens[$previous];
|
||||
- if ($token->isWhitespace() && Preg::match('/(\R[^\R]*)$/', $token->getContent(), $matches)) {
|
||||
+ if ($token->isWhitespace() && Preg::match('/(\R[^\n\r]*)$/', $token->getContent(), $matches)) {
|
||||
$whitespace = $matches[1];
|
||||
|
||||
break;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
|
||||
--- ./php-cs-fixer.rpm 2019-05-06 09:31:03.871240441 +0200
|
||||
+++ ./php-cs-fixer 2019-05-06 09:32:17.127721736 +0200
|
||||
@@ -43,27 +43,7 @@ set_error_handler(function ($severity, $
|
||||
--- ./php-cs-fixer.rpm 2019-11-04 09:02:13.808580217 +0100
|
||||
+++ ./php-cs-fixer 2019-11-04 09:03:24.388258652 +0100
|
||||
@@ -43,38 +43,7 @@ set_error_handler(function ($severity, $
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -15,15 +15,26 @@ diff -up ./php-cs-fixer.rpm ./php-cs-fixer
|
|||
- } 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';
|
||||
- $possibleFiles = [__DIR__.'/../../autoload.php', __DIR__.'/../autoload.php', __DIR__.'/vendor/autoload.php'];
|
||||
- $file = null;
|
||||
- foreach ($possibleFiles as $possibleFile) {
|
||||
- if (file_exists($possibleFile)) {
|
||||
- $file = $possibleFile;
|
||||
-
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- unset($a);
|
||||
- if (null === $file) {
|
||||
- throw new RuntimeException('Unable to locate autoload.php file.');
|
||||
- }
|
||||
-
|
||||
- require_once $file;
|
||||
-
|
||||
- unset($possibleFiles, $possibleFile, $file);
|
||||
-}
|
||||
-unset($require);
|
||||
+require_once '/usr/share/php/PhpCsFixer/autoload.php';
|
||||
|
|
@ -31,9 +42,9 @@ diff -up ./php-cs-fixer.rpm ./php-cs-fixer
|
|||
use Composer\XdebugHandler\XdebugHandler;
|
||||
use PhpCsFixer\Console\Application;
|
||||
diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCommand.php
|
||||
--- ./src/Console/Command/HelpCommand.php.rpm 2019-05-06 09:29:43.000000000 +0200
|
||||
+++ ./src/Console/Command/HelpCommand.php 2019-05-06 09:31:03.871240441 +0200
|
||||
@@ -379,6 +379,8 @@ EOF
|
||||
--- ./src/Console/Command/HelpCommand.php.rpm 2019-11-04 09:01:59.000000000 +0100
|
||||
+++ ./src/Console/Command/HelpCommand.php 2019-11-04 09:02:13.808580217 +0100
|
||||
@@ -377,6 +377,8 @@ EOF
|
||||
{
|
||||
static $version = null;
|
||||
|
||||
|
|
@ -43,9 +54,9 @@ diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCom
|
|||
return $version;
|
||||
}
|
||||
diff -up ./tests/AutoReview/ProjectCodeTest.php.rpm ./tests/AutoReview/ProjectCodeTest.php
|
||||
--- ./tests/AutoReview/ProjectCodeTest.php.rpm 2019-05-06 09:29:43.000000000 +0200
|
||||
+++ ./tests/AutoReview/ProjectCodeTest.php 2019-05-06 09:31:03.872240448 +0200
|
||||
@@ -412,8 +412,11 @@ final class ProjectCodeTest extends Test
|
||||
--- ./tests/AutoReview/ProjectCodeTest.php.rpm 2019-11-04 09:01:59.000000000 +0100
|
||||
+++ ./tests/AutoReview/ProjectCodeTest.php 2019-11-04 09:02:13.808580217 +0100
|
||||
@@ -473,8 +473,11 @@ final class ProjectCodeTest extends Test
|
||||
->files()
|
||||
->name('*.php')
|
||||
->in(__DIR__.'/../../src')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# remirepo/fedora spec file for php-cs-fixer
|
||||
#
|
||||
# Copyright (c) 2016-2019 Remi Collet
|
||||
# Copyright (c) 2016-2020 Remi Collet
|
||||
# License: CC-BY-SA
|
||||
# http://creativecommons.org/licenses/by-sa/4.0/
|
||||
#
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
# For compatibility with SCL
|
||||
%undefine __brp_mangle_shebangs
|
||||
|
||||
%global gh_commit 20064511ab796593a3990669eff5f5b535001f7c
|
||||
%global gh_commit 83baf823a33a1cbd5416c8626935cf3f843c10b0
|
||||
%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.15.1
|
||||
Version: 2.16.3
|
||||
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
|
||||
Summary: A tool to automatically fix PHP code style
|
||||
|
||||
|
|
@ -39,8 +39,6 @@ Source2: makesrc.sh
|
|||
|
||||
# Use our autoloader
|
||||
Patch0: %{name}-autoload.patch
|
||||
# Fix escape sequence is invalid in character class
|
||||
Patch1: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/4406.patch
|
||||
|
||||
BuildArch: noarch
|
||||
%if %{with_tests}
|
||||
|
|
@ -82,9 +80,10 @@ BuildRequires: php-symfony3-debug
|
|||
# "php-cs-fixer/accessible-object": "^1.0",
|
||||
# "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1",
|
||||
# "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1",
|
||||
# "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1",
|
||||
# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
|
||||
# "phpunitgoodpractices/traits": "^1.8",
|
||||
# "symfony/phpunit-bridge": "^4.3"
|
||||
# "symfony/phpunit-bridge": "^4.3 || ^5.0",
|
||||
# "symfony/yaml": "^3.0 || ^4.0 || ^5.0"
|
||||
# ignored as test using it fail strangely
|
||||
#BuildRequires: php-composer(keradus/cli-executor) < 2
|
||||
#BuildRequires: php-composer(keradus/cli-executor) >= 1.0
|
||||
|
|
@ -94,13 +93,8 @@ BuildRequires: (php-composer(php-cs-fixer/accessible-object)
|
|||
BuildRequires: (php-composer(php-cs-fixer/phpunit-constraint-isidenticalstring) >= 1.1 with php-composer(php-cs-fixer/phpunit-constraint-isidenticalstring) < 2)
|
||||
BuildRequires: (php-composer(php-cs-fixer/phpunit-constraint-xmlmatchesxsd) >= 1.1 with php-composer(php-cs-fixer/phpunit-constraint-xmlmatchesxsd) < 2)
|
||||
BuildRequires: (php-composer(phpunitgoodpractices/traits) >= 1.8 with php-composer(phpunitgoodpractices/traits) < 2)
|
||||
%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
|
||||
%global phpunit %{_bindir}/phpunit7
|
||||
BuildRequires: phpunit7 >= 7.1
|
||||
%else
|
||||
%global phpunit %{_bindir}/phpunit6
|
||||
BuildRequires: phpunit6 >= 6.5.8
|
||||
%endif
|
||||
%endif
|
||||
# Autoloader
|
||||
BuildRequires: php-fedora-autoloader-devel
|
||||
|
|
@ -114,16 +108,16 @@ BuildRequires: php-fedora-autoloader-devel
|
|||
# "doctrine/annotations": "^1.2",
|
||||
# Bundled
|
||||
# "php-cs-fixer/diff": "^1.3",
|
||||
# "symfony/console": "^3.4.17 || ^4.1.6",
|
||||
# "symfony/event-dispatcher": "^3.0 || ^4.0",
|
||||
# "symfony/filesystem": "^3.0 || ^4.0",
|
||||
# "symfony/finder": "^3.0 || ^4.0",
|
||||
# "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
|
||||
# "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0",
|
||||
# "symfony/filesystem": "^3.0 || ^4.0 || ^5.0",
|
||||
# "symfony/finder": "^3.0 || ^4.0 || ^5.0",
|
||||
# "symfony/options-resolver": "^3.0 || ^4.0",
|
||||
# "symfony/polyfill-php70": "^1.0",
|
||||
# "symfony/polyfill-php72": "^1.4",
|
||||
# "symfony/polyfill-xml": "^1.3",
|
||||
# "symfony/process": "^3.0 || ^4.0",
|
||||
# "symfony/stopwatch": "^3.0 || ^4.0"
|
||||
# "symfony/process": "^3.0 || ^4.0 || ^5.0",
|
||||
# "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
|
||||
Requires: php(language) >= 5.6
|
||||
Requires: php-json
|
||||
Requires: php-tokenizer
|
||||
|
|
@ -143,17 +137,18 @@ Requires: php-symfony3-stopwatch
|
|||
# Missing dependency for Console
|
||||
Requires: php-symfony3-debug
|
||||
# From composer.json, "suggest": {
|
||||
# "ext-dom": "For handling output formats in XML",
|
||||
# "ext-mbstring": "For handling non-UTF8 characters in cache signature.",
|
||||
# "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
|
||||
# "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
|
||||
# "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
|
||||
Requires: php-dom
|
||||
Requires: php-mbstring
|
||||
Recommends: php-composer(php-cs-fixer/phpunit-constraint-isidenticalstring)
|
||||
Recommends: php-composer(php-cs-fixer/phpunit-constraint-xmlmatchesxsd)
|
||||
# From phpcompatinfo report for version 2.4.0
|
||||
Requires: php-cli
|
||||
Requires: php-reflection
|
||||
Requires: php-dom
|
||||
Requires: php-pcre
|
||||
Requires: php-phar
|
||||
Requires: php-spl
|
||||
|
|
@ -178,7 +173,6 @@ projects. This tool does not only detect them, but also fixes them for you.
|
|||
%prep
|
||||
%setup -q -n %{gh_project}-%{gh_commit} -a1
|
||||
%patch0 -p1 -b .rpm
|
||||
%patch1 -p1
|
||||
mv diff-%{gh_diff_commit}/src src/diff
|
||||
|
||||
find src -name \*rpm -delete -print
|
||||
|
|
@ -193,6 +187,7 @@ TESTS="
|
|||
tests/Test/IntegrationCaseFactory.php
|
||||
tests/Test/IntegrationCaseFactoryInterface.php
|
||||
tests/Test/InternalIntegrationCaseFactory.php
|
||||
tests/Test/IsIdenticalConstraint.php
|
||||
tests/TestCase.php
|
||||
"
|
||||
for i in $TESTS; do
|
||||
|
|
@ -201,8 +196,8 @@ for i in $TESTS; do
|
|||
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/
|
||||
sed -e 's:../../../ci:ci:' -i src/Console/Command/HelpCommand.php
|
||||
cp -pr ci-integration.sh src/Console/Command/
|
||||
|
||||
# tolerant because conditional definition in tests/TestCase.php
|
||||
phpab --template fedora \
|
||||
|
|
@ -279,11 +274,12 @@ sed -e '/<listeners>/,/<\/listeners>/d' phpunit.xml.dist >phpunit.xml
|
|||
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}" php71 php72 php73 php74; do
|
||||
if which $cmdarg; then
|
||||
set $cmdarg
|
||||
$1 -d memory_limit=2G ${2:-%{_bindir}/phpunit7} \
|
||||
--filter '^((?!(testFixerContainsAllPhpunitStaticMethodsInItsList)).)*$' \
|
||||
--filter '^((?!(testFixerContainsAllPhpunitStaticMethodsInItsList|testFix74Deprecated|testFixersPriorityPairsHaveIntegrationTest)).)*$' \
|
||||
|| ret=1
|
||||
fi
|
||||
done
|
||||
|
|
@ -294,7 +290,6 @@ exit $ret
|
|||
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license LICENSE
|
||||
%doc composer.json
|
||||
%doc *.md *.rst
|
||||
|
|
@ -303,6 +298,24 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Apr 16 2020 Remi Collet <remi@remirepo.net> - 2.16.3-1
|
||||
- update to 2.16.3
|
||||
|
||||
* Mon Apr 13 2020 Remi Collet <remi@remirepo.net> - 2.16.2-1
|
||||
- update to 2.16.2
|
||||
|
||||
* Tue Nov 26 2019 Remi Collet <remi@remirepo.net> - 2.16.1-1
|
||||
- update to 2.16.1
|
||||
|
||||
* Mon Nov 4 2019 Remi Collet <remi@remirepo.net> - 2.16.0-1
|
||||
- update to 2.16.0
|
||||
|
||||
* Sun Sep 1 2019 Remi Collet <remi@remirepo.net> - 2.15.3-1
|
||||
- update to 2.15.3
|
||||
|
||||
* Thu Aug 29 2019 Remi Collet <remi@remirepo.net> - 2.15.2-1
|
||||
- update to 2.15.2
|
||||
|
||||
* Tue Jun 4 2019 Remi Collet <remi@remirepo.net> - 2.15.1-1
|
||||
- update to 2.15.1
|
||||
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (php-cs-fixer-2.15.1-2006451.tgz) = 60bd2a66937efc5def4222cb7167fb0ed1d775dd5599e6527129e4aae4e59238d301977ae7886c6eec449bf7adde7bfe48346e16fde10c9e77b7b80786ed1560
|
||||
SHA512 (php-cs-fixer-diff-1.3.0-78bb099.tgz) = 976365ab0f1cd51d0d76f444f3b4ad0d6de6f07ac6f0800043da6e43e337edc4e2ffd73a6c80f2c6e3324c69b695d64cf6cdb05a52c1606adfec008387d5fa8b
|
||||
SHA512 (php-cs-fixer-2.16.3-83baf82.tgz) = 5c06b616e12b2c6189e003975ad4910333c9b061fc6cf0e43a850bd4eb5157191dd09b7775085fc750d08eb02c78558bd0b74f8bcc6262ccd65a92fe30707023
|
||||
SHA512 (php-cs-fixer-diff-1.3.0-78bb099.tgz) = 7e441a9fb7fe4d4ab63e1889de4c75261f1a2ba26ba978525c47e78738bb0139464ee8c7da29e3e36d2d79b42bffcb60f435eddae387e518243c8ae4fbe04bbb
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue