From 8ecf5dcd822a245b1d138b893ed843f2f38567b2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 28 Nov 2022 08:02:51 +0100 Subject: update to 0.9.3 drop patch merged upstream --- PHPINFO | 4 +- REFLECTION | 124 ++++++++++++++++++++++++++++++++++++++----------- mustache-php82.patch | 42 ----------------- php-pecl-mustache.spec | 12 ++--- 4 files changed, 105 insertions(+), 77 deletions(-) delete mode 100644 mustache-php82.patch diff --git a/PHPINFO b/PHPINFO index 83d4f49..192f2a4 100644 --- a/PHPINFO +++ b/PHPINFO @@ -1,8 +1,8 @@ mustache -Version => 0.9.2 -Released => 2020-11-12 +Version => 0.9.3 +Released => 2022-11-26 Revision => master Authors => John Boehr (lead) Spec Version => 1.1.2 diff --git a/REFLECTION b/REFLECTION index f235443..ee666bc 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,7 +1,7 @@ -Extension [ extension #117 mustache version 0.9.2 ] { +Extension [ extension #122 mustache version 0.9.3 ] { - Classes [7] { - Class [ class MustacheAST ] { + Class [ class MustacheAST implements Stringable ] { - Constants [0] { } @@ -13,14 +13,14 @@ Extension [ extension #117 mustache version 0.9.2 ] { } - Properties [1] { - Property [ protected $binaryString ] + Property [ protected $binaryString = NULL ] } - Methods [5] { Method [ public method __construct ] { - Parameters [1] { - Parameter #0 [ $vars ] + Parameter #0 [ $vars = ] } } @@ -36,10 +36,11 @@ Extension [ extension #117 mustache version 0.9.2 ] { } } - Method [ public method __toString ] { + Method [ public method __toString ] { - Parameters [0] { } + - Return [ string ] } Method [ public method __wakeup ] { @@ -172,7 +173,7 @@ Extension [ extension #117 mustache version 0.9.2 ] { } } - Class [ class MustacheTemplate ] { + Class [ class MustacheTemplate implements Stringable ] { - Constants [0] { } @@ -184,26 +185,27 @@ Extension [ extension #117 mustache version 0.9.2 ] { } - Properties [1] { - Property [ protected $template ] + Property [ protected $template = NULL ] } - Methods [2] { Method [ public method __construct ] { - Parameters [1] { - Parameter #0 [ $vars ] + Parameter #0 [ $vars = ] } } - Method [ public method __toString ] { + Method [ public method __toString ] { - Parameters [0] { } + - Return [ string ] } } } - Class [ class MustacheException extends Exception implements Throwable ] { + Class [ class MustacheException extends Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -215,52 +217,86 @@ Extension [ extension #117 mustache version 0.9.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class MustacheParserException extends MustacheException implements Throwable ] { + Class [ class MustacheParserException extends MustacheException implements Stringable, Throwable ] { - Constants [0] { } @@ -272,47 +308,81 @@ Extension [ extension #117 mustache version 0.9.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected $file = NULL ] + Property [ protected $line = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } diff --git a/mustache-php82.patch b/mustache-php82.patch deleted file mode 100644 index 9e40b5c..0000000 --- a/mustache-php82.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 4b998185887213029616163c6fa336d6a985ff06 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 13 Sep 2022 11:06:35 +0200 -Subject: [PATCH] fix __toString return type for PHP 8.2 - ---- - mustache_ast.cpp | 4 ++++ - mustache_template.cpp | 4 ++++ - 2 files changed, 8 insertions(+) - -diff --git a/mustache_ast.cpp b/mustache_ast.cpp -index eb0ba06..70abc4b 100644 ---- a/mustache_ast.cpp -+++ b/mustache_ast.cpp -@@ -24,7 +24,11 @@ ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_INFO_EX(MustacheAST__toArray_args, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0) - ZEND_END_ARG_INFO() - -+#if PHP_VERSION_ID >= 80200 -+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(MustacheAST____toString_args, 0, 0, IS_STRING, 0) -+#else - ZEND_BEGIN_ARG_INFO_EX(MustacheAST____toString_args, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0) -+#endif - ZEND_END_ARG_INFO() - - ZEND_BEGIN_ARG_INFO_EX(MustacheAST____wakeup_args, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0) -diff --git a/mustache_template.cpp b/mustache_template.cpp -index e25ab24..7cd47a6 100644 ---- a/mustache_template.cpp -+++ b/mustache_template.cpp -@@ -17,7 +17,11 @@ ZEND_BEGIN_ARG_INFO_EX(MustacheTemplate____construct_args, ZEND_SEND_BY_VAL, ZEN - ZEND_ARG_INFO(0, vars) - ZEND_END_ARG_INFO() - -+#if PHP_VERSION_ID >= 80200 -+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(MustacheTemplate____toString_args, 0, 0, IS_STRING, 0) -+#else - ZEND_BEGIN_ARG_INFO_EX(MustacheTemplate____toString_args, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0) -+#endif - ZEND_END_ARG_INFO() - /* }}} */ - diff --git a/php-pecl-mustache.spec b/php-pecl-mustache.spec index 6718440..fe55d35 100644 --- a/php-pecl-mustache.spec +++ b/php-pecl-mustache.spec @@ -16,19 +16,17 @@ %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini -%global upstream_version 0.9.2 +%global upstream_version 0.9.3 #global upstream_prever RC2 Summary: Mustache templating language Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: MIT URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz -Patch0: %{pecl_name}-php82.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -67,8 +65,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b .pr67 - # Sanity check, really often broken extver=$(sed -n '/PHP_MUSTACHE_VERSION/{s/.* "//;s/".*$//;p}' php_mustache.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -212,6 +208,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Mon Nov 28 2022 Remi Collet - 0.9.3-1 +- update to 0.9.3 +- drop patch merged upstream + * Tue Sep 13 2022 Remi Collet - 0.9.2-2 - add patch for PHP 8.2 from https://github.com/jbboehr/php-mustache/pull/67 -- cgit