diff options
author | Remi Collet <remi@remirepo.net> | 2020-08-08 07:47:26 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-08-08 07:47:26 +0200 |
commit | aac287cda6e99154375a757eb9629e3eda490e62 (patch) | |
tree | efc2f79bbd3057949e6903ae28392e249f48a9dd | |
parent | 2267d05734f4ae794170fb9ee2aa80fb7773a112 (diff) |
update to 1.7.0
now available on pecl
raise dependency on PHP 7.2
switch to phpunit8
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 103 | ||||
-rw-r--r-- | composer.json | 8 | ||||
-rw-r--r-- | php-maxminddb.spec | 75 |
4 files changed, 155 insertions, 33 deletions
@@ -2,5 +2,5 @@ maxminddb MaxMind DB Reader => enabled -maxminddb extension version => 1.6.0 +maxminddb extension version => 1.7.0 libmaxminddb library version => 1.2.0 @@ -1,6 +1,63 @@ -Extension [ <persistent> extension #107 maxminddb version 1.6.0 ] { +Extension [ <persistent> extension #116 maxminddb version 1.7.0 ] { + + - Classes [3] { + Class [ <internal:maxminddb> class MaxMind\Db\Reader\InvalidDatabaseException extends Exception implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ <default> protected $message ] + Property [ <default> protected $code ] + Property [ <default> protected $file ] + Property [ <default> protected $line ] + } + + - Methods [10] { + Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { + + - Parameters [3] { + Parameter #0 [ <optional> $message ] + Parameter #1 [ <optional> $code ] + Parameter #2 [ <optional> $previous ] + } + } + + Method [ <internal:Core, inherits Exception> public method __wakeup ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + } + } + } - - Classes [1] { Class [ <internal:maxminddb> class MaxMind\Db\Reader ] { - Constants [1] { @@ -20,7 +77,7 @@ Extension [ <persistent> extension #107 maxminddb version 1.6.0 ] { Method [ <internal:maxminddb, ctor> public method __construct ] { - Parameters [1] { - Parameter #0 [ <required> $db_file ] + Parameter #0 [ <required> string $db_file ] } } @@ -33,15 +90,16 @@ Extension [ <persistent> extension #107 maxminddb version 1.6.0 ] { Method [ <internal:maxminddb> public method get ] { - Parameters [1] { - Parameter #0 [ <required> $ip_address ] + Parameter #0 [ <required> string $ip_address ] } } Method [ <internal:maxminddb> public method getWithPrefixLen ] { - Parameters [1] { - Parameter #0 [ <required> $ip_address ] + Parameter #0 [ <required> string $ip_address ] } + - Return [ array or NULL ] } Method [ <internal:maxminddb> public method metadata ] { @@ -51,6 +109,41 @@ Extension [ <persistent> extension #107 maxminddb version 1.6.0 ] { } } } + + Class [ <internal:maxminddb> class MaxMind\Db\Reader\Metadata ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [11] { + Property [ <default> public $binaryFormatMajorVersion ] + Property [ <default> public $binaryFormatMinorVersion ] + Property [ <default> public $buildEpoch ] + Property [ <default> public $databaseType ] + Property [ <default> public $description ] + Property [ <default> public $ipVersion ] + Property [ <default> public $languages ] + Property [ <default> public $nodeByteSize ] + Property [ <default> public $nodeCount ] + Property [ <default> public $recordSize ] + Property [ <default> public $searchTreeSize ] + } + + - Methods [1] { + Method [ <internal:maxminddb, ctor> public method __construct ] { + + - Parameters [1] { + Parameter #0 [ <required> array $metadata ] + } + } + } + } } } diff --git a/composer.json b/composer.json index 39cdfe2..bbb43b8 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } ], "require": { - "php": ">=5.6" + "php": ">=7.2" }, "suggest": { "ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder", @@ -21,13 +21,13 @@ "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups" }, "conflict": { - "ext-maxminddb": "<1.6.0,>=2.0.0" + "ext-maxminddb": "<1.7.0,>=2.0.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "2.*", - "phpunit/phpunit": "5.*", + "phpunit/phpunit": ">=8.0.0,<10.0.0", "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpcov": "^3.0", + "phpunit/phpcov": ">=6.0.0", "squizlabs/php_codesniffer": "3.*" }, "autoload": { diff --git a/php-maxminddb.spec b/php-maxminddb.spec index 6b9f366..c7cf204 100644 --- a/php-maxminddb.spec +++ b/php-maxminddb.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-maxminddb # -# Copyright (c) 2018-2019 Remi Collet +# Copyright (c) 2018-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -17,7 +17,7 @@ %global with_tests 0%{!?_without_tests:1} -%global gh_commit febd4920bf17c1da84cef58e56a8227dfb37fbe4 +%global gh_commit 942553da239f12051275f9c666538b5dd09e2908 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner maxmind %global gh_project MaxMind-DB-Reader-php @@ -31,16 +31,18 @@ Summary: MaxMind DB Reader extension Name: %{?sub_prefix}php-maxminddb -Version: 1.6.0 +Version: 1.7.0 %global rpmrel 1 Release: %{rpmrel}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: ASL 2.0 URL: https://github.com/%{gh_owner}/%{gh_project} +# keep using git snapshot to retrieve extension + library + test Source0: %{pkg_name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -BuildRequires: %{?scl_prefix}php-devel >= 5.6 +BuildRequires: %{?scl_prefix}php-devel >= 7.2 +BuildRequires: %{?scl_prefix}php-pear >= 1.10 BuildRequires: pkgconfig(libmaxminddb) >= 1.0.0 Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} @@ -52,19 +54,13 @@ Recommends: geolite2-country Suggests: geolite2-city %endif -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -%if "%{php_version}" > "5.6" -Obsoletes: php56u-%{pecl_name} <= %{version} -Obsoletes: php56w-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-%{pecl_name} <= %{version} -Obsoletes: php70w-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-%{pecl_name} <= %{version} -Obsoletes: php71w-%{pecl_name} <= %{version} -%endif +# PECL +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} + +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} %if "%{php_version}" > "7.2" Obsoletes: php72u-%{pecl_name} <= %{version} Obsoletes: php72w-%{pecl_name} <= %{version} @@ -77,6 +73,9 @@ Obsoletes: php73w-%{pecl_name} <= %{version} Obsoletes: php74-%{pecl_name} <= %{version} Obsoletes: php74w-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-%{pecl_name} <= %{version} +%endif %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -110,10 +109,11 @@ BuildRequires: php-bcmath BuildRequires: php-gmp # from composer.json "require-dev": { # "friendsofphp/php-cs-fixer": "2.*", -# "phpunit/phpunit": "5.*", -# "satooshi/php-coveralls": "1.0.*", +# "phpunit/phpunit": ">=8.0.0,<10.0.0", +# "php-coveralls/php-coveralls": "^2.1", +# "phpunit/phpcov": ">=6.0.0", # "squizlabs/php_codesniffer": "3.*" -BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: phpunit8 %endif # from composer.json "require": { @@ -214,6 +214,8 @@ make %{?_smp_mflags} %install %{?dtsenable} +# Install XML package description +install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Install the NTS stuff make -C NTS install INSTALL_ROOT=%{buildroot} @@ -265,9 +267,9 @@ REPORT_EXIT_STATUS=1 \ %if %{with_lib} && %{with_tests} cd .. : Upstream test suite for the library -for cmd in php php56 php70 php71 php72 php73 php74; do +for cmd in php php72 php73 php74 php80; do if which $cmd; then - $cmd %{_bindir}/phpunit \ + $cmd %{_bindir}/phpunit8 \ --bootstrap %{buildroot}%{_datadir}/php/MaxMind/Db/Reader/autoload.php \ --verbose || ret=1 fi @@ -275,17 +277,38 @@ done : Upstream test suite for the library with the extension php --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - %{_bindir}/phpunit \ + %{_bindir}/phpunit8 \ --bootstrap %{buildroot}%{_datadir}/php/MaxMind/Db/Reader/autoload.php \ --verbose || ret=1 %endif exit $ret +%if 0%{?fedora} < 24 && 0%{?rhel} < 8 +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi + +# posttrans as pear can be installed after us +%posttrans +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi + +%postun +if [ $1 -eq 0 -a -x %{__pecl} ] ; then + %{pecl_uninstall} %{pecl_name} >/dev/null || : +fi +%endif + + %files %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md +%{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -308,6 +331,12 @@ exit $ret # when using pkgup, CHECK Release! %changelog +* Sat Aug 8 2020 Remi Collet <remi@remirepo.net> - 1.7.0-1 +- update to 1.7.0 +- now available on pecl +- raise dependency on PHP 7.2 +- switch to phpunit8 + * Fri Dec 20 2019 Remi Collet <remi@remirepo.net> - 1.6.0-1 - update to 1.6.0 |