From 28ede9a2187ab4a8e3ffc7eadd3959f8c88a2369 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 17 Jun 2020 08:45:31 +0200 Subject: update to 2.1.18 open https://github.com/egulias/EmailValidator/pull/244 fix tests path switch to classmap autoloader --- composer.json | 8 +++--- php-egulias-email-validator2.spec | 59 ++++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/composer.json b/composer.json index 595caff..a275696 100644 --- a/composer.json +++ b/composer.json @@ -18,21 +18,21 @@ "symfony/polyfill-intl-idn": "^1.10" }, "require-dev": { - "satooshi/php-coveralls": "^1.0.1", + "dominicsayers/isemail": "^3.0.7", "phpunit/phpunit": "^4.8.36|^7.5.15", - "dominicsayers/isemail": "^3.0.7" + "satooshi/php-coveralls": "^1.0.1" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" }, "autoload": { "psr-4": { - "Egulias\\EmailValidator\\": "EmailValidator" + "Egulias\\EmailValidator\\": "src" } }, "autoload-dev": { "psr-4": { - "Egulias\\Tests\\": "Tests" + "Egulias\\EmailValidator\\Tests\\": "tests" } } } diff --git a/php-egulias-email-validator2.spec b/php-egulias-email-validator2.spec index 61dcb10..a679a10 100644 --- a/php-egulias-email-validator2.spec +++ b/php-egulias-email-validator2.spec @@ -10,8 +10,8 @@ %global github_owner egulias %global github_name EmailValidator -%global github_version 2.1.17 -%global github_commit ade6887fd9bd74177769645ab5c474824f8a418a +%global github_version 2.1.18 +%global github_commit cfa3d44471c7f5bfb684ac2b0da7114283d78441 %global github_short %(c=%{github_commit}; echo ${c:0:7}) %global major 2 @@ -25,7 +25,7 @@ %global doctrine_lexer_max_ver 2.0 # Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} +%bcond_without tests %{!?phpdir: %global phpdir %{_datadir}/php} @@ -41,22 +41,20 @@ Source1: makesrc.sh BuildArch: noarch # Tests -%if %{with_tests} +%if %{with tests} ## composer.json (require-dev) -# "satooshi/php-coveralls": "^1.0.1", +# "dominicsayers/isemail": "^3.0.7", # "phpunit/phpunit": "^4.8.36|^7.5.15", -# "dominicsayers/isemail": "^3.0.7" +# "satooshi/php-coveralls": "^1.0.1" # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: phpunit7 >= 7.5.15 -%global phpunit %{_bindir}/phpunit6 BuildRequires: (php-composer(doctrine/lexer) >= %{doctrine_lexer_min_ver} with php-composer(doctrine/lexer) < %{doctrine_lexer_max_ver}) -# remirepo:5 +# remirepo:3 %else -BuildRequires: php-phpunit-PHPUnit >= 4.8.36 -%global phpunit %{_bindir}/phpunit BuildRequires: php-doctrine-lexer >= %{doctrine_lexer_min_ver} %endif +BuildRequires: phpunit7 >= 7.5.15 +%global phpunit %{_bindir}/phpunit6 ## composer.json BuildRequires: php(language) >= %{php_min_ver} ## phpcompatinfo (computed from version 2.1.2) @@ -66,7 +64,7 @@ BuildRequires: php-intl BuildRequires: php-pcre BuildRequires: php-spl ## Autoloader -BuildRequires: php-composer(fedora/autoloader) +BuildRequires: php-fedora-autoloader-devel %endif # composer.json @@ -99,16 +97,12 @@ Autoloader: %{phpdir}/Egulias/EmailValidator%{major}/autoload.php %build - : Create autoloader -cat <<'AUTOLOAD' | tee EmailValidator/autoload.php -phpunit.xml + : Skip online tests -rm Tests/EmailValidator/Validation/DNSCheckValidationTest.php -rm Tests/EmailValidator/Validation/SpoofCheckValidationTest.php +rm tests/EmailValidator/Validation/DNSCheckValidationTest.php +rm tests/EmailValidator/Validation/SpoofCheckValidationTest.php : Upstream tests ret=0 -for cmdarg in "php %{phpunit}" php71 php72 php73 php74; do +for cmdarg in "php %{phpunit}" php72 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 @@ -160,6 +157,12 @@ exit $ret %changelog +* Wed Jun 17 2020 Remi Collet - 2.1.18-1 +- update to 2.1.18 +- open https://github.com/egulias/EmailValidator/pull/244 + fix tests path +- switch to classmap autoloader + * Fri Feb 14 2020 Remi Collet - 2.1.17-1 - update to 2.1.17 -- cgit