From 4940f496a186a37b46f1f2463b41621e1eb45b50 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 9 Mar 2021 14:38:11 +0100 Subject: update to 3.1.0 rename to php-egulias-email-validator3 install in /usr/share/php/Egulias/EmailValidator3 raise dependency on PHP 7.2 raise dependency on doctrine/lexer 1.2 --- composer.json | 14 ++++---- php-egulias-email-validator3.spec | 69 +++++++++++++++++++++++---------------- 2 files changed, 48 insertions(+), 35 deletions(-) diff --git a/composer.json b/composer.json index a275696..d598d1b 100644 --- a/composer.json +++ b/composer.json @@ -9,18 +9,18 @@ ], "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0.x-dev" } }, "require": { - "php": ">=5.5", - "doctrine/lexer": "^1.0.1", - "symfony/polyfill-intl-idn": "^1.10" + "php": ">=7.2", + "doctrine/lexer": "^1.2", + "symfony/polyfill-intl-idn": "^1.15" }, "require-dev": { - "dominicsayers/isemail": "^3.0.7", - "phpunit/phpunit": "^4.8.36|^7.5.15", - "satooshi/php-coveralls": "^1.0.1" + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^8.5.8|^9.3.3", + "vimeo/psalm": "^4" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" diff --git a/php-egulias-email-validator3.spec b/php-egulias-email-validator3.spec index 850617c..e5cffa6 100644 --- a/php-egulias-email-validator3.spec +++ b/php-egulias-email-validator3.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-egulias-email-validator2 +# remirepo/fedora spec file for php-egulias-email-validator3 # # Copyright (c) 2014-2021 Shawn Iwinski, Remi Collet # @@ -10,19 +10,19 @@ %global github_owner egulias %global github_name EmailValidator -%global github_version 2.1.25 -%global github_commit 0dbf5d78455d4d6a41d186da50adc1122ec066f4 +%global github_version 3.1.0 +%global github_commit 62c3b73c581c834885acf6e120b412b76acc495a %global github_short %(c=%{github_commit}; echo ${c:0:7}) -%global major 2 +%global major 3 %global composer_vendor egulias %global composer_project email-validator -# "php": ">= 5.5" -%global php_min_ver 5.5 -# "doctrine/lexer": "^1.0.1" -%global doctrine_lexer_min_ver 1.0.1 -%global doctrine_lexer_max_ver 2.0 +# "php": ">= 7.2" +%global php_min_ver 7.2 +# "doctrine/lexer": "^1.2" +%global doctrine_lexer_min_ver 1.2 +%global doctrine_lexer_max_ver 2 # Build using "--without tests" to disable tests %bcond_without tests @@ -39,32 +39,36 @@ 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} ## composer.json (require-dev) -# "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}) -%global phpunit %{_bindir}/phpunit9 +# "php-coveralls/php-coveralls": "^2.2", +# "phpunit/phpunit": "^8.5.8|^9.3.3", +# "vimeo/psalm": "^4" +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 +%global phpunit %{_bin dir}/phpunit9 +BuildRequires: phpunit9 >= 9.3.3 %else -BuildRequires: php-doctrine-lexer >= %{doctrine_lexer_min_ver} %global phpunit %{_bindir}/phpunit8 +BuildRequires: phpunit8 >= 8.5.8 %endif -BuildRequires: %{phpunit} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -## phpcompatinfo (computed from version 2.1.2) -BuildRequires: php-dom -BuildRequires: php-filter +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(doctrine/lexer) >= %{doctrine_lexer_min_ver} with php-composer(doctrine/lexer) < %{doctrine_lexer_max_ver}) +# remirepo:4 +%else +BuildRequires: php-doctrine-lexer < %{doctrine_lexer_max_ver} +BuildRequires: php-doctrine-lexer >= %{doctrine_lexer_min_ver} +%endif +## phpcompatinfo (computed from version 3.1.0) BuildRequires: php-intl +BuildRequires: php-mbstring BuildRequires: php-pcre BuildRequires: php-spl +BuildRequires: php-xml ## Autoloader BuildRequires: php-fedora-autoloader-devel %endif @@ -74,14 +78,17 @@ Requires: php(language) >= %{php_min_ver} # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(doctrine/lexer) >= %{doctrine_lexer_min_ver} with php-composer(doctrine/lexer) < %{doctrine_lexer_max_ver}) -# remirepo:3 +# remirepo:4 %else +Requires: php-doctrine-lexer < %{doctrine_lexer_max_ver} Requires: php-doctrine-lexer >= %{doctrine_lexer_min_ver} %endif -# phpcompatinfo (computed from version 2.1.2) +# phpcompatinfo (computed from version 3.1.0) Requires: php-intl +Requires: php-mbstring Requires: php-pcre Requires: php-spl +Requires: php-xml # Autoloader Requires: php-composer(fedora/autoloader) @@ -96,7 +103,6 @@ Autoloader: %{phpdir}/Egulias/EmailValidator%{major}/autoload.php %prep %setup -qn %{github_name}-%{github_commit} -%patch0 -p1 -b .phpunit %build @@ -124,12 +130,12 @@ mkdir vendor cat << 'EOF' | tee vendor/autoload.php - 3.1.0-1 +- update to 3.1.0 +- rename to php-egulias-email-validator3 +- install in /usr/share/php/Egulias/EmailValidator3 +- raise dependency on PHP 7.2 +- raise dependency on doctrine/lexer 1.2 + * Wed Jan 6 2021 Remi Collet - 2.1.25-1 - update to 2.1.25 -- cgit