summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-11-16 08:25:26 +0100
committerRemi Collet <remi@php.net>2021-11-16 08:25:26 +0100
commit7e2e9772a2c923f200dccbd27f72541f668cc785 (patch)
tree8f90d7c20c17032aade023228e4c0a9a4b0b357c
parent0a9dfd73fec0090ac65e3b77425b06c2ae632b3c (diff)
update to 3.3.1HEADmaster
-rw-r--r--composer.json9
-rw-r--r--php-cs-fixer3-autoload.patch58
-rw-r--r--php-cs-fixer3.spec34
3 files changed, 42 insertions, 59 deletions
diff --git a/composer.json b/composer.json
index c665a72..61fbbb5 100644
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,7 @@
}
],
"require": {
- "php": "^7.1.3 || ^8.0",
+ "php": "^7.2.5 || ^8.0",
"ext-json": "*",
"ext-tokenizer": "*",
"composer/semver": "^3.2",
@@ -26,14 +26,16 @@
"symfony/filesystem": "^4.4.20 || ^5.0",
"symfony/finder": "^4.4.20 || ^5.0",
"symfony/options-resolver": "^4.4.20 || ^5.0",
+ "symfony/polyfill-mbstring": "^1.23",
"symfony/polyfill-php72": "^1.23",
+ "symfony/polyfill-php80": "^1.23",
"symfony/polyfill-php81": "^1.23",
"symfony/process": "^4.4.20 || ^5.0",
"symfony/stopwatch": "^4.4.20 || ^5.0"
},
"require-dev": {
"justinrainbow/json-schema": "^5.2",
- "keradus/cli-executor": "^1.4",
+ "keradus/cli-executor": "^1.5",
"mikey179/vfsstream": "^1.6.8",
"php-coveralls/php-coveralls": "^2.4.3",
"php-cs-fixer/accessible-object": "^1.1",
@@ -49,8 +51,7 @@
},
"suggest": {
"ext-dom": "For handling output formats in XML",
- "ext-mbstring": "For handling non-UTF8 characters.",
- "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
+ "ext-mbstring": "For handling non-UTF8 characters."
},
"config": {
"sort-packages": true
diff --git a/php-cs-fixer3-autoload.patch b/php-cs-fixer3-autoload.patch
index 6c348f2..cbba6eb 100644
--- a/php-cs-fixer3-autoload.patch
+++ b/php-cs-fixer3-autoload.patch
@@ -1,51 +1,19 @@
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
---- ./php-cs-fixer.rpm 2020-12-08 10:29:13.190515695 +0100
-+++ ./php-cs-fixer 2020-12-08 10:30:26.191258296 +0100
-@@ -67,39 +67,7 @@ set_error_handler(static function ($seve
- }
- });
+--- ./php-cs-fixer.rpm 2021-11-16 07:37:19.622816772 +0100
++++ ./php-cs-fixer 2021-11-16 07:39:38.008397640 +0100
+@@ -85,7 +85,7 @@ set_error_handler(static function ($seve
--$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!
-- $possibleFiles = [__DIR__.'/../../autoload.php', __DIR__.'/../autoload.php', __DIR__.'/vendor/autoload.php'];
-- $file = null;
-- foreach ($possibleFiles as $possibleFile) {
-- if (file_exists($possibleFile)) {
-- $file = $possibleFile;
--
-- break;
-- }
-- }
--
-- 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/PhpCsFixer3/autoload.php';
-
- use Composer\XdebugHandler\XdebugHandler;
- use PhpCsFixer\Console\Application;
+ if ($require) {
+ // OK, it's not, let give Composer autoloader a try!
+- $possibleFiles = [__DIR__.'/../../autoload.php', __DIR__.'/../autoload.php', __DIR__.'/vendor/autoload.php'];
++ $possibleFiles = ['/usr/share/php/PhpCsFixer3/autoload.php'];
+ $file = null;
+ foreach ($possibleFiles as $possibleFile) {
+ if (file_exists($possibleFile)) {
diff -up ./tests/AutoReview/ProjectCodeTest.php.rpm ./tests/AutoReview/ProjectCodeTest.php
---- ./tests/AutoReview/ProjectCodeTest.php.rpm 2020-12-08 07:57:59.000000000 +0100
-+++ ./tests/AutoReview/ProjectCodeTest.php 2020-12-08 10:29:13.190515695 +0100
-@@ -721,8 +721,11 @@ final class ProjectCodeTest extends Test
+--- ./tests/AutoReview/ProjectCodeTest.php.rpm 2021-11-16 07:35:55.000000000 +0100
++++ ./tests/AutoReview/ProjectCodeTest.php 2021-11-16 07:37:19.622816772 +0100
+@@ -764,8 +764,11 @@ final class ProjectCodeTest extends Test
->files()
->name('*.php')
->in(__DIR__.'/../../src')
diff --git a/php-cs-fixer3.spec b/php-cs-fixer3.spec
index d824e4c..8a57fad 100644
--- a/php-cs-fixer3.spec
+++ b/php-cs-fixer3.spec
@@ -10,13 +10,17 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit cf4cedb9e8991c2daa94a756176d81bf487e4c4b
+%global gh_commit b37bf90405cec3f7a83c18e645ef748bcb87ac11
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner FriendsOfPHP
%global gh_project PHP-CS-Fixer
%global php_home %{_datadir}/php
-%global with_tests 0%{!?_without_tests:1}
+%if 0%{?fedora} >= 36
+%bcond_with tests
+%else
+%bcond_without tests
+%endif
%global major 3
# Bundled this fork which is not designed for use outside of php-cs-fixer
@@ -27,7 +31,7 @@
%global gh_diff_short %(c=%{gh_diff_commit}; echo ${c:0:7})
Name: php-cs-fixer%{major}
-Version: 3.1.0
+Version: 3.3.1
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
@@ -42,7 +46,7 @@ Source2: makesrc.sh
Patch0: %{name}-autoload.patch
BuildArch: noarch
-%if %{with_tests}
+%if %{with tests}
# For tests
# as we use phpunit9
BuildRequires: php(language) >= 7.3
@@ -53,6 +57,7 @@ BuildRequires: (php-composer(composer/semver) >= 3.2 with php-co
BuildRequires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 3)
BuildRequires: (php-composer(doctrine/annotations) >= 1.12 with php-composer(doctrine/annotations) < 2)
BuildRequires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2)
+BuildRequires: (php-composer(symfony/polyfill-php80) >= 1.23 with php-composer(symfony/polyfill-php80) < 2)
BuildRequires: (php-composer(symfony/polyfill-php81) >= 1.23 with php-composer(symfony/polyfill-php81) < 2)
# remirepo:7
%else
@@ -132,7 +137,7 @@ BuildRequires: phpunit9
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
-# "php": "^7.1.3 || ^8.0",
+# "php": "^7.2.5 || ^8.0",
# "ext-json": "*",
# "ext-tokenizer": "*",
# "composer/semver": "^3.2",
@@ -144,12 +149,14 @@ BuildRequires: php-fedora-autoloader-devel
# "symfony/filesystem": "^4.4.20 || ^5.0",
# "symfony/finder": "^4.4.20 || ^5.0",
# "symfony/options-resolver": "^4.4.20 || ^5.0",
+# "symfony/polyfill-mbstring": "^1.23",
# "symfony/polyfill-php72": "^1.23",
+# "symfony/polyfill-php80": "^1.23",
# "symfony/polyfill-php81": "^1.23",
# "symfony/process": "^4.4.20 || ^5.0",
# "symfony/stopwatch": "^4.4.20 || ^5.0"
# raised to 7.2 to avoid the polyfill
-Requires: php(language) >= 7.2
+Requires: php(language) >= 7.2.5
Requires: php-json
Requires: php-tokenizer
# remirepo:1
@@ -158,6 +165,7 @@ Requires: (php-composer(composer/semver) >= 3.2 with php-co
Requires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 3)
Requires: (php-composer(doctrine/annotations) >= 1.12 with php-composer(doctrine/annotations) < 2)
Requires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2)
+Requires: (php-composer(symfony/polyfill-php80) >= 1.23 with php-composer(symfony/polyfill-php80) < 2)
Requires: (php-composer(symfony/polyfill-php81) >= 1.23 with php-composer(symfony/polyfill-php81) < 2)
# remirepo:7
%else
@@ -178,8 +186,7 @@ Requires: php-symfony4-stopwatch
Requires: php-symfony4-debug
# From composer.json, "suggest": {
# "ext-dom": "For handling output formats in XML",
-# "ext-mbstring": "For handling non-UTF8 characters.",
-# "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
+# "ext-mbstring": "For handling non-UTF8 characters."
Requires: php-dom
Requires: php-mbstring
# From phpcompatinfo report for version 3.0.0
@@ -265,7 +272,7 @@ install -Dpm755 php-cs-fixer %{buildroot}%{_bindir}/%{name}
%check
-%if %{with_tests}
+%if %{with tests}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
@@ -324,7 +331,7 @@ for cmdarg in "php %{phpunit}" php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
$1 -d memory_limit=2G ${2:-%{_bindir}/phpunit9} \
- --filter '^((?!(testFixerContainsAllPhpunitStaticMethodsInItsList|testFix74Deprecated|testFixersPriorityPairsHaveIntegrationTest|testThereAreNoExtraFiles|testFixersDocumentationIndexFileIsUpToDate|testInheritance|testFixerDefinitions)).)*$' \
+ --filter '^((?!(testFixerContainsAllPhpunitStaticMethodsInItsList|testFix74Deprecated|testFixersPriorityPairsHaveIntegrationTest|testThereAreNoExtraFiles|testFixersDocumentationIndexFileIsUpToDate|testInheritance|testFixerDefinitions|testPatternValidation)).)*$' \
|| ret=1
fi
done
@@ -345,9 +352,16 @@ exit $ret
%changelog
+* Tue Nov 16 2021 Remi Collet <remi@remirepo.net> - 3.3.1-1
+- update to 3.3.1
+
+* Tue Oct 5 2021 Remi Collet <remi@remirepo.net> - 3.2.1-1
+- update to 3.2.1
+
* Thu Sep 2 2021 Remi Collet <remi@remirepo.net> - 3.1.0-1
- update to 3.1.0
- add dependency on symfony/polyfill-php81
+
* Thu Aug 5 2021 Remi Collet <remi@remirepo.net> - 3.0.2-1
- update to 3.0.2