diff --git a/.gitignore b/.gitignore index 34adb01..86fdad3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,44 @@ clog -/php-cs-fixer-3.82.2-684ed3a.tgz -/php-cs-fixer-3.84.0-38dad07.tgz -/php-cs-fixer-3.85.1-2fb6d7f.tgz -/php-cs-fixer-3.86.0-4a952bd.tgz -/php-cs-fixer-3.87.1-2f51703.tgz -/php-cs-fixer-3.87.2-da5f0a7.tgz -/php-cs-fixer-3.88.0-f234696.tgz -/php-cs-fixer-3.88.2-a8d1558.tgz -/php-cs-fixer-3.89.0-4dd6768.tgz -/php-cs-fixer-3.89.1-f34967d.tgz -/php-cs-fixer-3.89.2-7569658.tgz -/php-cs-fixer-3.90.0-ad732c2.tgz -/php-cs-fixer-3.91.2-f171dc2.tgz -/php-cs-fixer-3.91.3-9f10aa6.tgz -/php-cs-fixer-3.92.3-2ba8f5a.tgz -/php-cs-fixer-3.92.4-9e7488b.tgz -/php-cs-fixer-3.92.5-260cc8c.tgz +/php-cs-fixer-2.2.*.tgz +/php-cs-fixer-2.3.1-d5257f7.tgz +/php-cs-fixer-2.3.2-597745f.tgz +/php-cs-fixer-2.4.0-63661f3.tgz +/php-cs-fixer-2.5.0-63aad57.tgz +/php-cs-fixer-2.6.0-5642a36.tgz +/php-cs-fixer-2.6.1-a048433.tgz +/php-cs-fixer-2.7.0-e4e93a1.tgz +/php-cs-fixer-2.7.1-ab2e189.tgz +/php-cs-fixer-diff-1.1.0-d068eda.tgz +/php-cs-fixer-2.8.0-89e7b08.tgz +/php-cs-fixer-diff-1.2.0-f0ef613.tgz +/php-cs-fixer-2.8.1-04f71e5.tgz +/php-cs-fixer-2.8.2-b331701.tgz +/php-cs-fixer-2.8.3-d9ec9b8.tgz +/php-cs-fixer-2.9.0-454ddbe.tgz +/php-cs-fixer-2.10.0-513a376.tgz +/php-cs-fixer-2.10.2-74e4682.tgz +/php-cs-fixer-diff-1.2.1-b95b8c0.tgz +/php-cs-fixer-2.10.3-1634a2c.tgz +/php-cs-fixer-diff-1.3.0-78bb099.tgz +/php-cs-fixer-2.10.4-b2dce1d.tgz +/php-cs-fixer-2.11.0-2ac8def.tgz +/php-cs-fixer-2.11.1-ad94441.tgz +/php-cs-fixer-2.12.0-a53f39a.tgz +/php-cs-fixer-2.12.1-beef6cb.tgz +/php-cs-fixer-2.12.2-dcc87d5.tgz +/php-cs-fixer-2.12.3-b23d499.tgz +/php-cs-fixer-2.13.0-7136aa4.tgz +/php-cs-fixer-2.13.1-54814c6.tgz +/php-cs-fixer-2.13.2-ce6c4bb.tgz +/php-cs-fixer-2.14.0-b788ea0.tgz +/php-cs-fixer-2.14.1-2e82abd.tgz +/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 +/php-cs-fixer-2.16.4-1023c34.tgz diff --git a/makesrc.sh b/makesrc.sh index 69295c8..c047df5 100755 --- a/makesrc.sh +++ b/makesrc.sh @@ -1,40 +1,27 @@ #!/bin/bash NAME=$(sed -n '/^Name:/{s/.* //;p}' *.spec) -DATE=$(sed -n '/^%global gh_date/{s/.* //;p}' $NAME.spec) OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) SHORT=${COMMIT:0:7} -DATE=$(date -d "$DATE -4 days" +%Y-%m-%d) +echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" -if [ -f $NAME-$VERSION-$SHORT.tgz ]; then - echo "Skip $NAME-$VERSION-$SHORT.tgz" -else - echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION, Commit=$COMMIT, Date=$DATE\n" +echo "Cloning..." +git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT - echo "Cloning..." - git clone --shallow-since=$DATE https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT || exit 1 +echo "Getting commit..." +pushd $PROJECT-$COMMIT +git checkout $COMMIT +cp composer.json ../composer.json +popd - echo "Getting commit..." - pushd $PROJECT-$COMMIT - git checkout $COMMIT || exit1 - cp composer.json ../ +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT - composer config platform.php 8.1.99 - # see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/dev-tools/build.sh - # some dev dep cannot be satisfied but are not needed - composer remove --dev infection/infection --no-update - composer install --no-interaction --no-progress --no-dev --no-scripts --optimize-autoloader - cp vendor/composer/installed.json ../ - popd - - echo "Archiving..." - tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT - - echo "Cleaning..." - rm -rf $PROJECT-$COMMIT -fi +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT +echo "Done." diff --git a/php-cs-fixer-autoload.patch b/php-cs-fixer-autoload.patch index a14e08a..632dd31 100644 --- a/php-cs-fixer-autoload.patch +++ b/php-cs-fixer-autoload.patch @@ -1,12 +1,70 @@ diff -up ./php-cs-fixer.rpm ./php-cs-fixer ---- ./php-cs-fixer.rpm 2022-01-14 15:01:36.281743286 +0100 -+++ ./php-cs-fixer 2022-01-14 15:01:59.983646138 +0100 -@@ -81,7 +81,7 @@ set_error_handler(static function ($seve +--- ./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, $ + } + }); + +-$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/PhpCsFixer/autoload.php'; + + 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-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; + ++ return Application::VERSION; ++ + if (null !== $version) { + return $version; + } +diff -up ./tests/AutoReview/ProjectCodeTest.php.rpm ./tests/AutoReview/ProjectCodeTest.php +--- ./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') ++ ->notName('autoload.php') + ->exclude([ + 'Resources', ++ 'diff', ++ 'tests', + ]) + ; - 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-cs-fixer/vendor/autoload.php']; - $file = null; - foreach ($possibleFiles as $possibleFile) { - if (file_exists($possibleFile)) { diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec index ed61663..2b9d10d 100644 --- a/php-cs-fixer.spec +++ b/php-cs-fixer.spec @@ -1,75 +1,231 @@ # remirepo/fedora spec file for php-cs-fixer # -# SPDX-FileCopyrightText: Copyright 2016-2026 Remi Collet -# SPDX-License-Identifier: CECILL-2.1 -# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +# Copyright (c) 2016-2020 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit 260cc8c4a1d2f6d2f22cd4f9c70aa72e55ebac58 +# For compatibility with SCL +%undefine __brp_mangle_shebangs + +%global gh_commit 1023c3458137ab052f6ff1e09621a721bfdeca13 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_date 2026-01-08 +#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} + +# Bundled this fork which is not designed for use outside of php-cs-fixer +# https://github.com/PHP-CS-Fixer/diff/releases +%global gh_diff_owner PHP-CS-Fixer +%global gh_diff_version 1.3.0 +%global gh_diff_commit 78bb099e9c16361126c86ce82ec4405ebab8e756 +%global gh_diff_short %(c=%{gh_diff_commit}; echo ${c:0:7}) Name: php-cs-fixer -Version: 3.92.5 -Release: 1%{?dist} -Summary: PHP Coding Standards Fixer +Version: 2.16.4 +Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist} +Summary: A tool to automatically fix PHP code style -# see bundled list below, SPDX -License: MIT AND BSD-3-Clause +License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} # git snapshot to get upstream test suite Source0: %{name}-%{version}-%{gh_short}.tgz +Source1: %{name}-diff-%{gh_diff_version}-%{gh_diff_short}.tgz Source2: makesrc.sh # Use our autoloader Patch0: %{name}-autoload.patch BuildArch: noarch -BuildRequires: php(language) >= 8.1 -BuildRequires: php-cli +%if %{with_tests} +# For tests +BuildRequires: php(language) >= 5.6 +BuildRequires: php-tokenizer +BuildRequires: (php-composer(composer/semver) >= 1.4 with php-composer(composer/semver) < 2) +BuildRequires: (php-composer(composer/xdebug-handler) >= 1.0 with php-composer(composer/xdebug-handler) < 2) +BuildRequires: (php-composer(doctrine/annotations) >= 1.2 with php-composer(doctrine/annotations) < 2) +BuildRequires: (php-composer(symfony/polyfill-php70) >= 1.0 with php-composer(symfony/polyfill-php70) < 2) +BuildRequires: (php-composer(symfony/polyfill-php72) >= 1.4 with php-composer(symfony/polyfill-php72) < 2) +BuildRequires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2) +BuildRequires: php-symfony3-console +BuildRequires: php-symfony3-event-dispatcher +BuildRequires: php-symfony3-filesystem +BuildRequires: php-symfony3-finder +BuildRequires: php-symfony3-options-resolver +BuildRequires: php-symfony3-process +BuildRequires: php-symfony3-stopwatch +BuildRequires: php-mbstring +BuildRequires: php-xml +BuildRequires: php-reflection +BuildRequires: php-dom BuildRequires: php-json -BuildRequires: composer-generators >= 0.1.1 +BuildRequires: php-pcre +BuildRequires: php-phar +BuildRequires: php-spl +BuildRequires: php-xml +# Missing dependency for Console +BuildRequires: php-symfony3-debug +BuildRequires: php-symfony3-debug +# From composer.json, "require-dev": { +# NOTICE: listener disabled during test suite +# "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", +# "keradus/cli-executor": "^1.2", +# "justinrainbow/json-schema": "^5.0", +# "mikey179/vfsstream": "^1.6", +# "php-coveralls/php-coveralls": "^2.1", +# "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.14 || ^7.1", +# "phpunitgoodpractices/traits": "^1.8", +# "symfony/phpunit-bridge": "^5.1", +# "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 +BuildRequires: (php-composer(justinrainbow/json-schema) >= 5.0 with php-composer(justinrainbow/json-schema) < 6) +BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6 with php-composer(mikey179/vfsstream) < 2) +BuildRequires: (php-composer(php-cs-fixer/accessible-object) >= 1.0 with php-composer(php-cs-fixer/accessible-object) < 2) +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) +%global phpunit %{_bindir}/phpunit7 +BuildRequires: phpunit7 >= 7.1 +%endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel -# see composer.json and makesrc.sh -Requires: php(language) >= 8.1 +# From composer.json, "require": { +# "php": "^5.6 || ^7.0", +# "ext-json": "*", +# "ext-tokenizer": "*", +# "composer/semver": "^1.4", +# "composer/xdebug-handler": "^1.2", +# "doctrine/annotations": "^1.2", +# Bundled +# "php-cs-fixer/diff": "^1.3", +# "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 || ^5.0", +# "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" +Requires: php(language) >= 5.6 Requires: php-json Requires: php-tokenizer -# From phpcompatinfo report for version 3.5.0 +Requires: (php-composer(composer/semver) >= 1.4 with php-composer(composer/semver) < 2) +Requires: (php-composer(composer/xdebug-handler) >= 1.2 with php-composer(composer/xdebug-handler) < 2) +Requires: (php-composer(doctrine/annotations) >= 1.2 with php-composer(doctrine/annotations) < 2) +Requires: (php-composer(symfony/polyfill-php70) >= 1.0 with php-composer(symfony/polyfill-php70) < 2) +Requires: (php-composer(symfony/polyfill-php72) >= 1.4 with php-composer(symfony/polyfill-php72) < 2) +Requires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2) +Requires: php-symfony3-console +Requires: php-symfony3-event-dispatcher +Requires: php-symfony3-filesystem +Requires: php-symfony3-finder +Requires: php-symfony3-options-resolver +Requires: php-symfony3-process +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.", +# "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-intl 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-pcre +Requires: php-phar +Requires: php-spl +Requires: php-xml +# Autoloader +Requires: php-composer(fedora/autoloader) -# Package was renamed -Obsoletes: php-cs-fixer3 < 3.5 -Provides: php-cs-fixer3 = %{version} +Provides: bundled(php-cs-fixer/diff) = %{gh_diff_version} +Provides: php-composer(friendsofphp/php-cs-fixer) = %{version} %description -The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow -standards; whether you want to follow PHP coding standards as defined in the -PSR-1, PSR-2, etc., or other community driven ones like the Symfony one. You -can also define your (team's) style through configuration. +The PHP Coding Standards Fixer tool fixes most issues in your code when you +want to follow the PHP coding standards as defined in the PSR-1 and PSR-2 +documents and many more. -It can modernize your code (like converting the pow function to the ** operator -on PHP 5.6) and (micro) optimize it. - -If you are already using a linter to identify coding standards problems in your -code, you know that fixing them by hand is tedious, especially on large +If you are already using a linter to identify coding standards problems in +your code, you know that fixing them by hand is tedious, especially on large projects. This tool does not only detect them, but also fixes them for you. %prep -%setup -q -n %{gh_project}-%{gh_commit} -%patch -P0 -p1 -b .rpm +%setup -q -n %{gh_project}-%{gh_commit} -a1 +%patch0 -p1 -b .rpm +mv diff-%{gh_diff_commit}/src src/diff -# Fix version -#sed -e '/VERSION/s/3.68.6-DEV/%{version}/' -i src/Console/Application.php -# check version -grep "'%{version}'" src/Console/Application.php +find src -name \*rpm -delete -print + +# from composer.json, "autoload" / "classmap" +TESTS=" + tests/Test/AbstractFixerTestCase.php + tests/Test/AbstractIntegrationCaseFactory.php + tests/Test/AbstractIntegrationTestCase.php + tests/Test/Assert/AssertTokensTrait.php + tests/Test/IntegrationCase.php + tests/Test/IntegrationCaseFactory.php + tests/Test/IntegrationCaseFactoryInterface.php + tests/Test/InternalIntegrationCaseFactory.php + tests/Test/IsIdenticalConstraint.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:../../../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 \ + --tolerant \ + --output src/autoload.php \ + src/tests src/diff + +cat << 'EOF' | tee -a src/autoload.php + +\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\', __DIR__); +\Fedora\Autoloader\Dependencies::required([ + '%{php_home}/Composer/Semver/autoload.php', + '%{php_home}/Composer/XdebugHandler/autoload.php', + '%{php_home}/Doctrine/Common/Annotations/autoload.php', + '%{php_home}/Symfony3/Component/Console/autoload.php', + '%{php_home}/Symfony3/Component/EventDispatcher/autoload.php', + '%{php_home}/Symfony3/Component/Filesystem/autoload.php', + '%{php_home}/Symfony3/Component/Finder/autoload.php', + '%{php_home}/Symfony3/Component/OptionsResolver/autoload.php', + '%{php_home}/Symfony3/Component/Process/autoload.php', + '%{php_home}/Symfony3/Component/Stopwatch/autoload.php', + '%{php_home}/Symfony/Polyfill/autoload.php', +]); +\Fedora\Autoloader\Dependencies::optional([ + '%{php_home}/PhpCsFixer/PhpunitConstraintIsIdenticalString/autoload.php', + '%{php_home}/PhpCsFixer/PhpunitConstraintXmlMatchesXsd/autoload.php', +]); +EOF %build @@ -78,416 +234,75 @@ grep "'%{version}'" src/Console/Application.php %install : Library -mkdir -p %{buildroot}%{_datadir}/%{name} -cp -pr src %{buildroot}%{_datadir}/%{name}/src -cp -pr vendor %{buildroot}%{_datadir}/%{name}/vendor +mkdir -p %{buildroot}%{php_home} +cp -pr src %{buildroot}%{php_home}/PhpCsFixer : Command install -Dpm755 %{name} %{buildroot}%{_bindir}/%{name} %check -sed -e 's:%{_datadir}:%{buildroot}%{_datadir}:' -i %{name} -PHP_CS_FIXER_IGNORE_ENV=1 ./%{name} --version -PHP_CS_FIXER_IGNORE_ENV=1 ./%{name} --version | grep %{version} +%if %{with_tests} +mkdir vendor +cat << 'EOF' | tee vendor/autoload.php +/,/<\/listeners>/d' phpunit.xml.dist >phpunit.xml +sed -e '/ExpectDeprecationTrait/d' \ + -i tests/Fixer/CastNotation/LowercaseCastFixerTest.php tests/Fixer/CastNotation/ShortScalarCastFixerTest.php +# skip as rely on composer autoloader for phpunit +rm tests/Fixer/PhpUnit/PhpUnitNamespacedFixerTest.php +rm tests/AutoReview/ProjectCodeTest.php + +# Redirect to buildroot +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}" php72 php73 php74; do + if which $cmdarg; then + set $cmdarg + $1 -d memory_limit=2G ${2:-%{_bindir}/phpunit7} \ + --filter '^((?!(testFixerContainsAllPhpunitStaticMethodsInItsList|testFix74Deprecated|testFixersPriorityPairsHaveIntegrationTest)).)*$' \ + || ret=1 + fi +done +exit $ret +%else +: Test suite disabled +%endif %files %license LICENSE %doc composer.json -%doc vendor/composer/installed.json -%doc *.md -%{_datadir}/%{name} +%doc *.md *.rst +%{php_home}/PhpCsFixer %{_bindir}/%{name} %changelog -* Fri Jan 9 2026 Remi Collet - 3.92.5-1 -- update to 3.92.5 - -* Sun Jan 4 2026 Remi Collet - 3.92.4-1 -- update to 3.92.4 - -* Thu Dec 18 2025 Remi Collet - 3.92.3-1 -- update to 3.92.3 - -* Sat Dec 6 2025 Remi Collet - 3.91.3-1 -- update to 3.91.3 - -* Tue Dec 2 2025 Remi Collet - 3.91.2-1 -- update to 3.91.2 - -* Fri Nov 21 2025 Remi Collet - 3.90.0-1 -- update to 3.90.0 - -* Fri Nov 7 2025 Remi Collet - 3.89.2-1 -- update to 3.89.2 - -* Fri Oct 24 2025 Remi Collet - 3.89.1-1 -- update to 3.89.1 - -* Mon Oct 20 2025 Remi Collet - 3.89.0-1 -- update to 3.89.0 - -* Sat Sep 27 2025 Remi Collet - 3.88.2-1 -- update to 3.88.2 - -* Thu Sep 25 2025 Remi Collet - 3.88.0-1 -- update to 3.88.0 - -* Wed Sep 10 2025 Remi Collet - 3.87.2-1 -- update to 3.87.2 - -* Wed Sep 3 2025 Remi Collet - 3.87.1-1 -- update to 3.87.1 - -* Thu Aug 14 2025 Remi Collet - 3.86.0-1 -- update to 3.86.0 - -* Wed Jul 30 2025 Remi Collet - 3.85.1-1 -- update to 3.85.1 - -* Fri Jul 25 2025 Fedora Release Engineering - 3.84.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Wed Jul 16 2025 Remi Collet - 3.84.0-1 -- update to 3.84.0 - -* Wed Jul 9 2025 Remi Collet - 3.82.2-1 -- update to 3.82.2 - -* Tue Jul 8 2025 Remi Collet - 3.82.1-1 -- update to 3.82.1 - -* Tue Jul 8 2025 Remi Collet - 3.82.0-1 -- update to 3.82.0 - -* Mon Jul 7 2025 Remi Collet - 3.80.0-1 -- update to 3.80.0 - -* Tue Jul 1 2025 Remi Collet - 3.76.0-1 -- update to 3.76.0 - -* Tue Apr 1 2025 Remi Collet - 3.75.0-1 -- update to 3.75.0 -- re-license spec file to CECILL-2.1 - -* Thu Mar 20 2025 Remi Collet - 3.73.1-1 -- update to 3.73.1 - -* Thu Mar 13 2025 Remi Collet - 3.72.0-1 -- update to 3.72.0 - -* Sat Mar 8 2025 Remi Collet - 3.71.0-1 -- update to 3.71.0 - -* Sun Feb 23 2025 Remi Collet - 3.70.0-1 -- update to 3.70.0 - -* Wed Feb 19 2025 Remi Collet - 3.69.1-1 -- update to 3.69.1 - -* Mon Feb 17 2025 Remi Collet - 3.69.0-1 -- update to 3.69.0 - -* Fri Jan 31 2025 Remi Collet - 3.68.5-1 -- update to 3.68.5 - -* Thu Jan 30 2025 Remi Collet - 3.68.4-1 -- update to 3.68.4 -- always use composer-generators - -* Tue Jan 28 2025 Remi Collet - 3.68.3-1 -- update to 3.68.3 - -* Fri Jan 17 2025 Remi Collet - 3.68.1-1 -- update to 3.68.1 - -* Tue Jan 14 2025 Remi Collet - 3.68.0-1 -- update to 3.68.0 - -* Tue Jan 7 2025 Remi Collet - 3.66.2-1 -- update to 3.66.2 - -* Mon Jan 6 2025 Remi Collet - 3.66.1-1 -- update to 3.66.1 - -* Mon Dec 30 2024 Remi Collet - 3.66.0-1 -- update to 3.66.0 -- add option to use composer-generators - -* Mon Nov 25 2024 Remi Collet - 3.65.0-1 -- update to 3.65.0 - -* Sat Aug 31 2024 Remi Collet - 3.64.0-1 -- update to 3.64.0 - -* Tue Aug 27 2024 Remi Collet - 3.63.1-1 -- update to 3.63.1 - -* Thu Aug 8 2024 Remi Collet - 3.62.0-1 -- update to 3.62.0 - -* Thu Aug 1 2024 Remi Collet - 3.61.1-1 -- update to 3.61.1 - -* Thu Jul 25 2024 Remi Collet - 3.60.0-1 -- update to 3.60.0 - -* Fri Jul 19 2024 Fedora Release Engineering - 3.59.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Jul 2 2024 Remi Collet - 3.59.3-1 -- update to 3.59.3 - -* Thu May 30 2024 Remi Collet - 3.58.1-1 -- update to 3.58.1 - -* Wed May 29 2024 Remi Collet - 3.58.0-1 -- update to 3.58.0 - -* Wed May 22 2024 Remi Collet - 3.57.2-1 -- update to 3.57.2 - -* Mon May 13 2024 Remi Collet - 3.56.1-1 -- update to 3.56.1 - -* Wed Apr 17 2024 Remi Collet - 3.54.0-1 -- update to 3.54.0 - -* Tue Apr 9 2024 Remi Collet - 3.53.0-1 -- update to 3.53.0 -- bump dependency on PHP 8.1 - -* Wed Mar 20 2024 Remi Collet - 3.52.1-1 -- update to 3.52.1 - -* Tue Mar 19 2024 Remi Collet - 3.52.0-1 -- update to 3.52.0 - -* Thu Feb 29 2024 Remi Collet - 3.51.0-1 -- update to 3.51.0 - -* Mon Feb 26 2024 Remi Collet - 3.50.0-1 -- update to 3.50.0 - -* Mon Feb 5 2024 Remi Collet - 3.49.0-1 -- update to 3.49.0 - -* Mon Jan 22 2024 Remi Collet - 3.48.0-1 -- update to 3.48.0 - -* Sun Jan 21 2024 Fedora Release Engineering - 3.47.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jan 17 2024 Remi Collet - 3.47.1-1 -- update to 3.47.1 - -* Thu Jan 4 2024 Remi Collet - 3.46.0-1 -- update to 3.46.0 - -* Sat Dec 30 2023 Remi Collet - 3.45.0-1 -- update to 3.45.0 - -* Mon Dec 11 2023 Remi Collet - 3.41.1-1 -- update to 3.41.1 - -* Mon Dec 4 2023 Remi Collet - 3.40.2-1 -- update to 3.40.2 - -* Mon Nov 27 2023 Remi Collet - 3.40.0-1 -- update to 3.40.0 - -* Wed Nov 22 2023 Remi Collet - 3.39.0-1 -- update to 3.39.0 - -* Tue Nov 14 2023 Remi Collet - 3.38.2-1 -- update to 3.38.2 - -* Mon Oct 30 2023 Remi Collet - 3.37.1-1 -- update to 3.37.1 - -* Fri Oct 27 2023 Remi Collet - 3.36.0-1 -- update to 3.36.0 - -* Fri Oct 13 2023 Remi Collet - 3.35.1-1 -- update to 3.35.1 - -* Wed Oct 4 2023 Remi Collet - 3.34.1-1 -- update to 3.34.1 - -* Fri Sep 29 2023 Remi Collet - 3.31.0-1 -- update to 3.31.0 - -* Wed Sep 27 2023 Remi Collet - 3.30.0-1 -- update to 3.30.0 - -* Mon Sep 25 2023 Remi Collet - 3.28.0-1 -- update to 3.28.0 - -* Mon Sep 18 2023 Remi Collet - 3.27.0-1 -- update to 3.27.0 - -* Mon Sep 11 2023 Remi Collet - 3.26.1-1 -- update to 3.26.1 - -* Fri Sep 8 2023 Remi Collet - 3.26.0-1 -- update to 3.26.0 - -* Mon Sep 4 2023 Remi Collet - 3.25.1-1 -- update to 3.25.1 - -* Fri Sep 1 2023 Remi Collet - 3.25.0-1 -- update to 3.25.0 - -* Thu Aug 31 2023 Remi Collet - 3.24.0-1 -- update to 3.24.0 - -* Fri Aug 18 2023 Remi Collet - 3.23.0-1 -- update to 3.23.0 - -* Fri Jul 21 2023 Fedora Release Engineering - 3.22.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Mon Jul 17 2023 Remi Collet - 3.22.0-1 -- update to 3.22.0 - -* Thu Jul 6 2023 Remi Collet - 3.21.1-1 -- update to 3.21.1 -- bump dependency on PHP 8.0 - -* Wed Jun 28 2023 Remi Collet - 3.20.0-1 -- update to 3.20.0 - -* Mon Jun 26 2023 Remi Collet - 3.19.2-1 -- update to 3.19.2 - -* Tue Jun 20 2023 Remi Collet - 3.18.0-1 -- update to 3.18.0 - -* Wed May 24 2023 Remi Collet - 3.17.0-1 -- update to 3.17.0 - -* Mon Apr 3 2023 Remi Collet - 3.16.0-1 -- update to 3.16.0 - -* Tue Mar 14 2023 Remi Collet - 3.15.1-1 -- update to 3.15.1 - -* Mon Mar 13 2023 Remi Collet - 3.15.0-1 -- update to 3.15.0 - -* Fri Feb 10 2023 Remi Collet - 3.14.4-1 -- update to 3.14.4 - -* Tue Jan 31 2023 Remi Collet - 3.14.3-1 -- update to 3.14.3 - -* Fri Jan 20 2023 Fedora Release Engineering - 3.13.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Jan 3 2023 Remi Collet - 3.13.2-1 -- update to 3.13.2 - -* Mon Dec 19 2022 Remi Collet - 3.13.1-1 -- update to 3.13.1 - -* Wed Nov 2 2022 Remi Collet - 3.13.0-1 -- update to 3.13.0 - -* Wed Oct 12 2022 Remi Collet - 3.12.0-1 -- update to 3.12.0 - -* Thu Sep 8 2022 Remi Collet - 3.11.0-1 -- update to 3.11.0 - -* Thu Aug 18 2022 Remi Collet - 3.10.0-1 -- update to 3.10.0 - -* Fri Jul 22 2022 Remi Collet - 3.9.5-1 -- update to 3.9.5 - -* Mon Jul 18 2022 Remi Collet - 3.9.4-1 -- update to 3.9.4 - -* Wed Jul 13 2022 Remi Collet - 3.9.3-1 -- update to 3.9.3 - -* Tue Jul 12 2022 Remi Collet - 3.9.2-1 -- update to 3.9.2 - -* Mon Jul 11 2022 Remi Collet - 3.9.1-1 -- update to 3.9.1 - -* Mon Mar 21 2022 Remi Collet - 3.8.0-1 -- update to 3.8.0 - -* Tue Mar 8 2022 Remi Collet - 3.7.0-1 -- update to 3.7.0 #StandWithUkraine️ - -* Tue Feb 8 2022 Remi Collet - 3.6.0-1 -- update to 3.6.0 - -* Fri Jan 21 2022 Fedora Release Engineering - 3.5.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jan 14 2022 Remi Collet - 3.5.0-1 -- update to 3.5.0 -- install in /usr/share/php-cs-fixer with all bundled libraries - -* Tue Nov 16 2021 Remi Collet - 2.19.3-1 -- update to 2.19.3 - -* Thu Sep 2 2021 Remi Collet - 2.19.2-1 -- update to 2.19.2 - -* Tue Aug 3 2021 Remi Collet - 2.19.1-1 -- update to 2.19.1 - -* Fri Jul 23 2021 Fedora Release Engineering - 2.19.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue May 4 2021 Remi Collet - 2.19.0-1 -- update to 2.19.0 - -* Tue Apr 20 2021 Remi Collet - 2.18.6-1 -- update to 2.18.6 -- switch to composer/xdebug-handler version 2 - -* Wed Apr 7 2021 Remi Collet - 2.18.5-1 -- update to 2.18.5 - -* Mon Mar 22 2021 Remi Collet - 2.18.4-1 -- update to 2.18.4 - -* Thu Mar 11 2021 Remi Collet - 2.18.3-1 -- update to 2.18.3 - -* Tue Mar 2 2021 Remi Collet - 2.18.2-1 -- update to 2.18.2 -- switch to phpunit9 - with phpspec/prophecy-phpunit and sanmai/phpunit-legacy-adapter - -* Wed Jan 27 2021 Fedora Release Engineering - 2.17.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Dec 9 2020 Remi Collet - 2.17.1-1 -- update to 2.17.1 - -* Tue Dec 8 2020 Remi Collet - 2.17.0-1 -- update to 2.17.0 - -* Wed Oct 28 2020 Remi Collet - 2.16.7-1 -- update to 2.16.7 -- raise dependency on composer/semver v3 - -* Mon Oct 26 2020 Remi Collet - 2.16.4-3 -- raise dependency on PHP 7.2 -- drop dependency on symfony-polyfill - -* Tue Jul 28 2020 Fedora Release Engineering - 2.16.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - * Mon Jun 29 2020 Remi Collet - 2.16.4-1 - update to 2.16.4 @@ -497,9 +312,6 @@ PHP_CS_FIXER_IGNORE_ENV=1 ./%{name} --version | grep %{version} * Mon Apr 13 2020 Remi Collet - 2.16.2-1 - update to 2.16.2 -* Thu Jan 30 2020 Fedora Release Engineering - 2.16.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - * Tue Nov 26 2019 Remi Collet - 2.16.1-1 - update to 2.16.1 diff --git a/sources b/sources index 8bc191f..cab971a 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (php-cs-fixer-3.92.5-260cc8c.tgz) = 77e64c844b6eae37cbbd652de1afaec3a784762b52e0a8d1c1b4f9a4307e7bf7ac99a4fc8963781febdfed524fc439aa2ec6b2013802b0ca44b64ccbcc56dc4a +SHA512 (php-cs-fixer-2.16.4-1023c34.tgz) = cbd34f30435da346b7c922dfe522bd45e3b040b2181def4824f076ff64a4a05067c8f0fa6fd61d68985786075ca34785cdfc34c218f7a39930de75a5b4b13da2 +SHA512 (php-cs-fixer-diff-1.3.0-78bb099.tgz) = 6544dbf26ffdba71b270191dcf7b82239757d122a9b33fee683b80c61c0477946deb857a12ac727ff813844749de47c4507f1aabedcae65fac8fbfb9526d3838