Commit 0e8d5340 authored by Ondrej Sury's avatar Ondrej Sury

New upstream version 2.0.2+1.3.1

parent 6cdccb19
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.10.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<package packagerversion="1.10.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>yaml</name>
<channel>pecl.php.net</channel>
<summary>YAML-1.1 parser and emitter</summary>
......@@ -11,10 +11,10 @@
<email>bd808@bd808.com</email>
<active>yes</active>
</lead>
<date>2016-09-24</date>
<time>22:30:59</time>
<date>2017-07-29</date>
<time>21:46:46</time>
<version>
<release>1.3.0</release>
<release>1.3.1</release>
<api>1.1.0</api>
</version>
<stability>
......@@ -23,17 +23,8 @@
</stability>
<license uri="http://www.opensource.org/licenses/mit-license.php">MIT</license>
<notes>
New Features:
- Removed IS_UNICODE (PHP6) support
- Removed support for PHP &lt;5.3.3
- Timestamps encoded according to https://www.w3.org/TR/NOTE-datetime
Bugs Fixed:
- Various missing free calls (remicollet, bd808)
- Fix parameter parsing for yaml_emit_file
- Fix callback handling for yaml_emit_file
- Fix result of tag callback to be copied to aliases (ranvis)
- #71696 Bad datetime management
- #72540 yaml_parse_url: check php_stream_copy_to_mem return value
</notes>
<contents>
<dir name="/">
......@@ -46,6 +37,7 @@ Bugs Fixed:
<file md5sum="c2dc7215c886fa378948748b7307031d" name="tests/bug_64694.phpt" role="test" />
<file md5sum="01116011ce85414843d03b621b0df8a5" name="tests/bug_69465.phpt" role="test" />
<file md5sum="16ec411d4d9441b9af64ac31861690ce" name="tests/bug_69616.phpt" role="test" />
<file md5sum="10a35e4c5d37b97dcfab1a15ee41d99b" name="tests/bug_72540.phpt" role="test" />
<file md5sum="76d86a9e3046434c702a7121d8be391c" name="tests/bug_alias_callback.phpt" role="test" />
<file md5sum="5b67d5243bb41d116d5832409dbab915" name="tests/yaml_001.phpt" role="test" />
<file md5sum="97b9fc72b36b77befe56227f9597483b" name="tests/yaml_002.phpt" role="test" />
......@@ -106,9 +98,9 @@ Bugs Fixed:
<file md5sum="5fc9fd73c0ae1c9e5a4c041ef4111922" name="detect.c" role="src" />
<file md5sum="94fdbc474df7e49dee10c6ecffcd42f6" name="emit.c" role="src" />
<file md5sum="2b422e2f9e6130b97e3cb906c46abc7f" name="parse.c" role="src" />
<file md5sum="609fa30db0cbc149964499979c249189" name="php_yaml.h" role="src" />
<file md5sum="045ca8999f1315de9efb9262e4239387" name="php_yaml.h" role="src" />
<file md5sum="939ce704ef2f2741f88016ec07575d59" name="php_yaml_int.h" role="src" />
<file md5sum="d9ffd3c90ba80b948b0a73352f1e5cbd" name="yaml.c" role="src" />
<file md5sum="195b51da01e146820fd39a7fc701f13f" name="yaml.c" role="src" />
</dir>
</contents>
<dependencies>
......@@ -131,6 +123,30 @@ Bugs Fixed:
<configureoption default="autodetect" name="with-yaml" prompt="Please provide the prefix of libyaml installation" />
</extsrcrelease>
<changelog>
<release>
<date>2016-09-24</date>
<version>
<release>1.3.0</release>
<api>1.1.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<notes>
New Features:
- Removed IS_UNICODE (PHP6) support
- Removed support for PHP &lt;5.3.3
- Timestamps encoded according to https://www.w3.org/TR/NOTE-datetime
Bugs Fixed:
- Various missing free calls (remicollet, bd808)
- Fix parameter parsing for yaml_emit_file
- Fix callback handling for yaml_emit_file
- Fix result of tag callback to be copied to aliases (ranvis)
- #71696 Bad datetime management
</notes>
</release>
<release>
<date>2015-05-18</date>
<version>
......
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.10.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<package packagerversion="1.10.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>yaml</name>
<channel>pecl.php.net</channel>
<summary>YAML-1.1 parser and emitter</summary>
......@@ -11,10 +11,10 @@
<email>bd808@bd808.com</email>
<active>yes</active>
</lead>
<date>2016-09-24</date>
<time>22:23:42</time>
<date>2017-07-29</date>
<time>21:56:18</time>
<version>
<release>2.0.0</release>
<release>2.0.2</release>
<api>2.0.0</api>
</version>
<stability>
......@@ -23,29 +23,12 @@
</stability>
<license uri="http://www.opensource.org/licenses/mit-license.php">MIT</license>
<notes>
Breaking changes:
- #69617 yaml.decode_php ini setting now defaults to false.
New Features:
- PHP7 compatible
- 2.x series will no longer support PHP5
Same as 2.0.1, but marked correctly as a stable release
Bugs Fixed:
- Premature free in y_write_object (remicollet)
- Uninitialized smart_str in convert_to_char (remicollet)
- Missing free in convert_to_char (remicollet)
- Use zend_* datatypes (weltling)
- Fix handling of optional encoding argument to yaml_emit_file (weltling)
- Removed PHP6 compat IS_UNICODE support (bd808)
- Fixed parameter parsing for yaml_emit_file()
- Fixed callback usage for yaml_emit_file()
- Use smart_str_free() instead of smart_string_free() (remicollet)
- #71045 zend_mm_alloc_small crashes with zend_string_alloc
- Fix handling of tag callbacks for aliased values (ranvis)
- Quick fix on handle_mapping. arrval should be used instead of retval (jabiinfante)
- #71696 Bad datetime management (bocharov)
- Fix memory leak in mapping with sequence (bocharov)
- Fix anchor in anchor problemo (bocharov)
- Fix tests bug_64019.phpt, bug_parsing_alias.phpt (bocharov)
- #72204 Crash when try to parse yaml file
- relax tests to pass with 7.1.4RC1 (remicollet)
- #74799 fix memory leak in apply_filter function (gleb-svitelskiy)
- #72540 fix crash in yaml_parse_url when stream/file is empty (bd808)
</notes>
<contents>
<dir name="/">
......@@ -60,6 +43,9 @@ Bugs Fixed:
<file md5sum="f6c960a97131bd744be0cd952765d37d" name="tests/bug_69616.phpt" role="test" />
<file md5sum="acbacecf44416c92c529c05df7b11178" name="tests/bug_69617.phpt" role="test" />
<file md5sum="564519979d063e32b2c64444b9937336" name="tests/bug_72204.phpt" role="test" />
<file md5sum="10a35e4c5d37b97dcfab1a15ee41d99b" name="tests/bug_72540.phpt" role="test" />
<file md5sum="a441d07b886238eb5554eb4b84f30579" name="tests/bug_74799.phpt" role="test" />
<file md5sum="f414defa20a7c12287b92c98d0cf785a" name="tests/bug_74799.yaml" role="test" />
<file md5sum="f90bce1519adfb85ebed8a92b0c05f3a" name="tests/bug_parsing_alias.phpt" role="test" />
<file md5sum="5b67d5243bb41d116d5832409dbab915" name="tests/yaml_001.phpt" role="test" />
<file md5sum="97b9fc72b36b77befe56227f9597483b" name="tests/yaml_002.phpt" role="test" />
......@@ -75,10 +61,10 @@ Bugs Fixed:
<file md5sum="55869db30b4bea6373d1b42ffa7a1941" name="tests/yaml_emit_file_basic.phpt" role="test" />
<file md5sum="693851ea1ae9da61ff4eaa2fc22858f9" name="tests/yaml_parse_001.phpt" role="test" />
<file md5sum="79931ca582f210d52940333fd5634ef6" name="tests/yaml_parse_002.phpt" role="test" />
<file md5sum="73bf63f0e2c50eea8ca771fc518277b7" name="tests/yaml_parse_003.phpt" role="test" />
<file md5sum="9504bf1a729c4fc49631286ea40635e6" name="tests/yaml_parse_004.phpt" role="test" />
<file md5sum="69e133a73c0e28898296d8d0d2072c69" name="tests/yaml_parse_003.phpt" role="test" />
<file md5sum="7251effa02be84da1f60d14bb3816f20" name="tests/yaml_parse_004.phpt" role="test" />
<file md5sum="85870bab774b9c38619b1f24cde2056a" name="tests/yaml_parse_005.phpt" role="test" />
<file md5sum="4057f347d2aee4c8ff3a1df580779615" name="tests/yaml_parse_006.phpt" role="test" />
<file md5sum="6b2183dcb18fa58f103ad8ace7368a43" name="tests/yaml_parse_006.phpt" role="test" />
<file md5sum="018cf98a77767995005b605f8501fcf5" name="tests/yaml_parse_007.phpt" role="test" />
<file md5sum="5880189756befa5b1e98b97d39c05a24" name="tests/yaml_parse_008.phpt" role="test" />
<file md5sum="b3da2bdf924b717f36b11d328b302102" name="tests/yaml_parse_file_001.phpt" role="test" />
......@@ -122,10 +108,10 @@ Bugs Fixed:
<file md5sum="3b0829d6cf6d46e20ad62965ab3ffecd" name="config.w32" role="src" />
<file md5sum="acb778006012a3c053353edbd89d4b99" name="detect.c" role="src" />
<file md5sum="0b94047361332d72489fa3c1d8b12706" name="emit.c" role="src" />
<file md5sum="c8c5e05541d55c60bfb8813995733165" name="parse.c" role="src" />
<file md5sum="9ed255597bb69865c04e4958e9675d5f" name="php_yaml.h" role="src" />
<file md5sum="f27a25db1172af8ea35f48d26e16bdb6" name="parse.c" role="src" />
<file md5sum="af54b3f88366b6865ef0beb317ff3cf7" name="php_yaml.h" role="src" />
<file md5sum="7e31af7d894f4dc0367e6a5c27a6a982" name="php_yaml_int.h" role="src" />
<file md5sum="c483e4e95ba5216da60dd0edda17dcc0" name="yaml.c" role="src" />
<file md5sum="0076972f2e9838e1b3a00c3c3cf42d54" name="yaml.c" role="src" />
</dir>
</contents>
<dependencies>
......@@ -148,6 +134,42 @@ Bugs Fixed:
<configureoption default="autodetect" name="with-yaml" prompt="Please provide the prefix of libyaml installation" />
</extsrcrelease>
<changelog>
<release>
<date>2016-09-24</date>
<version>
<release>2.0.0</release>
<api>2.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<notes>
Breaking changes:
- #69617 yaml.decode_php ini setting now defaults to false.
New Features:
- PHP7 compatible
- 2.x series will no longer support PHP5
Bugs Fixed:
- Premature free in y_write_object (remicollet)
- Uninitialized smart_str in convert_to_char (remicollet)
- Missing free in convert_to_char (remicollet)
- Use zend_* datatypes (weltling)
- Fix handling of optional encoding argument to yaml_emit_file (weltling)
- Removed PHP6 compat IS_UNICODE support (bd808)
- Fixed parameter parsing for yaml_emit_file()
- Fixed callback usage for yaml_emit_file()
- Use smart_str_free() instead of smart_string_free() (remicollet)
- #71045 zend_mm_alloc_small crashes with zend_string_alloc
- Fix handling of tag callbacks for aliased values (ranvis)
- Quick fix on handle_mapping. arrval should be used instead of retval (jabiinfante)
- #71696 Bad datetime management (bocharov)
- Fix memory leak in mapping with sequence (bocharov)
- Fix anchor in anchor problemo (bocharov)
- Fix tests bug_64019.phpt, bug_parsing_alias.phpt (bocharov)
- #72204 Crash when try to parse yaml file
</notes>
</release>
<release>
<date>2015-05-18</date>
<version>
......
......@@ -67,7 +67,7 @@ extern "C" {
extern "C" {
#endif
#define PHP_YAML_VERSION "1.3.0"
#define PHP_YAML_VERSION "1.3.1"
extern zend_module_entry yaml_module_entry;
#define phpext_yaml_ptr &yaml_module_entry
......
--TEST--
Test PECL bug #72540
--SKIPIF--
<?php if(!extension_loaded('yaml')) die('skip yaml n/a'); ?>
--FILE--
<?php
$tmpfname = tempnam(sys_get_temp_dir(), 'bug_72540.yaml');
var_dump(yaml_parse_url($tmpfname));
unlink($tmpfname);
?>
--EXPECT--
bool(false)
......@@ -529,6 +529,10 @@ PHP_FUNCTION(yaml_parse_url)
}
size = php_stream_copy_to_mem(stream, &input, PHP_STREAM_COPY_ALL, 0);
php_stream_close(stream);
if (input == NULL) {
RETURN_FALSE;
}
yaml_parser_initialize(&state.parser);
yaml_parser_set_input_string(&state.parser, (unsigned char *)input, size);
......@@ -541,7 +545,6 @@ PHP_FUNCTION(yaml_parse_url)
}
yaml_parser_delete(&state.parser);
php_stream_close(stream);
efree(input);
if (zndocs != NULL) {
......
......@@ -605,6 +605,7 @@ apply_filter(zval *zp, yaml_event_t event, HashTable *callbacks TSRMLS_DC)
/* cleanup our temp variables */
zval_ptr_dtor(&callback_args[1]);
zval_ptr_dtor(&callback_args[2]);
zend_string_release(tag_zstring);
if (FAILURE == callback_result || Z_TYPE_P(&retval) == IS_UNDEF) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
......@@ -630,6 +631,7 @@ apply_filter(zval *zp, yaml_event_t event, HashTable *callbacks TSRMLS_DC)
}
} else {
zend_string_release(tag_zstring);
return Y_FILTER_NONE;
}
}
......
......@@ -68,7 +68,7 @@ extern "C" {
extern "C" {
#endif
#define PHP_YAML_VERSION "2.0.0"
#define PHP_YAML_VERSION "2.0.2"
extern zend_module_entry yaml_module_entry;
#define phpext_yaml_ptr &yaml_module_entry
......
--TEST--
Test PECL bug #72540
--SKIPIF--
<?php if(!extension_loaded('yaml')) die('skip yaml n/a'); ?>
--FILE--
<?php
$tmpfname = tempnam(sys_get_temp_dir(), 'bug_72540.yaml');
var_dump(yaml_parse_url($tmpfname));
unlink($tmpfname);
?>
--EXPECT--
bool(false)
--TEST--
Memory leak check
--CREDITS--
Gleb Svitelskiy <gleb.svitelskiy@gmail.com>
--SKIPIF--
<?php if(!extension_loaded('yaml')) die('skip yaml n/a'); ?>
--FILE--
<?php
function tag_callback($value, $tag, $flags) {
return 'callback value';
}
$base_memory = memory_get_usage();
$yamlString ="---\nkey: !value\n...\n";
$ndocs = null;
yaml_parse($yamlString, 0, $ndocs, ['!value' => 'tag_callback']);
unset($yamlString, $ndocs);
$ndocs = null;
yaml_parse_file(__DIR__.'/bug_74799.yaml', 0, $ndocs, ['!value' => 'tag_callback']);
unset($ndocs);
$array = ['key' => 'value'];
yaml_emit($array);
unset($array);
$array = ['key' => 'value'];
yaml_emit_file(__DIR__.'/bug_74799.tmp', $array);
unset($array);
var_dump($base_memory == memory_get_usage());
?>
--CLEAN--
<?php
unlink(__DIR__.'/bug_74799.tmp');
?>
--EXPECT--
bool(true)
---
key:
!value
...
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment