From c7615d678747c52fe4bb123257fc582f70b60886 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 23 Feb 2021 06:50:38 +0100 Subject: update to 0.4.0 raise dependency on PHP 8 --- PHPINFO | 3 +- REFLECTION | 97 ++++++++++++++++++++++++++++++++++++------------------- php-pecl-csv.spec | 21 ++++++------ 3 files changed, 75 insertions(+), 46 deletions(-) diff --git a/PHPINFO b/PHPINFO index 056b200..95db7ed 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,6 +2,7 @@ csv CSV support => enabled -Version => 0.3.1 +Version => 0.4.0 Author => George Peter Banyard Bug reports => https://gitlab.com/Girgias/csv-php-extension/issues +Sponsor me => https://github.com/sponsors/Girgias diff --git a/REFLECTION b/REFLECTION index f829ea7..8e0c58b 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,45 +1,76 @@ -Extension [ extension #73 csv version 0.3.1 ] { +Extension [ extension #69 csv version 0.4.0 ] { - - Functions { - Function [ function csv_array_to_row ] { + - Classes [1] { + Class [ final class CSV ] { - - Parameters [4] { - Parameter #0 [ array $fields ] - Parameter #1 [ string $delimiter ] - Parameter #2 [ string $enclosure ] - Parameter #3 [ string $eolSequence ] + - Constants [0] { } - - Return [ string ] - } - Function [ function csv_collection_to_file ] { - - Parameters [4] { - Parameter #0 [ array $collection ] - Parameter #1 [ string $delimiter ] - Parameter #2 [ string $enclosure ] - Parameter #3 [ string $eolSequence ] + - Static properties [0] { } - - Return [ string ] - } - Function [ function csv_file_to_collection ] { - - Parameters [4] { - Parameter #0 [ string $file ] - Parameter #1 [ string $delimiter ] - Parameter #2 [ string $enclosure ] - Parameter #3 [ string $eolSequence ] + - Static methods [5] { + Method [ static public method arrayToRow ] { + + - Parameters [4] { + Parameter #0 [ array $fields ] + Parameter #1 [ string $delimiter = ',' ] + Parameter #2 [ string $enclosure = '"' ] + Parameter #3 [ string $eolSequence = "\r\n" ] + } + - Return [ string ] + } + + Method [ static public method rowToArray ] { + + - Parameters [4] { + Parameter #0 [ string $row ] + Parameter #1 [ string $delimiter = ',' ] + Parameter #2 [ string $enclosure = '"' ] + Parameter #3 [ string $eolSequence = "\r\n" ] + } + - Return [ array ] + } + + Method [ static public method collectionToBuffer ] { + + - Parameters [4] { + Parameter #0 [ iterable $collection ] + Parameter #1 [ string $delimiter = ',' ] + Parameter #2 [ string $enclosure = '"' ] + Parameter #3 [ string $eolSequence = "\r\n" ] + } + - Return [ string ] + } + + Method [ static public method bufferToCollection ] { + + - Parameters [4] { + Parameter #0 [ string $buffer ] + Parameter #1 [ string $delimiter = ',' ] + Parameter #2 [ string $enclosure = '"' ] + Parameter #3 [ string $eolSequence = "\r\n" ] + } + - Return [ array ] + } + + Method [ static public method bufferToCollectionLax ] { + + - Parameters [4] { + Parameter #0 [ string $buffer ] + Parameter #1 [ string $delimiter = ',' ] + Parameter #2 [ string $enclosure = '"' ] + Parameter #3 [ string $eolSequence = "\r\n" ] + } + - Return [ array ] + } + } + + - Properties [0] { } - - Return [ array ] - } - Function [ function csv_row_to_array ] { - - Parameters [4] { - Parameter #0 [ string $row ] - Parameter #1 [ string $delimiter ] - Parameter #2 [ string $enclosure ] - Parameter #3 [ string $eolSequence ] + - Methods [0] { } - - Return [ array ] } } } diff --git a/php-pecl-csv.spec b/php-pecl-csv.spec index dbde331..bc501d8 100644 --- a/php-pecl-csv.spec +++ b/php-pecl-csv.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-csv # -# Copyright (c) 2020 Remi Collet +# Copyright (c) 2020-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -21,16 +21,17 @@ Summary: CSV PHP extension Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 0.3.1 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 0.4.0 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP URL: https://pecl.php.net/package/%{proj_name} Source0: https://pecl.php.net/get/%{proj_name}-%{version}.tgz Patch0: 0001-fix-c89.patch +BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel > 7.3 +BuildRequires: %{?scl_prefix}php-devel >= 8.0 BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} @@ -49,20 +50,12 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele %if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif %if "%{php_version}" > "8.0" Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif - %description A new and improved CSV file PHP extension which follows RFC 4180 instead of @@ -215,6 +208,10 @@ fi %changelog +* Tue Feb 23 2021 Remi Collet - 0.4.0-1 +- update to 0.4.0 +- raise dependency on PHP 8 + * Wed Sep 30 2020 Remi Collet - 0.3.1-2.7.3 - rebuild for PHP 8.0.0RC1 -- cgit