update to 1.5.6
switch to phpunit7 and fix FTBFS with PHP 8
This commit is contained in:
parent
1295b2d283
commit
ba1d3000e3
4 changed files with 42 additions and 12 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@ clog
|
|||
/php-simplepie-1.5.2-0e8fe72.tgz
|
||||
/php-simplepie-1.5.3-1736633.tgz
|
||||
/php-simplepie-1.5.4-20b30e4.tgz
|
||||
/php-simplepie-1.5.6-1c68e14.tgz
|
||||
|
|
|
|||
23
php-simplepie-tests.patch
Normal file
23
php-simplepie-tests.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
diff -up ./tests/CacheTest.php.php8 ./tests/CacheTest.php
|
||||
--- ./tests/CacheTest.php.php8 2021-03-23 16:04:28.360182642 +0100
|
||||
+++ ./tests/CacheTest.php 2021-03-23 16:04:50.771096776 +0100
|
||||
@@ -76,6 +76,7 @@ class CacheTest extends PHPUnit\Framewor
|
||||
{
|
||||
/**
|
||||
* @expectedException Exception_Success
|
||||
+ * @requires PHP < 8
|
||||
*/
|
||||
public function testDirectOverrideLegacy()
|
||||
{
|
||||
diff -up ./tests/EncodingTest.php.php8 ./tests/EncodingTest.php
|
||||
--- ./tests/EncodingTest.php.php8 2021-03-23 16:06:41.482672604 +0100
|
||||
+++ ./tests/EncodingTest.php 2021-03-23 16:06:46.003655284 +0100
|
||||
@@ -182,7 +182,7 @@ class EncodingTest extends PHPUnit\Frame
|
||||
$this->assertFalse(SimplePie_Misc::change_encoding('', 'TESTENC', 'UTF-8'));
|
||||
}
|
||||
|
||||
- public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
|
||||
+ public static function assertEquals($expected, $actual, string $message = '', float $delta = 0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void
|
||||
{
|
||||
if (is_string($expected))
|
||||
{
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
#
|
||||
# Please preserve changelog entries
|
||||
#
|
||||
%global gh_commit 20b30e4bbbed7fd2a6ffbab48e3a2e0f96087b6a
|
||||
%global gh_commit 1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||
%global gh_owner simplepie
|
||||
%global gh_project simplepie
|
||||
%global gh_version 1.5.4
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
%global gh_version 1.5.6
|
||||
%bcond_without tests
|
||||
|
||||
Name: php-%{gh_project}
|
||||
Version: %{gh_version}
|
||||
Release: 4%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Summary: A simple Atom/RSS parsing library for PHP
|
||||
|
||||
Group: Development/Libraries
|
||||
|
|
@ -29,13 +29,15 @@ Source1: %{name}-makesrc.sh
|
|||
|
||||
# Adapt autoloader for installation tree
|
||||
Patch0: %{name}-rpm.patch
|
||||
# Adpat to phpunit7 and php 8
|
||||
Patch1: %{name}-tests.patch
|
||||
|
||||
BuildArch: noarch
|
||||
%if %{with_tests}
|
||||
%if %{with tests}
|
||||
# From composer.json, "require-dev"
|
||||
# "phpunit/phpunit": "~5.4.3 || ~6.5"
|
||||
BuildRequires: phpunit6 >= 6.5
|
||||
%global phpunit %{_bindir}/phpunit6
|
||||
BuildRequires: phpunit7
|
||||
%global phpunit %{_bindir}/phpunit7
|
||||
%endif
|
||||
|
||||
# from composer.json, "require"
|
||||
|
|
@ -81,6 +83,7 @@ Autoloader: %{_datadir}/php/%{name}/autoloader.php
|
|||
%setup -qn %{gh_project}-%{gh_commit}
|
||||
|
||||
%patch0 -p1 -b .rpm
|
||||
%patch1 -p1 -b .php8
|
||||
|
||||
# fix rpmlint warnings
|
||||
find . -type f -exec chmod -x {} \;
|
||||
|
|
@ -100,16 +103,16 @@ install -pm 644 autoloader.php \
|
|||
%{buildroot}/%{_datadir}/php/%{name}/autoloader.php
|
||||
|
||||
|
||||
%if %{with_tests}
|
||||
%if %{with tests}
|
||||
%check
|
||||
sed -e 's:@PATH@:%{buildroot}/%{_datadir}/php/%{name}:' \
|
||||
-i tests/bootstrap.php
|
||||
|
||||
ret=0
|
||||
for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72 php73 php74; do
|
||||
for cmdarg in "php %{phpunit}" php73 php74 php80; do
|
||||
if which $cmdarg; then
|
||||
set $cmdarg
|
||||
$1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1
|
||||
$1 ${2:-%{_bindir}/phpunit7} --verbose || ret=1
|
||||
fi
|
||||
done
|
||||
exit $ret
|
||||
|
|
@ -117,7 +120,6 @@ exit $ret
|
|||
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license LICENSE.txt
|
||||
%doc composer.json
|
||||
%doc README.markdown
|
||||
|
|
@ -126,6 +128,10 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Mar 23 2021 Remi Collet <remi@remirepo.net> - 1.5.6-1
|
||||
- update to 1.5.6
|
||||
- switch to phpunit7 and fix FTBFS with PHP 8
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (php-simplepie-1.5.4-20b30e4.tgz) = 3f8b2693d8440a0deac6356295fddba50ac961aa64d99a37f743243335e8e8812f2e1035f6ae173b73654d94175f23ac7310f4290450ed01a4012b0bc6ad1fa3
|
||||
SHA512 (php-simplepie-1.5.6-1c68e14.tgz) = dbbba67694e7e8bc31d6a93b9e22739e84228c559aff4ed28760b889bb4ce7d487311fc96fb2b0554410dc18df8d12827171b1ca8e2f7ff43d1ebb925d94d84f
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue