From 8a91b636977f7b79a4586c0ccbe3a6b599d95ead Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 31 Jan 2020 11:09:21 +0100 Subject: update to 3.5.4 fix test suite from https://github.com/squizlabs/PHP_CodeSniffer/pull/2846 https://github.com/squizlabs/PHP_CodeSniffer/pull/2847 --- php-pear-PHP-CodeSniffer.spec | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/php-pear-PHP-CodeSniffer.spec b/php-pear-PHP-CodeSniffer.spec index f3beb9d..f17d00a 100644 --- a/php-pear-PHP-CodeSniffer.spec +++ b/php-pear-PHP-CodeSniffer.spec @@ -1,6 +1,6 @@ # spec file for php-pear-PHP-CodeSniffer # -# Copyright (c) 2013-2019 Remi Collet +# Copyright (c) 2013-2020 Remi Collet # Copyright (c) 2009-2013 Christof Damian # Copyright (c) 2006-2009 Konstantin Ryabitsev # @@ -13,7 +13,7 @@ %global pear_name PHP_CodeSniffer Name: php-pear-PHP-CodeSniffer -Version: 3.5.3 +Version: 3.5.4 Release: 1%{?dist} Summary: PHP coding standards enforcement tool @@ -92,6 +92,14 @@ install -pm 644 %{pear_name}.xml %{buildroot}%{pear_xmldir} %check cd %{pear_name}-%{version} +# fix relative path +# https://github.com/squizlabs/PHP_CodeSniffer/pull/2846 +sed -e 's:../PHP_CodeSniffer::' -i tests/Core/Ruleset/RuleInclusionTest.xml& + +# fix broken pear detection (may use export PHP_CODESNIFFER_PEAR=1 if PR accepted) +# https://github.com/squizlabs/PHP_CodeSniffer/pull/2847 +sed -e '/PHP_CODESNIFFER_PEAR/s/false/true/' -i tests/AllTests.php + # fails with js: Couldn't read source file rm src/Standards/Generic/Tests/Debug/JSHintUnitTest.* @@ -100,7 +108,8 @@ ret=0 for cmdarg in "php %{phpunit}" php71 php72 php73 php74; do if which $cmdarg; then set $cmdarg - $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit7} --verbose || ret=1 + $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit7} \ + --verbose || ret=1 fi done exit $ret @@ -128,6 +137,12 @@ fi %changelog +* Fri Jan 31 2020 Remi Collet - 3.5.4-1 +- update to 3.5.4 +- fix test suite from + https://github.com/squizlabs/PHP_CodeSniffer/pull/2846 + https://github.com/squizlabs/PHP_CodeSniffer/pull/2847 + * Wed Dec 4 2019 Remi Collet - 3.5.3-1 - update to 3.5.3 -- cgit