Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Remi Collet
b8258c39d3 v2.1.25
(cherry picked from commit bba53e274e)
2021-01-06 14:05:17 +01:00
Remi Collet
2b57ad0a18 v2.1.24
(cherry picked from commit 33f4d353cc)
2020-11-16 09:43:34 +01:00
Remi Collet
4c755b1b62 v2.1.23
(cherry picked from commit 32ecb4ff36)
2020-11-02 09:22:23 +01:00
Remi Collet
f714113416 v2.1.22
(cherry picked from commit 9d05df2f1c)
2020-09-28 08:48:00 +02:00
Remi Collet
9fd755bd03 v2.1.21
(cherry picked from commit f86a9a97b3)
2020-09-21 12:08:23 +02:00
Remi Collet
1ea56b3a86 v2.1.20
(cherry picked from commit 10c75fb1bc)
2020-09-07 08:29:49 +02:00
Remi Collet
2c82a46eb8 update to 2.1.19
switch to phpunit9

(cherry picked from commit 079cf7d3ca)
2020-08-11 11:51:19 +02:00
4 changed files with 82 additions and 11 deletions

7
.gitignore vendored
View file

@ -15,3 +15,10 @@ clog
/php-egulias-email-validator2-2.1.16-5065faf.tgz
/php-egulias-email-validator2-2.1.17-ade6887.tgz
/php-egulias-email-validator2-2.1.18-cfa3d44.tgz
/php-egulias-email-validator2-2.1.19-840d560.tgz
/php-egulias-email-validator2-2.1.20-f46887b.tgz
/php-egulias-email-validator2-2.1.21-563d0cd.tgz
/php-egulias-email-validator2-2.1.22-68e418e.tgz
/php-egulias-email-validator2-2.1.23-5fa792a.tgz
/php-egulias-email-validator2-2.1.24-ca90a32.tgz
/php-egulias-email-validator2-2.1.25-0dbf5d7.tgz

View file

