diff options
author | Remi Collet <remi@remirepo.net> | 2024-02-17 08:05:16 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-02-17 08:05:16 +0100 |
commit | 91e5cbb7d31858b1255f1bacb75dd90265185945 (patch) | |
tree | 8b0e67bda07441f184f30e25fabb8005802a59a9 | |
parent | 7b7b4b8dd829b1ae6a72ee3df130115273353c0e (diff) |
update to 3.9.0
drop patch merged upstream
-rw-r--r-- | 0001-skip-tests-requiring-git-repository.patch | 41 | ||||
-rwxr-xr-x | makesrc.sh | 2 | ||||
-rw-r--r-- | php-pear-PHP-CodeSniffer.spec | 16 |
3 files changed, 11 insertions, 48 deletions
diff --git a/0001-skip-tests-requiring-git-repository.patch b/0001-skip-tests-requiring-git-repository.patch deleted file mode 100644 index d79dbd5..0000000 --- a/0001-skip-tests-requiring-git-repository.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 472b4f7c56dd95ca4469ed5aad6d6620aa13e03e Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Fri, 12 Jan 2024 08:25:58 +0100 -Subject: [PATCH] skip tests requiring git repository - ---- - tests/Core/Filters/GitModifiedTest.php | 3 +++ - tests/Core/Filters/GitStagedTest.php | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/tests/Core/Filters/GitModifiedTest.php b/tests/Core/Filters/GitModifiedTest.php -index 626fb6531..ca068e144 100644 ---- a/tests/Core/Filters/GitModifiedTest.php -+++ b/tests/Core/Filters/GitModifiedTest.php -@@ -211,6 +211,9 @@ final class GitModifiedTest extends AbstractFilterTestCase - */ - public function testExecAlwaysReturnsArray($cmd, $expected) - { -+ if (!is_dir(__DIR__ . '/../../../.git')) { -+ $this->markTestSkipped('Not a git repository'); -+ } - $fakeDI = new RecursiveArrayIterator(self::getFakeFileList()); - $filter = new GitModified($fakeDI, '/', self::$config, self::$ruleset); - -diff --git a/tests/Core/Filters/GitStagedTest.php b/tests/Core/Filters/GitStagedTest.php -index 0009aefa7..cf5f69765 100644 ---- a/tests/Core/Filters/GitStagedTest.php -+++ b/tests/Core/Filters/GitStagedTest.php -@@ -211,6 +211,9 @@ final class GitStagedTest extends AbstractFilterTestCase - */ - public function testExecAlwaysReturnsArray($cmd, $expected) - { -+ if (!is_dir(__DIR__ . '/../../../.git')) { -+ $this->markTestSkipped('Not a git repository'); -+ } - $fakeDI = new RecursiveArrayIterator(self::getFakeFileList()); - $filter = new GitStaged($fakeDI, '/', self::$config, self::$ruleset); - --- -2.43.0 - @@ -8,6 +8,8 @@ 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 -5 days" +%Y-%m-%d) + if [ -f $NAME-$VERSION-$SHORT.tgz ]; then echo Skip $NAME-$VERSION-$SHORT.tgz else diff --git a/php-pear-PHP-CodeSniffer.spec b/php-pear-PHP-CodeSniffer.spec index 1713f52..c9634ba 100644 --- a/php-pear-PHP-CodeSniffer.spec +++ b/php-pear-PHP-CodeSniffer.spec @@ -16,9 +16,9 @@ %bcond_without tests -%global gh_commit 14f5fff1e64118595db5408e946f3a22c75807f7 +%global gh_commit d63cee4890a8afaf86a22e51ad4d97c91dd4579b %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_date 2024-01-10 +%global gh_date 2024-02-17 %global gh_owner PHPCSStandards %global gh_project PHP_CodeSniffer # keep in old PEAR tree @@ -26,7 +26,7 @@ Name: php-pear-PHP-CodeSniffer -Version: 3.8.1 +Version: 3.9.0 Release: 1%{?dist} Summary: PHP coding standards enforcement tool @@ -38,7 +38,6 @@ Source1: makesrc.sh # RPM installation path Patch0: %{name}-rpm.patch -Patch1: 0001-skip-tests-requiring-git-repository.patch BuildArch: noarch BuildRequires: php(language) >= 5.4 @@ -83,7 +82,6 @@ certain standards, such as PEAR, or user-defined. %prep %setup -q -n %{gh_project}-%{gh_commit} %patch -P0 -p1 -b .rpm -%patch -P1 -p1 -b .nogit %build @@ -116,12 +114,12 @@ YEAR=$(date +%Y) sed -e "/@copyright/s/2021/${YEAR}/" \ -i src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.*.fixed -# Version 3.6.2: Tests: 1327, Assertions: 8476, Skipped: 8. +# Version 3.9.0: Tests: 2276, Assertions: 10969, Warnings: 4, Skipped: 12. ret=0 for cmdarg in "php %{phpunit}" php81 php82 php83; do if which $cmdarg; then set $cmdarg - $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit9} \ + $1 -d memory_limit=-1 ${2:-%{_bindir}/phpunit9} \ || ret=1 fi done @@ -146,6 +144,10 @@ fi %changelog +* Sat Feb 17 2024 Remi Collet <remi@remirepo.net> - 3.9.0-1 +- update to 3.9.0 +- drop patch merged upstream + * Fri Jan 12 2024 Remi Collet <remi@remirepo.net> - 3.8.1-1 - update to 3.8.1 - add patch for test suite from |