summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-06-16 09:33:59 +0200
committerRemi Collet <fedora@famillecollet.com>2014-06-16 09:33:59 +0200
commit7a2722dd3dc7948cb124f1e709bbe5678e9ac486 (patch)
tree48a2d11b2634f1ff584b4d094ec4afc59a4410da
parent1a65e7f8823e02cd7295385d85157c8c991f10cc (diff)
php 5.6: test build
-rw-r--r--php-serialize.patch121
-rw-r--r--php56.spec7
2 files changed, 127 insertions, 1 deletions
diff --git a/php-serialize.patch b/php-serialize.patch
new file mode 100644
index 0000000..4de9a30
--- /dev/null
+++ b/php-serialize.patch
@@ -0,0 +1,121 @@
+diff -up ./ext/spl/spl_array.c.serialize ./ext/spl/spl_array.c
+--- ./ext/spl/spl_array.c.serialize 2014-06-04 03:22:06.000000000 +0200
++++ ./ext/spl/spl_array.c 2014-06-16 09:06:10.821885032 +0200
+@@ -1749,7 +1749,6 @@ SPL_METHOD(Array, unserialize)
+ }
+
+ if (buf_len == 0) {
+- zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Empty serialized string cannot be empty");
+ return;
+ }
+
+diff -up ./ext/spl/spl_dllist.c.serialize ./ext/spl/spl_dllist.c
+--- ./ext/spl/spl_dllist.c.serialize 2014-06-16 09:06:10.822885036 +0200
++++ ./ext/spl/spl_dllist.c 2014-06-16 09:07:01.601098042 +0200
+@@ -1192,7 +1192,6 @@ SPL_METHOD(SplDoublyLinkedList, unserial
+ }
+
+ if (buf_len == 0) {
+- zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Serialized string cannot be empty");
+ return;
+ }
+
+diff -up ./ext/spl/spl_observer.c.serialize ./ext/spl/spl_observer.c
+--- ./ext/spl/spl_observer.c.serialize 2014-06-04 03:22:06.000000000 +0200
++++ ./ext/spl/spl_observer.c 2014-06-16 09:06:10.823885040 +0200
+@@ -831,7 +831,6 @@ SPL_METHOD(SplObjectStorage, unserialize
+ }
+
+ if (buf_len == 0) {
+- zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Empty serialized string cannot be empty");
+ return;
+ }
+
+diff -up ./ext/spl/tests/ArrayObject_unserialize_empty_string.phpt.serialize ./ext/spl/tests/ArrayObject_unserialize_empty_string.phpt
+--- ./ext/spl/tests/ArrayObject_unserialize_empty_string.phpt.serialize 2014-06-04 03:22:06.000000000 +0200
++++ ./ext/spl/tests/ArrayObject_unserialize_empty_string.phpt 2014-06-16 09:06:10.824885044 +0200
+@@ -1,5 +1,5 @@
+ --TEST--
+-ArrayObject: test that you cannot unserialize a empty string
++ArrayObject: test that you can unserialize a empty string
+ --CREDITS--
+ Havard Eide <nucleuz@gmail.com>
+ #PHPTestFest2009 Norway 2009-06-09 \o/
+@@ -8,9 +8,6 @@ Havard Eide <nucleuz@gmail.com>
+ $a = new ArrayObject(array());
+ $a->unserialize("");
+ ?>
++Done
+ --EXPECTF--
+-Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Empty serialized string cannot be empty' in %s.php:%d
+-Stack trace:
+-#0 %s(%d): ArrayObject->unserialize('')
+-#1 {main}
+- thrown in %s.php on line %d
++Done
+diff -up ./ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt.serialize ./ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt
+--- ./ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt.serialize 2014-06-04 03:22:06.000000000 +0200
++++ ./ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt 2014-06-16 09:06:10.824885044 +0200
+@@ -1,5 +1,5 @@
+ --TEST--
+-Check that SplObjectStorage::unserialize throws exception when NULL passed
++Check that SplObjectStorage::unserialize doesn't throws exception when NULL passed
+ --CREDITS--
+ PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+ --FILE--
+@@ -14,6 +14,6 @@ try {
+ }
+
+ ?>
++Done
+ --EXPECTF--
+-Empty serialized string cannot be empty
+-
++Done
+diff -up ./ext/spl/tests/unserialize.phpt.serialize ./ext/spl/tests/unserialize.phpt
+--- ./ext/spl/tests/unserialize.phpt.serialize 2014-06-16 09:06:10.824885044 +0200
++++ ./ext/spl/tests/unserialize.phpt 2014-06-16 09:06:10.824885044 +0200
+@@ -0,0 +1,43 @@
++--TEST--
++SPL: unserialize with no data (for PHPUnit)
++--FILE--
++<?php
++
++$types = array('SplDoublyLinkedList', 'SplObjectStorage', 'ArrayObject');
++
++foreach ($types as $type) {
++ // serialize an empty new object
++ $exp = serialize(new $type());
++ // hack to instanciate an object without constructor
++ $str = sprintf('C:%d:"%s":0:{}', strlen($type), $type);
++ $obj = unserialize($str);
++ var_dump($obj);
++ // serialize result
++ $out = serialize($obj);
++ // both should match
++ var_dump($exp === $out);
++}
++?>
++===DONE===
++--EXPECTF--
++object(SplDoublyLinkedList)#%d (2) {
++ ["flags":"SplDoublyLinkedList":private]=>
++ int(0)
++ ["dllist":"SplDoublyLinkedList":private]=>
++ array(0) {
++ }
++}
++bool(true)
++object(SplObjectStorage)#%d (1) {
++ ["storage":"SplObjectStorage":private]=>
++ array(0) {
++ }
++}
++bool(true)
++object(ArrayObject)#%d (1) {
++ ["storage":"ArrayObject":private]=>
++ array(0) {
++ }
++}
++bool(true)
++===DONE===
diff --git a/php56.spec b/php56.spec
index d708280..72e460b 100644
--- a/php56.spec
+++ b/php56.spec
@@ -124,7 +124,7 @@ Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: 5.6.0
%if 0%{?snapdate:1}%{?rcver:1}
-Release: 0.11.%{?snapdate}%{?rcver}%{?dist}
+Release: 0.12.%{?snapdate}%{?rcver}%{?dist}
%else
Release: 1%{?dist}
%endif
@@ -203,6 +203,7 @@ Patch302: php-5.6.0-noNO.patch
Patch303: php-5.6.0-openssl.patch
# WIP
+Patch400: php-serialize.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -937,6 +938,7 @@ rm -rf ext/json
%patch303 -p0 -b .md4md5
# WIP patch
+%patch400 -p0 -b .serialize
# Prevent %%doc confusion over LICENSE files
cp Zend/LICENSE Zend/ZEND_LICENSE
@@ -1926,6 +1928,9 @@ fi
%changelog
+* Mon Jun 16 2014 Remi Collet <rcollet@redhat.com> 5.6.0-0.12.beta4
+- test build for serialize
+
* Tue Jun 10 2014 Remi Collet <rcollet@redhat.com> 5.6.0-0.11.beta4
- test build for bug 67410, 67411, 67412, 67413
- fix 67392, dtrace breaks argument unpack