@ -0,0 +1,36 @@
diff -up ./tests/EmailValidator/Validation/MultipleValidationWithAndTest.php.old ./tests/EmailValidator/Validation/MultipleValidationWithAndTest.php
--- ./tests/EmailValidator/Validation/MultipleValidationWithAndTest.php.old 2020-08-11 11:42:35.142594018 +0200
+++ ./tests/EmailValidator/Validation/MultipleValidationWithAndTest.php 2020-08-11 11:43:45.452483997 +0200
@@ -28,11 +28,9 @@ class MultipleValidationWithAndTest exte
$this->assertFalse($multipleValidation->isValid("exmpale@example.com", $lexer));
}
- /**
- * @expectedException \Egulias\EmailValidator\Validation\Exception\EmptyValidationList
- */
public function testEmptyListIsNotAllowed()
- {
+ {
+ $this->expectException(\Egulias\EmailValidator\Validation\Exception\EmptyValidationList::class);
new MultipleValidationWithAnd([]);
}
diff -up ./tests/EmailValidator/Validation/RFCValidationTest.php.old ./tests/EmailValidator/Validation/RFCValidationTest.php
--- ./tests/EmailValidator/Validation/RFCValidationTest.php.old 2020-08-11 11:41:25.030703727 +0200
+++ ./tests/EmailValidator/Validation/RFCValidationTest.php 2020-08-11 11:41:32.397692197 +0200
@@ -49,13 +49,13 @@ class RFCValidationTest extends TestCase
*/
protected $lexer;
- protected function setUp()
+ protected function setUp(): void
{
$this->validator = new RFCValidation();
$this->lexer = new EmailLexer();
}
- protected function tearDown()
+ protected function tearDown(): void
{
$this->validator = null;
}

View file

@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-egulias-email-validator2
#
# Copyright (c) 2014-2020 Shawn Iwinski, Remi Collet
# Copyright (c) 2014-2021 Shawn Iwinski, Remi Collet
#
# License: MIT
# http://opensource.org/licenses/MIT
@ -10,8 +10,8 @@
%global github_owner egulias
%global github_name EmailValidator
%global github_version 2.1.18
%global github_commit cfa3d44471c7f5bfb684ac2b0da7114283d78441
%global github_version 2.1.25
%global github_commit 0dbf5d78455d4d6a41d186da50adc1122ec066f4
%global github_short %(c=%{github_commit}; echo ${c:0:7})
%global major 2
@ -39,6 +39,9 @@ URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{name}-%{github_version}-%{github_short}.tgz
Source1: makesrc.sh
# adapt for recent PHPUnit
Patch0: %{name}-phpunit.patch
BuildArch: noarch
# Tests
%if %{with tests}
@ -46,9 +49,14 @@ BuildArch: noarch
# "dominicsayers/isemail": "^3.0.7",
# "phpunit/phpunit": "^4.8.36|^7.5.15",
# "satooshi/php-coveralls": "^1.0.1"
%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
BuildRequires: (php-composer(doctrine/lexer) >= %{doctrine_lexer_min_ver} with php-composer(doctrine/lexer) < %{doctrine_lexer_max_ver})
BuildRequires: phpunit7 >= 7.5.15
%global phpunit %{_bindir}/phpunit6
%global phpunit %{_bindir}/phpunit9
%else
BuildRequires: php-doctrine-lexer >= %{doctrine_lexer_min_ver}
%global phpunit %{_bindir}/phpunit8
%endif
BuildRequires: %{phpunit}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
## phpcompatinfo (computed from version 2.1.2)
@ -82,6 +90,7 @@ Autoloader: %{phpdir}/Egulias/EmailValidator%{major}/autoload.php
%prep
%setup -qn %{github_name}-%{github_commit}
%patch0 -p1 -b .phpunit
%build
@ -112,19 +121,16 @@ require_once "%{buildroot}%{phpdir}/Egulias/EmailValidator%{major}/autoload.php"
\Fedora\Autoloader\Autoload::addPsr4('Egulias\\Tests\\', dirname(__DIR__) . "/tests");
EOF
# See https://github.com/egulias/EmailValidator/pull/244
sed -e 's/Tests/tests/' phpunit.xml.dist >phpunit.xml
: Skip online tests
rm tests/EmailValidator/Validation/DNSCheckValidationTest.php
rm tests/EmailValidator/Validation/SpoofCheckValidationTest.php
: Upstream tests
ret=0
for cmdarg in "php %{phpunit}" php72 php73 php74 php80; do
for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
$1 ${2:-%{_bindir}/phpunit7} \
$1 ${2:-%{_bindir}/phpunit9} \
--verbose || ret=1
fi
done
@ -143,6 +149,28 @@ exit $ret
%changelog
* Wed Jan 6 2021 Remi Collet <remi@remirepo.net> - 2.1.25-1
- update to 2.1.25
* Mon Nov 16 2020 Remi Collet <remi@remirepo.net> - 2.1.24-1
- update to 2.1.24
* Mon Nov 2 2020 Remi Collet <remi@remirepo.net> - 2.1.23-1
- update to 2.1.23
* Mon Sep 28 2020 Remi Collet <remi@remirepo.net> - 2.1.22-1
- update to 2.1.22
* Mon Sep 21 2020 Remi Collet <remi@remirepo.net> - 2.1.21-1
- update to 2.1.21
* Mon Sep 7 2020 Remi Collet <remi@remirepo.net> - 2.1.20-1
- update to 2.1.20
* Tue Aug 11 2020 Remi Collet <remi@remirepo.net> - 2.1.19-1
- update to 2.1.19
- switch to phpunit9
* Wed Jun 17 2020 Remi Collet <remi@remirepo.net> - 2.1.18-1
- update to 2.1.18
- open https://github.com/egulias/EmailValidator/pull/244

View file

@ -1 +1 @@
SHA512 (php-egulias-email-validator2-2.1.18-cfa3d44.tgz) = 83289b6696f7347472142bbbc838e7fdd3f2b5e185ef79fc1b09b5fae16b537ae39191e50079f3370312de24884c3e3a02934daf54066e0531e8de9a3be24158
SHA512 (php-egulias-email-validator2-2.1.25-0dbf5d7.tgz) = c3600fd38fa5e85ef960242ad867618e09d6bc2ca6887e8a4a0a498a1a405d23a6d9f01635a5c3f64c203e7c0d1561040b67c56c99fe566bfa879b8e35128938