From a1d4040f7c76b6af8d1465326aaab236f5ea5afe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 17 Apr 2020 17:43:30 +0200 Subject: update to 0.9.0 raise dependency on PHP 7.2 fix test suite with PHP 8 using patch from https://github.com/jbboehr/php-handlebars/pull/66 skip 1 test on 32-bit reported as https://github.com/jbboehr/php-handlebars/issues/67 --- 0001-fix-test-for-php-7-8.patch | 23 ++ PHPINFO | 9 +- REFLECTION | 614 ++++++++++++++++++++++------------------ php-pecl-handlebars.spec | 44 +-- 4 files changed, 392 insertions(+), 298 deletions(-) create mode 100644 0001-fix-test-for-php-7-8.patch diff --git a/0001-fix-test-for-php-7-8.patch b/0001-fix-test-for-php-7-8.patch new file mode 100644 index 0000000..ddf4c6a --- /dev/null +++ b/0001-fix-test-for-php-7-8.patch @@ -0,0 +1,23 @@ +From 05091f6b4a68ff4924c399bf6ac77ceca40ddaf6 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 17 Apr 2020 15:01:32 +0200 +Subject: [PATCH] fix test for php 7/8 + +--- + tests/missing-file.phpt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/missing-file.phpt b/tests/missing-file.phpt +index 8bd131e..f62eb7d 100644 +--- a/tests/missing-file.phpt ++++ b/tests/missing-file.phpt +@@ -12,5 +12,5 @@ try { + echo $e->getMessage(), "\n"; + } + --EXPECTF-- +-Warning: Handlebars\VM::renderFile(dontreal): failed to open stream: No such file or directory in %s on line %d ++Warning: Handlebars\VM::renderFile(dontreal): %ailed to open stream: No such file or directory in %s on line %d + Failed to read input template file +-- +2.25.2 + diff --git a/PHPINFO b/PHPINFO index ee54e86..4c9f96f 100644 --- a/PHPINFO +++ b/PHPINFO @@ -1,14 +1,15 @@ handlebars -Version => 0.8.3 -Released => 2018-11-11 +Version => 0.9.0 +Released => 2020-04-17 Authors => John Boehr (lead) Spec Version => 4.0.5 -libhandlebars Version => 0.6.4 +PSR support => active +libhandlebars Version => 0.7.0 libhandlebars Handlebars Spec Version => 4.0.5 libhandlebars Mustache Spec Version => 1.1.3 -PSR support => active +xxhash version => 0.7.3 Local memory usage => 48 Directive => Local Value => Master Value diff --git a/REFLECTION b/REFLECTION index b6a1183..439623d 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #188 handlebars version 0.8.3 ] { +Extension [ extension #113 handlebars version 0.9.0 ] { - Dependencies { Dependency [ psr (Optional) ] @@ -35,9 +35,9 @@ Extension [ extension #188 handlebars version 0.8.3 ] { } - Constants [4] { - Constant [ integer Handlebars\PSR ] { 1 } - Constant [ string Handlebars\VERSION ] { 0.8.3 } - Constant [ string Handlebars\LIBVERSION ] { 0.6.4 } + Constant [ int Handlebars\PSR ] { 1 } + Constant [ string Handlebars\VERSION ] { 0.9.0 } + Constant [ string Handlebars\LIBVERSION ] { 0.7.0 } Constant [ null Handlebars\CACHE_BACKEND ] { } } @@ -50,6 +50,218 @@ Extension [ extension #188 handlebars version 0.8.3 ] { } - Classes [19] { + Interface [ interface Handlebars\Registry extends ArrayAccess, Traversable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [4] { + Method [ abstract public method offsetExists ] { + + - Parameters [1] { + Parameter #0 [ $offset ] + } + } + + Method [ abstract public method offsetGet ] { + + - Parameters [1] { + Parameter #0 [ $offset ] + } + } + + Method [ abstract public method offsetSet ] { + + - Parameters [2] { + Parameter #0 [ $offset ] + Parameter #1 [ $value ] + } + } + + Method [ abstract public method offsetUnset ] { + + - Parameters [1] { + Parameter #0 [ $offset ] + } + } + } + } + + Class [ class Handlebars\DefaultRegistry extends ArrayObject implements Countable, Serializable, ArrayAccess, Traversable, IteratorAggregate, Handlebars\Registry ] { + + - Constants [2] { + Constant [ public int STD_PROP_LIST ] { 1 } + Constant [ public int ARRAY_AS_PROPS ] { 2 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [22] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $input ] + Parameter #1 [ $flags ] + Parameter #2 [ $iterator_class ] + } + } + + Method [ public method offsetExists ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + } + + Method [ public method offsetGet ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + } + + Method [ public method offsetSet ] { + + - Parameters [2] { + Parameter #0 [ $index ] + Parameter #1 [ $newval ] + } + } + + Method [ public method offsetUnset ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + } + + Method [ public method append ] { + + - Parameters [1] { + Parameter #0 [ $value ] + } + } + + Method [ public method getArrayCopy ] { + + - Parameters [0] { + } + } + + Method [ public method count ] { + + - Parameters [0] { + } + } + + Method [ public method getFlags ] { + + - Parameters [0] { + } + } + + Method [ public method setFlags ] { + + - Parameters [1] { + Parameter #0 [ $flags ] + } + } + + Method [ public method asort ] { + + - Parameters [0] { + } + } + + Method [ public method ksort ] { + + - Parameters [0] { + } + } + + Method [ public method uasort ] { + + - Parameters [1] { + Parameter #0 [ $cmp_function ] + } + } + + Method [ public method uksort ] { + + - Parameters [1] { + Parameter #0 [ $cmp_function ] + } + } + + Method [ public method natsort ] { + + - Parameters [0] { + } + } + + Method [ public method natcasesort ] { + + - Parameters [0] { + } + } + + Method [ public method unserialize ] { + + - Parameters [1] { + Parameter #0 [ $serialized ] + } + } + + Method [ public method serialize ] { + + - Parameters [0] { + } + } + + Method [ public method getIterator ] { + + - Parameters [0] { + } + } + + Method [ public method exchangeArray ] { + + - Parameters [1] { + Parameter #0 [ $array ] + } + } + + Method [ public method setIteratorClass ] { + + - Parameters [1] { + Parameter #0 [ $iteratorClass ] + } + } + + Method [ public method getIteratorClass ] { + + - Parameters [0] { + } + } + } + } + Interface [ interface Handlebars\Impl extends Psr\Log\LoggerAwareInterface ] { - Constants [0] { @@ -69,24 +281,28 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [0] { } + - Return [ Handlebars\Registry or NULL ] } Method [ abstract public method getPartials ] { - Parameters [0] { } + - Return [ Handlebars\Registry or NULL ] } Method [ abstract public method getDecorators ] { - Parameters [0] { } + - Return [ Handlebars\Registry or NULL ] } Method [ abstract public method getLogger ] { - Parameters [0] { } + - Return [ Psr\Logger\LoggerInterface or NULL ] } Method [ abstract public method setHelpers ] { @@ -94,6 +310,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ Handlebars\Registry $helpers ] } + - Return [ Handlebars\Impl ] } Method [ abstract public method setPartials ] { @@ -101,13 +318,15 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ Handlebars\Registry $partials ] } + - Return [ Handlebars\Impl ] } Method [ abstract public method setDecorators ] { - Parameters [1] { - Parameter #0 [ Handlebars\Registry $partials ] + Parameter #0 [ Handlebars\Registry $decorators ] } + - Return [ Handlebars\Impl ] } Method [ abstract public method setLogger ] { @@ -115,24 +334,27 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ Psr\Log\LoggerInterface $logger ] } + - Return [ Handlebars\Impl ] } Method [ abstract public method render ] { - Parameters [3] { - Parameter #0 [ $tmpl ] + Parameter #0 [ string $tmpl ] Parameter #1 [ $context ] Parameter #2 [ array or NULL $options ] } + - Return [ string ] } Method [ abstract public method renderFile ] { - Parameters [3] { - Parameter #0 [ $filename ] + Parameter #0 [ string $filename ] Parameter #1 [ $context ] Parameter #2 [ array or NULL $options ] } + - Return [ string ] } } } @@ -149,10 +371,10 @@ Extension [ extension #188 handlebars version 0.8.3 ] { } - Properties [4] { + Property [ protected $logger ] + Property [ protected $decorators ] Property [ protected $helpers ] Property [ protected $partials ] - Property [ protected $decorators ] - Property [ protected $logger ] } - Methods [10] { @@ -160,24 +382,28 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [0] { } + - Return [ Handlebars\Registry or NULL ] } Method [ public method getPartials ] { - Parameters [0] { } + - Return [ Handlebars\Registry or NULL ] } Method [ public method getDecorators ] { - Parameters [0] { } + - Return [ Handlebars\Registry or NULL ] } Method [ public method getLogger ] { - Parameters [0] { } + - Return [ Psr\Logger\LoggerInterface or NULL ] } Method [ public method setHelpers ] { @@ -185,6 +411,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ Handlebars\Registry $helpers ] } + - Return [ Handlebars\Impl ] } Method [ public method setPartials ] { @@ -192,13 +419,15 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ Handlebars\Registry $partials ] } + - Return [ Handlebars\Impl ] } Method [ public method setDecorators ] { - Parameters [1] { - Parameter #0 [ Handlebars\Registry $partials ] + Parameter #0 [ Handlebars\Registry $decorators ] } + - Return [ Handlebars\Impl ] } Method [ public method setLogger ] { @@ -206,49 +435,53 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ Psr\Log\LoggerInterface $logger ] } + - Return [ Handlebars\Impl ] } Method [ abstract public method render ] { - Parameters [3] { - Parameter #0 [ $tmpl ] + Parameter #0 [ string $tmpl ] Parameter #1 [ $context ] Parameter #2 [ array or NULL $options ] } + - Return [ string ] } Method [ abstract public method renderFile ] { - Parameters [3] { - Parameter #0 [ $filename ] + Parameter #0 [ string $filename ] Parameter #1 [ $context ] Parameter #2 [ array or NULL $options ] } + - Return [ string ] } } } Class [ class Handlebars\Compiler ] { - - Constants [18] { - Constant [ public integer NONE ] { 0 } - Constant [ public integer USE_DEPTHS ] { 1 } - Constant [ public integer STRING_PARAMS ] { 2 } - Constant [ public integer TRACK_IDS ] { 4 } - Constant [ public integer NO_ESCAPE ] { 8 } - Constant [ public integer KNOWN_HELPERS_ONLY ] { 16 } - Constant [ public integer PREVENT_INDENT ] { 32 } - Constant [ public integer EXPLICIT_PARTIAL_CONTEXT ] { 128 } - Constant [ public integer IGNORE_STANDALONE ] { 256 } - Constant [ public integer ALTERNATE_DECORATORS ] { 512 } - Constant [ public integer STRICT ] { 1024 } - Constant [ public integer ASSUME_OBJECTS ] { 2048 } - Constant [ public integer COMPAT ] { 1 } - Constant [ public integer ALL ] { 4095 } - Constant [ public integer USE_PARTIAL ] { 2 } - Constant [ public integer IS_SIMPLE ] { 4 } - Constant [ public integer USE_DECORATORS ] { 8 } - Constant [ public integer RESULT_ALL ] { 15 } + - Constants [19] { + Constant [ public int NONE ] { 0 } + Constant [ public int USE_DEPTHS ] { 1 } + Constant [ public int STRING_PARAMS ] { 2 } + Constant [ public int TRACK_IDS ] { 4 } + Constant [ public int NO_ESCAPE ] { 8 } + Constant [ public int KNOWN_HELPERS_ONLY ] { 16 } + Constant [ public int PREVENT_INDENT ] { 32 } + Constant [ public int EXPLICIT_PARTIAL_CONTEXT ] { 128 } + Constant [ public int IGNORE_STANDALONE ] { 256 } + Constant [ public int ALTERNATE_DECORATORS ] { 512 } + Constant [ public int STRICT ] { 1024 } + Constant [ public int ASSUME_OBJECTS ] { 2048 } + Constant [ public int MUSTACHE_STYLE_LAMBDAS ] { 4096 } + Constant [ public int COMPAT ] { 1 } + Constant [ public int ALL ] { 8191 } + Constant [ public int USE_PARTIAL ] { 2 } + Constant [ public int IS_SIMPLE ] { 4 } + Constant [ public int USE_DECORATORS ] { 8 } + Constant [ public int RESULT_ALL ] { 15 } } - Static properties [0] { @@ -258,17 +491,19 @@ Extension [ extension #188 handlebars version 0.8.3 ] { Method [ static public method compile ] { - Parameters [2] { - Parameter #0 [ $tmpl ] - Parameter #1 [ $options ] + Parameter #0 [ string $tmpl ] + Parameter #1 [ array or NULL $options ] } + - Return [ array ] } Method [ static public method compilePrint ] { - Parameters [2] { - Parameter #0 [ $tmpl ] - Parameter #1 [ $options ] + Parameter #0 [ string $tmpl ] + Parameter #1 [ array or NULL $options ] } + - Return [ string ] } } @@ -297,7 +532,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { } } - Class [ class Handlebars\ParseException extends Exception implements Throwable, Handlebars\Exception ] { + Class [ class Handlebars\CompileException extends Exception implements Throwable, Handlebars\Exception ] { - Constants [0] { } @@ -354,7 +589,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { } } - Class [ class Handlebars\CompileException extends Exception implements Throwable, Handlebars\Exception ] { + Class [ class Handlebars\InvalidArgumentException extends RuntimeException implements Throwable, Handlebars\Exception ] { - Constants [0] { } @@ -411,7 +646,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { } } - Class [ class Handlebars\InvalidArgumentException extends RuntimeException implements Throwable, Handlebars\Exception ] { + Class [ class Handlebars\RuntimeException extends RuntimeException implements Throwable, Handlebars\Exception ] { - Constants [0] { } @@ -468,7 +703,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { } } - Class [ class Handlebars\RuntimeException extends RuntimeException implements Throwable, Handlebars\Exception ] { + Class [ class Handlebars\InvalidBinaryStringException extends Exception implements Throwable, Handlebars\Exception ] { - Constants [0] { } @@ -545,8 +780,8 @@ Extension [ extension #188 handlebars version 0.8.3 ] { Method [ public method __construct ] { - Parameters [2] { - Parameter #0 [ $opcode ] - Parameter #1 [ $args ] + Parameter #0 [ string $opcode ] + Parameter #1 [ array $args ] } } } @@ -583,9 +818,15 @@ Extension [ extension #188 handlebars version 0.8.3 ] { } Method [ public method fn ] { + + - Parameters [0] { + } } Method [ public method inverse ] { + + - Parameters [0] { + } } Method [ public method offsetExists ] { @@ -631,15 +872,17 @@ Extension [ extension #188 handlebars version 0.8.3 ] { Method [ static public method parse ] { - Parameters [1] { - Parameter #0 [ $tmpl ] + Parameter #0 [ string $tmpl ] } + - Return [ array ] } Method [ static public method parsePrint ] { - Parameters [1] { - Parameter #0 [ $tmpl ] + Parameter #0 [ string $tmpl ] } + - Return [ string ] } } @@ -680,219 +923,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [3] { Parameter #0 [ array $opcodes ] Parameter #1 [ array $children ] - Parameter #2 [ $blockParams ] - } - } - } - } - - Interface [ interface Handlebars\Registry extends ArrayAccess, Traversable ] { - - - Constants [0] { - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [0] { - } - - - Methods [4] { - Method [ abstract public method offsetExists ] { - - - Parameters [1] { - Parameter #0 [ $offset ] - } - } - - Method [ abstract public method offsetGet ] { - - - Parameters [1] { - Parameter #0 [ $offset ] - } - } - - Method [ abstract public method offsetSet ] { - - - Parameters [2] { - Parameter #0 [ $offset ] - Parameter #1 [ $value ] - } - } - - Method [ abstract public method offsetUnset ] { - - - Parameters [1] { - Parameter #0 [ $offset ] - } - } - } - } - - Class [ class Handlebars\DefaultRegistry extends ArrayObject implements Countable, Serializable, ArrayAccess, Traversable, IteratorAggregate, Handlebars\Registry ] { - - - Constants [2] { - Constant [ public integer STD_PROP_LIST ] { 1 } - Constant [ public integer ARRAY_AS_PROPS ] { 2 } - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [0] { - } - - - Methods [22] { - Method [ public method __construct ] { - - - Parameters [3] { - Parameter #0 [ $input ] - Parameter #1 [ $flags ] - Parameter #2 [ $iterator_class ] - } - } - - Method [ public method offsetExists ] { - - - Parameters [1] { - Parameter #0 [ $index ] - } - } - - Method [ public method offsetGet ] { - - - Parameters [1] { - Parameter #0 [ $index ] - } - } - - Method [ public method offsetSet ] { - - - Parameters [2] { - Parameter #0 [ $index ] - Parameter #1 [ $newval ] - } - } - - Method [ public method offsetUnset ] { - - - Parameters [1] { - Parameter #0 [ $index ] - } - } - - Method [ public method append ] { - - - Parameters [1] { - Parameter #0 [ $value ] - } - } - - Method [ public method getArrayCopy ] { - - - Parameters [0] { - } - } - - Method [ public method count ] { - - - Parameters [0] { - } - } - - Method [ public method getFlags ] { - - - Parameters [0] { - } - } - - Method [ public method setFlags ] { - - - Parameters [1] { - Parameter #0 [ $flags ] - } - } - - Method [ public method asort ] { - - - Parameters [0] { - } - } - - Method [ public method ksort ] { - - - Parameters [0] { - } - } - - Method [ public method uasort ] { - - - Parameters [1] { - Parameter #0 [ $cmp_function ] - } - } - - Method [ public method uksort ] { - - - Parameters [1] { - Parameter #0 [ $cmp_function ] - } - } - - Method [ public method natsort ] { - - - Parameters [0] { - } - } - - Method [ public method natcasesort ] { - - - Parameters [0] { - } - } - - Method [ public method unserialize ] { - - - Parameters [1] { - Parameter #0 [ $serialized ] - } - } - - Method [ public method serialize ] { - - - Parameters [0] { - } - } - - Method [ public method getIterator ] { - - - Parameters [0] { - } - } - - Method [ public method exchangeArray ] { - - - Parameters [1] { - Parameter #0 [ $array ] - } - } - - Method [ public method setIteratorClass ] { - - - Parameters [1] { - Parameter #0 [ $iteratorClass ] - } - } - - Method [ public method getIteratorClass ] { - - - Parameters [0] { + Parameter #2 [ int $blockParams ] } } } @@ -917,7 +948,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { Method [ public method __construct ] { - Parameters [1] { - Parameter #0 [ $value ] + Parameter #0 [ string $value ] } } @@ -925,6 +956,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [0] { } + - Return [ string ] } } } @@ -949,8 +981,8 @@ Extension [ extension #188 handlebars version 0.8.3 ] { Method [ public method __construct ] { - Parameters [2] { - Parameter #0 [ $name ] - Parameter #1 [ $text ] + Parameter #0 [ string $name ] + Parameter #1 [ string $text ] } } } @@ -968,15 +1000,17 @@ Extension [ extension #188 handlebars version 0.8.3 ] { Method [ static public method lex ] { - Parameters [1] { - Parameter #0 [ $tmpl ] + Parameter #0 [ string $tmpl ] } + - Return [ array ] } Method [ static public method lexPrint ] { - Parameters [1] { - Parameter #0 [ $tmpl ] + Parameter #0 [ string $tmpl ] } + - Return [ string ] } } @@ -1000,8 +1034,9 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [2] { Parameter #0 [ $contextPath ] - Parameter #1 [ $id ] + Parameter #1 [ string $id ] } + - Return [ string ] } Method [ static public method createFrame ] { @@ -1015,16 +1050,17 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [2] { Parameter #0 [ $objOrArray ] - Parameter #1 [ $field ] + Parameter #1 [ string $field ] } } Method [ static public method indent ] { - Parameters [2] { - Parameter #0 [ $str ] - Parameter #1 [ $indent ] + Parameter #0 [ string $str ] + Parameter #1 [ string $indent ] } + - Return [ string ] } Method [ static public method isCallable ] { @@ -1032,13 +1068,15 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ $name ] } + - Return [ bool ] } Method [ static public method isIntArray ] { - Parameters [1] { - Parameter #0 [ $arr ] + Parameter #0 [ array $arr ] } + - Return [ bool ] } Method [ static public method expression ] { @@ -1046,6 +1084,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ $value ] } + - Return [ string ] } Method [ static public method escapeExpression ] { @@ -1053,6 +1092,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ $value ] } + - Return [ string ] } Method [ static public method escapeExpressionCompat ] { @@ -1060,6 +1100,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ $value ] } + - Return [ string ] } } @@ -1082,13 +1123,13 @@ Extension [ extension #188 handlebars version 0.8.3 ] { } - Properties [4] { + Property [ protected $logger ] + Property [ protected $decorators ] Property [ protected $helpers ] Property [ protected $partials ] - Property [ protected $decorators ] - Property [ protected $logger ] } - - Methods [11] { + - Methods [13] { Method [ public method __construct ] { - Parameters [1] { @@ -1101,6 +1142,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ Handlebars\Registry $helpers ] } + - Return [ Handlebars\Impl ] } Method [ public method setPartials ] { @@ -1108,55 +1150,82 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ Handlebars\Registry $partials ] } + - Return [ Handlebars\Impl ] + } + + Method [ public method compile ] { + + - Parameters [2] { + Parameter #0 [ string $tmpl ] + Parameter #1 [ array or NULL $options ] + } + - Return [ string ] } Method [ public method render ] { - Parameters [3] { - Parameter #0 [ $tmpl ] + Parameter #0 [ string $tmpl ] Parameter #1 [ $context ] Parameter #2 [ array or NULL $options ] } + - Return [ string ] } Method [ public method renderFile ] { - Parameters [3] { - Parameter #0 [ $filename ] + Parameter #0 [ string $filename ] + Parameter #1 [ $context ] + Parameter #2 [ array or NULL $options ] + } + - Return [ string ] + } + + Method [ public method renderFromBinaryString ] { + + - Parameters [3] { + Parameter #0 [ string $binaryString ] Parameter #1 [ $context ] Parameter #2 [ array or NULL $options ] } + - Return [ string ] } Method [ public method getHelpers ] { - Parameters [0] { } + - Return [ Handlebars\Registry or NULL ] } Method [ public method getPartials ] { - Parameters [0] { } + - Return [ Handlebars\Registry or NULL ] } Method [ public method getDecorators ] { - Parameters [0] { } + - Return [ Handlebars\Registry or NULL ] } Method [ public method getLogger ] { - Parameters [0] { } + - Return [ Psr\Logger\LoggerInterface or NULL ] } Method [ public method setDecorators ] { - Parameters [1] { - Parameter #0 [ Handlebars\Registry $partials ] + Parameter #0 [ Handlebars\Registry $decorators ] } + - Return [ Handlebars\Impl ] } Method [ public method setLogger ] { @@ -1164,6 +1233,7 @@ Extension [ extension #188 handlebars version 0.8.3 ] { - Parameters [1] { Parameter #0 [ Psr\Log\LoggerInterface $logger ] } + - Return [ Handlebars\Impl ] } } } diff --git a/php-pecl-handlebars.spec b/php-pecl-handlebars.spec index 29cfaa8..4fe11c2 100644 --- a/php-pecl-handlebars.spec +++ b/php-pecl-handlebars.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-handlebars # -# Copyright (c) 2017-2018 Remi Collet +# Copyright (c) 2017-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -13,27 +13,25 @@ %global pecl_name handlebars %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini -%else # After 40-psr.ini %global ini_name 50-%{pecl_name}.ini -%endif %global with_tests 0%{!?_without_tests:1} -%global upstream_version 0.8.3 +%global upstream_version 0.9.0 #global upstream_prever RC2 Summary: Handlebars templating language Name: %{?sub_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: BSD -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz + +Patch0: 0001-fix-test-for-php-7-8.patch BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel >= 5.6 +BuildRequires: %{?scl_prefix}php-devel >= 7.2 BuildRequires: %{?scl_prefix}php-pear BuildRequires: libhandlebars-devel BuildRequires: libtalloc-devel @@ -56,20 +54,8 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" Obsoletes: php72u-pecl-%{pecl_name} <= %{version} Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif %if "%{php_version}" > "7.3" Obsoletes: php73-pecl-%{pecl_name} <= %{version} Obsoletes: php73w-pecl-%{pecl_name} <= %{version} @@ -117,6 +103,8 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS cd NTS +%patch0 -p1 + # Sanity check, really often broken extver=$(sed -n '/PHP_HANDLEBARS_VERSION/{s/.* "//;s/".*$//;p}' php_handlebars.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -221,6 +209,10 @@ fi %check +%if %{__isa_bits} < 64 +rm ?TS/tests/vm/renderFromBinaryString.phpt +%endif + : Minimal load test for NTS extension cd NTS %{__php} --no-php-ini \ @@ -279,6 +271,14 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Fri Apr 17 2020 Remi Collet - 0.9.0-1 +- update to 0.9.0 +- raise dependency on PHP 7.2 +- fix test suite with PHP 8 using patch from + https://github.com/jbboehr/php-handlebars/pull/66 +- skip 1 test on 32-bit reported as + https://github.com/jbboehr/php-handlebars/issues/67 + * Tue Sep 03 2019 Remi Collet - 0.8.3-2 - rebuild for 7.4.0RC1 -- cgit