remo0ve semi-global PHP anntotation interfering with system values
authorMichael Wallner <mike@php.net>
Mon, 20 Dec 2021 15:30:52 +0000 (16:30 +0100)
committerMichael Wallner <mike@php.net>
Mon, 20 Dec 2021 15:30:52 +0000 (16:30 +0100)
ion_private.h
tests/serialize/backref.phpt
tests/serialize/basic.phpt
tests/serialize/enum.phpt
tests/serialize/magic.phpt
tests/serialize/popo.phpt
tests/serialize/serializable.phpt

index 72a39b1ba1628a9e6b706ac7132f1f29d1692b4c..342b1646867a5a1fac90335c7b682068de03cc5e 100644 (file)
@@ -1567,11 +1567,7 @@ static inline void php_ion_serialize_ex(php_ion_serializer *ser, zval *zv)
        }
 
        while (zv) {
-               /* start off with a global PHP annotation instead of repeating it all over the place */
-               if (0 == php_ion_globals_serializer_step()) {
-                       ION_STRING is;
-                       ION_CHECK(ion_writer_add_annotation(ser->writer, ion_string_assign_cstr(&is, ZEND_STRL("PHP"))));
-               }
+               php_ion_globals_serializer_step();
                php_ion_serialize_zval(ser, zv);
                php_ion_globals_serializer_exit();
 
index 97d14989ae2171851f90c2a030c1b1a432e640f8..4538ab53089b2dda66acb3f982110b00c8c84047 100644 (file)
@@ -24,12 +24,12 @@ debug_zval_dump($x);
 DONE
 --EXPECTF--
 TEST
-PHP::[R::r::0]
+[R::r::0]
 array(1) {
   [0]=>
   *RECURSION*
 }
-PHP::[[R::r::1],["a",r::4,o::{},r::5,[1,2,3],r::6],r::3,r::4,r::5,r::6]
+[[R::r::1],["a",r::4,o::{},r::5,[1,2,3],r::6],r::3,r::4,r::5,r::6]
 array(6) refcount(2){
   [0]=>
   array(1) refcount(2){
index 19bb0b2af509fdfccec27b7c3b4c1e03721f6459..24274cf780b026c2c29dabc9f0abbf739df01d74 100644 (file)
@@ -19,6 +19,6 @@ var_dump($data == ion\unserialize($s));
 DONE
 --EXPECTF--
 TEST
-PHP::{'null':null,bool:true,int:123,double:12%f,string:"foobar",object:o::{prop:"data"}}
+{'null':null,bool:true,int:123,double:12%f,string:"foobar",object:o::{prop:"data"}}
 bool(true)
 DONE
index 12a74118cf4f660d4e42b147a665afdf3912692e..9920fb98a14df21651504c2dbfc1e34fc4b37622 100644 (file)
@@ -32,10 +32,10 @@ var_dump(ion\unserialize($s));
 DONE
 --EXPECTF--
 TEST
-PHP::E::e::a
+E::e::a
 enum(e::a)
-PHP::E::i::b
+E::i::b
 enum(i::b)
-PHP::E::s::a
+E::s::a
 enum(s::a)
 DONE
index f7d1f93fd50479ab4ecadf1a2c5982125a89a798..443064be8067473959aa69625e2b1bc88b415951 100644 (file)
@@ -31,7 +31,7 @@ var_dump(ion\unserialize($s));
 DONE
 --EXPECTF--
 TEST
-PHP::O::magic::{priv:1,prot:2,pub:3}
+O::magic::{priv:1,prot:2,pub:3}
 object(magic)#%d (3) {
   ["priv":"magic":private]=>
   int(1)
index 1e09d2c93d3b50b037af46c2b6c7edbc711e4316..7d0da8b516b37c3f078a4b383f9605365737a3ff 100644 (file)
@@ -24,7 +24,7 @@ var_dump(ion\unserialize($s));
 DONE
 --EXPECTF--
 TEST
-PHP::c::popo::{priv:p::popo::1,prot:p::'*'::2,pub:3}
+c::popo::{priv:p::popo::1,prot:p::'*'::2,pub:3}
 object(popo)#%d (3) {
   ["priv":"popo":private]=>
   int(1)
index 0dc2cc78564f2597b15efc0d28449c78d61f2f04..efb9f27a1b8ab81e96e8567fd6d690397c2d67af 100644 (file)
@@ -59,7 +59,7 @@ Deprecated: test implements the Serializable interface, which is deprecated. Imp
 
 Deprecated: recursive implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %sserialize/serializable.php on line %d
 
-PHP::[S::test::"foobar",r::1]
+[S::test::"foobar",r::1]
 array(2) refcount(2){
   [0]=>
   object(test)#%d (1) refcount(2){
@@ -83,7 +83,7 @@ object(recursive)#%d (2) {
     NULL
   }
 }
-PHP::S::recursive::"node:S::recursive::\"leaf\""
+S::recursive::"node:S::recursive::\"leaf\""
 object(recursive)#%d (2) refcount(1){
   ["id":"recursive":private]=>
   string(4) "node" refcount(1)