summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-01-26 18:02:43 +0100
committerRemi Collet <remi@remirepo.net>2021-01-26 18:02:43 +0100
commit74c0cdd49966c8f333dce9cf62db0fef60f23ca4 (patch)
tree1230aaec25a8d16f1f10aa5a67b037405f7f8eb5
parent555f5288c5bf58492e4b0d244852ae1fa096cc67 (diff)
update to 2.13.0
raise dependency on PHP 7.3 add patch for PHP 8 from https://github.com/laminas/laminas-mail/pull/134 switch to phpunit9
-rw-r--r--.gitignore2
-rw-r--r--134.patch51
-rw-r--r--composer.json6
-rw-r--r--php-laminas-mail.spec40
4 files changed, 80 insertions, 19 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/134.patch b/134.patch
new file mode 100644
index 0000000..db8475d
--- /dev/null
+++ b/134.patch
@@ -0,0 +1,51 @@
+From b5e38613811824a6d1b3d1993f37de422087ac6f Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 26 Jan 2021 17:42:09 +0100
+Subject: [PATCH 1/2] fix TypeError: fclose(): supplied resource is not a valid
+ stream resource
+
+---
+ src/Storage/Mbox.php | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/Storage/Mbox.php b/src/Storage/Mbox.php
+index 3e48a6c6..52f6bcfe 100644
+--- a/src/Storage/Mbox.php
++++ b/src/Storage/Mbox.php
+@@ -308,7 +308,9 @@ protected function openMboxFile($filename)
+ public function close()
+ {
+ ErrorHandler::start(E_WARNING);
+- fclose($this->fh);
++ if (is_resource($this->fh)) {
++ fclose($this->fh);
++ }
+ ErrorHandler::stop();
+ $this->positions = [];
+ }
+
+From fd62569b1065b85eadad627e0556376e1696da97 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 26 Jan 2021 17:54:35 +0100
+Subject: [PATCH 2/2] clean uneeded stuff
+
+---
+ src/Storage/Mbox.php | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/Storage/Mbox.php b/src/Storage/Mbox.php
+index 52f6bcfe..c8f16d6e 100644
+--- a/src/Storage/Mbox.php
++++ b/src/Storage/Mbox.php
+@@ -307,11 +307,9 @@ protected function openMboxFile($filename)
+ */
+ public function close()
+ {
+- ErrorHandler::start(E_WARNING);
+ if (is_resource($this->fh)) {
+ fclose($this->fh);
+ }
+- ErrorHandler::stop();
+ $this->positions = [];
+ }
+
diff --git a/composer.json b/composer.json
index d43eba1..aa5ded6 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
}
},
"require": {
- "php": "^7.1",
+ "php": "^7.3 || ~8.0.0",
"ext-iconv": "*",
"laminas/laminas-loader": "^2.5",
"laminas/laminas-mime": "^2.5",
@@ -36,10 +36,10 @@
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
- "laminas/laminas-config": "^2.6",
+ "laminas/laminas-config": "^3.4",
"laminas/laminas-crypt": "^2.6 || ^3.0",
"laminas/laminas-servicemanager": "^3.2.1",
- "phpunit/phpunit": "^7.5.20"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"laminas/laminas-crypt": "Crammd5 support in SMTP Auth",
diff --git a/php-laminas-mail.spec b/php-laminas-mail.spec
index 193a6e1..e25228a 100644
--- a/php-laminas-mail.spec
+++ b/php-laminas-mail.spec
@@ -8,7 +8,7 @@
#
%bcond_without tests
-%global gh_commit ed5b36a0deef4ffafe6138c2ae9cafcffafab856
+%global gh_commit a259ddb091618bdcbfb1540e0fe4671a823c342b
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner laminas
%global gh_project laminas-mail
@@ -18,7 +18,7 @@
%global library Mail
Name: php-%{gh_project}
-Version: 2.12.5
+Version: 2.13.0
Release: 1%{?dist}
Summary: %{namespace} Framework %{library} component
@@ -27,10 +27,12 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
+Patch0: https://patch-diff.githubusercontent.com/raw/laminas/laminas-mail/pull/134.patch
+
BuildArch: noarch
# Tests
%if %{with tests}
-BuildRequires: php(language) >= 7.1
+BuildRequires: php(language) >= 7.3
BuildRequires: php-ctype
BuildRequires: php-date
BuildRequires: php-iconv
@@ -46,11 +48,11 @@ BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0
BuildRequires: (php-composer(true/punycode) >= 2.1 with php-composer(true/punycode) < 3)
# From composer, "require-dev": {
# "laminas/laminas-coding-standard": "~1.0.0",
-# "laminas/laminas-config": "^2.6",
+# "laminas/laminas-config": "^3.4",
# "laminas/laminas-crypt": "^2.6 || ^3.0",
# "laminas/laminas-servicemanager": "^3.2.1",
-# "phpunit/phpunit": "^7.5.20"
-BuildRequires: (php-autoloader(%{gh_owner}/laminas-config) >= 2.6 with php-autoloader(%{gh_owner}/laminas-config) < 3)
+# "phpunit/phpunit": "^9.3"
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-config) >= 3.4 with php-autoloader(%{gh_owner}/laminas-config) < 4)
BuildRequires: (php-autoloader(%{gh_owner}/laminas-crypt) >= 3.0 with php-autoloader(%{gh_owner}/laminas-crypt) < 4)
BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
# remirepo:11
@@ -61,18 +63,18 @@ BuildRequires: php-laminas-stdlib
BuildRequires: php-laminas-validator
BuildRequires: php-laminas-zendframework-bridge
BuildRequires: php-true-punycode
-BuildRequires: php-laminas-config
+BuildRequires: php-laminas-config3
BuildRequires: php-laminas-crypt
BuildRequires: php-laminas-servicemanager
%endif
-BuildRequires: phpunit7 >= 7.5.20
-%global phpunit %{_bindir}/phpunit7
+BuildRequires: phpunit9 >= 9.3
+%global phpunit %{_bindir}/phpunit9
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
-# "php": "^7.1",
+# "php": "^7.3 || ~8.0.0",
# "ext-iconv": "*",
# "laminas/laminas-loader": "^2.5",
# "laminas/laminas-mime": "^2.5",
@@ -80,7 +82,7 @@ BuildRequires: php-fedora-autoloader-devel
# "laminas/laminas-validator": "^2.10.2",
# "laminas/laminas-zendframework-bridge": "^1.0",
# "true/punycode": "^2.1"
-Requires: php(language) >= 7.1
+Requires: php(language) >= 7.3
Requires: php-iconv
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
@@ -138,6 +140,7 @@ Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
mv LICENSE.md LICENSE
@@ -186,7 +189,7 @@ cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php';
\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/%{namespace}/Config/autoload.php',
+ '%{php_home}/%{namespace}/Config3/autoload.php',
]);
\Fedora\Autoloader\Autoload::addPsr4('%{namespace}Test\\%{library}\\', dirname(__DIR__) . '/test');
EOF
@@ -199,12 +202,10 @@ exit (class_exists("\\Zend\\%{library}\\Message") ? 0 : 1);
: upstream test suite
ret=0
-# TODO PHP 8
-for cmdarg in "php %{phpunit}" php72 php73 php74; do
+for cmdarg in "php %{phpunit}" php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
- $1 ${2:-%{_bindir}/phpunit7} \
- --verbose || ret=1
+ $1 ${2:-%{_bindir}/phpunit9} || ret=1
fi
done
exit $ret
@@ -224,6 +225,13 @@ exit $ret
%changelog
+* Tue Jan 26 2021 Remi Collet <remi@remirepo.net> - 2.13.0-1
+- update to 2.13.0
+- raise dependency on PHP 7.3
+- add patch for PHP 8 from
+ https://github.com/laminas/laminas-mail/pull/134
+- switch to phpunit9
+
* Wed Jan 6 2021 Remi Collet <remi@remirepo.net> - 2.12.5-1
- update to 2.12.5