diff --git a/CREDITS b/CREDITS index 4155139..ef17307 100644 --- a/CREDITS +++ b/CREDITS @@ -1,2 +1,2 @@ -JsonNet +Jsonnet Chitao Gao ( neeke@php.net ) \ No newline at end of file diff --git a/README.md b/README.md index 53bfaa3..0233c8e 100644 --- a/README.md +++ b/README.md @@ -137,10 +137,10 @@ var_dump(Jsonnet::evaluateSnippet($Snippet)); ``` /usr/local/php/php-7.0.6-zts-debug/bin/php --re jsonnet -Extension [ extension #40 Jsonnet version v1.3.0 ] { +Extension [ extension #40 Jsonnet version v1.3.1 ] { - Constants [2] { - Constant [ string JSONNET_PHP_VERSION ] { v1.3.0 } + Constant [ string JSONNET_PHP_VERSION ] { v1.3.1 } Constant [ string JSONNET_PHP_AUTHOR ] { Chitao.Gao [ neeke@php.net ] } } diff --git a/include/Jsonnet.h b/include/Jsonnet.h index 0ff89d5..976828c 100644 --- a/include/Jsonnet.h +++ b/include/Jsonnet.h @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | JsonNet | + | Jsonnet | +----------------------------------------------------------------------+ | This source file is subject to version 2.0 of the Apache license, | | that is bundled with this package in the file LICENSE, and is | @@ -27,8 +27,8 @@ #include "Zend/zend_exceptions.h" #include "php7_wrapper.h" -#define JSONNET_RES_NAME "JsonNet" -#define JSONNET_PHP_VERSION "v1.3.0" +#define JSONNET_RES_NAME "Jsonnet" +#define JSONNET_PHP_VERSION "v1.3.1" #define JSONNET_PHP_AUTHOR "Chitao.Gao [ neeke@php.net ]" #define SL_S(s) s, sizeof(s) - 1 diff --git a/include/php7_wrapper.h b/include/php7_wrapper.h index 9b2f00a..0094a80 100644 --- a/include/php7_wrapper.h +++ b/include/php7_wrapper.h @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | JsonNet | + | Jsonnet | +----------------------------------------------------------------------+ | This source file is subject to version 2.0 of the Apache license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/jsonnet.c b/jsonnet.c index 42fe257..1d791f9 100644 --- a/jsonnet.c +++ b/jsonnet.c @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | JsonNet | + | Jsonnet | +----------------------------------------------------------------------+ | This source file is subject to version 2.0 of the Apache license, | | that is bundled with this package in the file LICENSE, and is | @@ -132,11 +132,11 @@ PHP_RSHUTDOWN_FUNCTION(jsonnet) PHP_MINFO_FUNCTION(jsonnet) { php_info_print_table_start(); - php_info_print_table_header(2, "JsonNet support", "Enabled"); - php_info_print_table_row(2, "JsonNet LibJsonNet Information", LIB_JSONNET_VERSION); - php_info_print_table_row(2, "JsonNet Version", JSONNET_PHP_VERSION); - php_info_print_table_row(2, "JsonNet Author", JSONNET_PHP_AUTHOR); - php_info_print_table_row(2, "JsonNet Supports", "https://github.com/Neeke/Jsonnet-PHP"); + php_info_print_table_header(2, "Jsonnet support", "Enabled"); + php_info_print_table_row(2, "Jsonnet LibJsonnet Information", LIB_JSONNET_VERSION); + php_info_print_table_row(2, "Jsonnet Version", JSONNET_PHP_VERSION); + php_info_print_table_row(2, "Jsonnet Author", JSONNET_PHP_AUTHOR); + php_info_print_table_row(2, "Jsonnet Supports", "https://github.com/Neeke/Jsonnet-PHP"); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); @@ -208,7 +208,7 @@ PHP_METHOD(JSONNET_RES_NAME, evaluateFile) { JSONNET_ZVAL_PTR_DTOR(result); JSONNET_ZVAL_PTR_DTOR(resultZval); - zend_throw_exception(php_com_exception_class_entry, "JsonNet::evaluateFile #error", CODE_ERROR TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, "Jsonnet::evaluateFile #error", CODE_ERROR TSRMLS_CC); return; } @@ -216,7 +216,7 @@ PHP_METHOD(JSONNET_RES_NAME, evaluateFile) RETURN_ZVAL(resultZval,1,1); } - zend_throw_exception(php_com_exception_class_entry, "JsonNet::evaluateFile('filePath'), filePath is null", CODE_ERROR TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, "Jsonnet::evaluateFile('filePath'), filePath is null", CODE_ERROR TSRMLS_CC); } PHP_METHOD(JSONNET_RES_NAME, evaluateSnippet) @@ -263,7 +263,7 @@ PHP_METHOD(JSONNET_RES_NAME, evaluateSnippet) { JSONNET_ZVAL_PTR_DTOR(result); JSONNET_ZVAL_PTR_DTOR(resultZval); - zend_throw_exception(php_com_exception_class_entry, "JsonNet::evaluateSnippet #error", CODE_ERROR TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, "Jsonnet::evaluateSnippet #error", CODE_ERROR TSRMLS_CC); return; } @@ -271,7 +271,7 @@ PHP_METHOD(JSONNET_RES_NAME, evaluateSnippet) RETURN_ZVAL(resultZval,1,1); } - zend_throw_exception(php_com_exception_class_entry, "JsonNet::evaluateSnippet('string'), string is null", CODE_ERROR TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, "Jsonnet::evaluateSnippet('string'), string is null", CODE_ERROR TSRMLS_CC); } PHP_METHOD(JSONNET_RES_NAME, fmtFile) @@ -315,14 +315,14 @@ PHP_METHOD(JSONNET_RES_NAME, fmtFile) if(Z_TYPE_P(result) == IS_NULL) { JSONNET_ZVAL_PTR_DTOR(result); - zend_throw_exception(php_com_exception_class_entry, "JsonNet::fmtFile #error", CODE_ERROR TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, "Jsonnet::fmtFile #error", CODE_ERROR TSRMLS_CC); return; } RETURN_ZVAL(result,1,1); } - zend_throw_exception(php_com_exception_class_entry, "JsonNet::fmtFile('filePath'), filePath is null", CODE_ERROR TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, "Jsonnet::fmtFile('filePath'), filePath is null", CODE_ERROR TSRMLS_CC); } PHP_METHOD(JSONNET_RES_NAME, fmtSnippet) @@ -366,12 +366,12 @@ PHP_METHOD(JSONNET_RES_NAME, fmtSnippet) if(Z_TYPE_P(result) == IS_NULL) { JSONNET_ZVAL_PTR_DTOR(result); - zend_throw_exception(php_com_exception_class_entry, "JsonNet::fmtSnippet #error", CODE_ERROR TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, "Jsonnet::fmtSnippet #error", CODE_ERROR TSRMLS_CC); return; } RETURN_ZVAL(result,1,1); } - zend_throw_exception(php_com_exception_class_entry, "JsonNet::fmtSnippet('string'), string is null", CODE_ERROR TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, "Jsonnet::fmtSnippet('string'), string is null", CODE_ERROR TSRMLS_CC); } diff --git a/package.xml b/package.xml index a5a5971..6e7817f 100644 --- a/package.xml +++ b/package.xml @@ -2,11 +2,11 @@ - JsonNet + Jsonnet pecl.php.net - The Google JsonNet for PHP. + The Google Jsonnet for PHP. - The Google JsonNet for PHP. + The Google Jsonnet for PHP. Jsonnet language, from its most basic features to its powerful object model, punctuated with examples drawn from the world of cocktails. These examples are meant to be fun, and although a little contrived, do not restrict our @@ -38,7 +38,7 @@ Apache2.0 - - Update Lib JsonNet use v0.10.0. + - Update Lib Jsonnet use v0.10.0. - Support PHP 7. @@ -57,7 +57,7 @@ - + @@ -175,7 +175,7 @@ Apache2.0 - - Update Lib JsonNet use v0.8.9. + - Update Lib Jsonnet use v0.8.9. - Fixed issue #1 #2, install error and .so load failed. @@ -208,9 +208,9 @@ Apache2.0 - - Update Lib JsonNet use v0.9.5. - - Add function JsonNet::fmtFile. - - Add function JsonNet::fmtSnippet. + - Update Lib Jsonnet use v0.9.5. + - Add function Jsonnet::fmtFile. + - Add function Jsonnet::fmtSnippet. diff --git a/test/test.jsonnet.php b/test/test.jsonnet.php index 2767689..2ccd4d9 100644 --- a/test/test.jsonnet.php +++ b/test/test.jsonnet.php @@ -9,13 +9,13 @@ var_dump(jsonnet_get_author()); - var_dump(JsonNet::evaluateFile('bar_menu.1.jsonnet')); - var_dump(JsonNet::fmtFile('bar_menu.1.jsonnet')); - var_dump(JsonNet::evaluateFile('bar_menu.2.jsonnet')); - var_dump(JsonNet::evaluateFile('bar_menu.3.jsonnet')); - var_dump(JsonNet::evaluateFile('bar_menu.5.jsonnet')); - var_dump(JsonNet::evaluateFile('bar_menu.6.jsonnet')); - var_dump(JsonNet::evaluateFile('utf8.jsonnet')); + var_dump(Jsonnet::evaluateFile('bar_menu.1.jsonnet')); + var_dump(Jsonnet::fmtFile('bar_menu.1.jsonnet')); + var_dump(Jsonnet::evaluateFile('bar_menu.2.jsonnet')); + var_dump(Jsonnet::evaluateFile('bar_menu.3.jsonnet')); + var_dump(Jsonnet::evaluateFile('bar_menu.5.jsonnet')); + var_dump(Jsonnet::evaluateFile('bar_menu.6.jsonnet')); + var_dump(Jsonnet::evaluateFile('utf8.jsonnet')); $Snippet = ' { @@ -47,8 +47,8 @@ '; - var_dump(JsonNet::fmtSnippet($Snippet)); - var_dump(JsonNet::evaluateSnippet($Snippet)); + var_dump(Jsonnet::fmtSnippet($Snippet)); + var_dump(Jsonnet::evaluateSnippet($Snippet)); } catch (Exception $e) { var_dump($e->getCode());