diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9fe94fda2e2f1..c55039bae1a88 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -32,6 +32,52 @@ env: CC: ccache gcc CXX: ccache g++ jobs: + ALPINE: + if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + name: ALPINE_X64_ASAN_UBSAN_DEBUG_ZTS + runs-on: ubuntu-22.04 + container: + image: 'alpine:3.20.1' + steps: + - name: git checkout + uses: actions/checkout@v5 + - name: apk + uses: ./.github/actions/apk + - name: LLVM 17 (ASAN-only) + # libclang_rt.asan-x86_64.a is provided by compiler-rt, and only for clang17: + # https://pkgs.alpinelinux.org/contents?file=libclang_rt.asan-x86_64.a&path=&name=&branch=v3.20 + run: | + apk add clang17 compiler-rt + - name: System info + run: | + echo "::group::Show host CPU info" + lscpu + echo "::endgroup::" + echo "::group::Show installed package versions" + apk list + echo "::endgroup::" + - name: ./configure + uses: ./.github/actions/configure-alpine + with: + configurationParameters: >- + CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC" + LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function" + CC=clang-17 + CXX=clang++-17 + --enable-debug + --enable-zts + skipSlow: true # FIXME: This should likely include slow extensions + - name: make + run: make -j$(/usr/bin/nproc) >/dev/null + - name: make install + uses: ./.github/actions/install-alpine + - name: Test Tracing JIT + uses: ./.github/actions/test-alpine + with: + jitType: tracing + runTestsParameters: >- + --asan -x + -d opcache.enable_cli=1 LINUX_X64: if: github.repository == 'php/php-src' || github.event_name == 'pull_request' services: diff --git a/Zend/tests/enum/__sleep.phpt b/Zend/tests/enum/__sleep.phpt index 3a50304bef608..4da08e6a4d3f2 100644 --- a/Zend/tests/enum/__sleep.phpt +++ b/Zend/tests/enum/__sleep.phpt @@ -13,6 +13,4 @@ enum Foo { ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Fatal error: Enum Foo cannot include magic method __sleep in %s on line %d diff --git a/Zend/tests/enum/__wakeup.phpt b/Zend/tests/enum/__wakeup.phpt index 57b575e89f427..8aea17ae53fd3 100644 --- a/Zend/tests/enum/__wakeup.phpt +++ b/Zend/tests/enum/__wakeup.phpt @@ -13,6 +13,4 @@ enum Foo { ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Fatal error: Enum Foo cannot include magic method __wakeup in %s on line %d diff --git a/Zend/tests/lazy_objects/oss_fuzz_71446.phpt b/Zend/tests/lazy_objects/oss_fuzz_71446.phpt index 9d2f3283b9a22..ae2db55c73fc1 100644 --- a/Zend/tests/lazy_objects/oss_fuzz_71446.phpt +++ b/Zend/tests/lazy_objects/oss_fuzz_71446.phpt @@ -20,4 +20,3 @@ $obj = $reflector->newLazyProxy(function() { serialize($obj); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d diff --git a/Zend/tests/lazy_objects/serialize___sleep.phpt b/Zend/tests/lazy_objects/serialize___sleep.phpt index ac92fcb875ca1..d21f0fe09c97d 100644 --- a/Zend/tests/lazy_objects/serialize___sleep.phpt +++ b/Zend/tests/lazy_objects/serialize___sleep.phpt @@ -36,7 +36,6 @@ try { ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d Init on serialize and successful initialization string(27) "O:1:"C":1:{s:4:"%0C%0b";i:1;}" Init on serialize and failed initialization diff --git a/Zend/tests/lazy_objects/serialize___sleep_initializes.phpt b/Zend/tests/lazy_objects/serialize___sleep_initializes.phpt index fa7c99b5635fe..ec7657afc6916 100644 --- a/Zend/tests/lazy_objects/serialize___sleep_initializes.phpt +++ b/Zend/tests/lazy_objects/serialize___sleep_initializes.phpt @@ -37,7 +37,6 @@ $obj = $reflector->newLazyProxy(function ($obj) { test('Proxy', $obj); --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d # Ghost: string(11) "initializer" string(24) "O:1:"C":1:{s:1:"a";i:1;}" diff --git a/Zend/tests/lazy_objects/serialize___sleep_skip_flag.phpt b/Zend/tests/lazy_objects/serialize___sleep_skip_flag.phpt index 2e5bde97a5e6e..4641fb2a49ac3 100644 --- a/Zend/tests/lazy_objects/serialize___sleep_skip_flag.phpt +++ b/Zend/tests/lazy_objects/serialize___sleep_skip_flag.phpt @@ -35,7 +35,6 @@ $obj = $reflector->newLazyProxy(function ($obj) { test('Proxy', $obj); --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d # Ghost: string(12) "O:1:"C":0:{}" object(C)#%d (0) { diff --git a/Zend/tests/lazy_objects/serialize___sleep_skip_flag_may_initialize.phpt b/Zend/tests/lazy_objects/serialize___sleep_skip_flag_may_initialize.phpt index 06aeaf4f97b6b..ed909a875de47 100644 --- a/Zend/tests/lazy_objects/serialize___sleep_skip_flag_may_initialize.phpt +++ b/Zend/tests/lazy_objects/serialize___sleep_skip_flag_may_initialize.phpt @@ -38,7 +38,6 @@ $obj = $reflector->newLazyProxy(function ($obj) { test('Proxy', $obj); --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d # Ghost: string(11) "initializer" int(1) diff --git a/Zend/tests/serialize/bug34045.phpt b/Zend/tests/serialize/bug34045.phpt index 79625a82a7b8f..61886cf354b67 100644 --- a/Zend/tests/serialize/bug34045.phpt +++ b/Zend/tests/serialize/bug34045.phpt @@ -24,6 +24,5 @@ $db_str = serialize($db); $db2 = unserialize($db_str); echo "ok\n"; ?> ---EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- ok diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 480002f682e40..a0215611b610d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -9375,15 +9375,6 @@ static void zend_compile_class_decl(znode *result, zend_ast *ast, bool toplevel) ce->ce_flags |= ZEND_ACC_TOP_LEVEL; } - if (ce->__serialize == NULL && zend_hash_exists(&ce->function_table, ZSTR_KNOWN(ZEND_STR_SLEEP))) { - zend_error(E_DEPRECATED, "The __sleep() serialization magic method has been deprecated." - " Implement __serialize() instead (or in addition, if support for old PHP versions is necessary)"); - } - if (ce->__unserialize == NULL && zend_hash_exists(&ce->function_table, ZSTR_KNOWN(ZEND_STR_WAKEUP))) { - zend_error(E_DEPRECATED, "The __wakeup() serialization magic method has been deprecated." - " Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary)"); - } - /* We currently don't early-bind classes that implement interfaces or use traits */ if (!ce->num_interfaces && !ce->num_traits && !ce->num_hooked_prop_variance_checks #ifdef ZEND_OPCACHE_SHM_REATTACHMENT diff --git a/ext/date/tests/bug62852_var2.phpt b/ext/date/tests/bug62852_var2.phpt index 5e867873a31f2..4749d2a9bb21f 100644 --- a/ext/date/tests/bug62852_var2.phpt +++ b/ext/date/tests/bug62852_var2.phpt @@ -22,8 +22,6 @@ try { var_dump( $foo ); ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Fatal error: Uncaught Error: Invalid serialization data for DateTime object in %sbug62852_var2.php:%d Stack trace: #0 [internal function]: DateTime->__unserialize(Array) diff --git a/ext/date/tests/bug62852_var3.phpt b/ext/date/tests/bug62852_var3.phpt index 4130f3142fa62..7049efcebd84f 100644 --- a/ext/date/tests/bug62852_var3.phpt +++ b/ext/date/tests/bug62852_var3.phpt @@ -22,8 +22,6 @@ try { var_dump( $foo ); ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Fatal error: Uncaught Error: Invalid serialization data for DateTime object in %sbug62852_var3.php:%d Stack trace: #0 [internal function]: DateTime->__unserialize(Array) diff --git a/ext/dom/tests/gh8996.phpt b/ext/dom/tests/gh8996.phpt index 0706f2ecdecc3..62b7955bacf11 100644 --- a/ext/dom/tests/gh8996.phpt +++ b/ext/dom/tests/gh8996.phpt @@ -80,9 +80,6 @@ echo "Serialized:\n-----------\n$serialized\n-----------\nRestored:\n----------- ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d === __sleep and __wakeup === string(144) "O:34:"SerializableDomDocumentSleepWakeup":1:{s:43:"%0SerializableDomDocumentSleepWakeup%0xmlData";s:39:" value diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_class.phpt index 4ba394cc7cd34..20259b8d49299 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_class.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_class.phpt @@ -110,10 +110,6 @@ $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test_stmt_fetch_class'); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d Creating an object, serializing it and writing it to DB... myclass::singleton(Creating object) diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt index 455b04b4cb071..fd2b6cb5e4a77 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt @@ -107,10 +107,6 @@ $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test_stmt_fetch_serialize'); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d Creating an object, serializing it and writing it to DB... myclass::singleton(Creating object) diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_fetch_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_fetch_class.phpt index 175f2c69e26e0..1d3c7f69fab96 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_fetch_class.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_fetch_class.phpt @@ -110,10 +110,6 @@ $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test_stmt_fetchserialize_fetch_class'); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d Creating an object, serializing it and writing it to DB... myclass::singleton(Creating object) diff --git a/ext/phar/tests/phar_metadata_write3.phpt b/ext/phar/tests/phar_metadata_write3.phpt index bc3c5c45fe2f0..304ed65b46e9f 100644 --- a/ext/phar/tests/phar_metadata_write3.phpt +++ b/ext/phar/tests/phar_metadata_write3.phpt @@ -58,7 +58,6 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php.copy.php'); ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d Reading file contents through stream wrapper string(18) "contents of file a" Original metadata diff --git a/ext/phar/tests/phar_metadata_write4.phpt b/ext/phar/tests/phar_metadata_write4.phpt index 1d552ba284880..ad9f4d47d91c6 100644 --- a/ext/phar/tests/phar_metadata_write4.phpt +++ b/ext/phar/tests/phar_metadata_write4.phpt @@ -68,9 +68,6 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php.copy.php'); ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d In __destruct 1 string(1) "a" Loading metadata for 'a' without allowed_classes diff --git a/ext/spl/tests/SplObjectStorage/bug70365.phpt b/ext/spl/tests/SplObjectStorage/bug70365.phpt index 5e2ff3328ac3a..55ff58c9e9122 100644 --- a/ext/spl/tests/SplObjectStorage/bug70365.phpt +++ b/ext/spl/tests/SplObjectStorage/bug70365.phpt @@ -34,7 +34,6 @@ function ptr2str($ptr) } ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d array(5) { [0]=> int(1) diff --git a/ext/spl/tests/bug70366.phpt b/ext/spl/tests/bug70366.phpt index 955dea18e11b3..d3d3317bff370 100644 --- a/ext/spl/tests/bug70366.phpt +++ b/ext/spl/tests/bug70366.phpt @@ -34,7 +34,6 @@ function ptr2str($ptr) } ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d array(5) { [0]=> int(1) diff --git a/ext/standard/tests/serialize/001.phpt b/ext/standard/tests/serialize/001.phpt index b4d2f3e841da5..419a92e2117ab 100644 --- a/ext/standard/tests/serialize/001.phpt +++ b/ext/standard/tests/serialize/001.phpt @@ -78,9 +78,6 @@ $a = unserialize($data); var_dump($a); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d N; b:1; b:0; diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt index c33d6267d6d50..333c09525883c 100644 --- a/ext/standard/tests/serialize/005.phpt +++ b/ext/standard/tests/serialize/005.phpt @@ -128,14 +128,6 @@ echo "===AutoNA===\n"; var_dump(unserialize('O:22:"autoload_not_available":0:{}')); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d ===O1=== TestOld::__sleep() diff --git a/ext/standard/tests/serialize/__serialize_004.phpt b/ext/standard/tests/serialize/__serialize_004.phpt index ef1c8582743f0..66db8bf5044be 100644 --- a/ext/standard/tests/serialize/__serialize_004.phpt +++ b/ext/standard/tests/serialize/__serialize_004.phpt @@ -38,8 +38,7 @@ var_dump($s = serialize($obj)); var_dump(unserialize($s)); ?> ---EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- string(126) "O:6:"Wakeup":1:{s:4:"data";a:1:{i:0;O:11:"Unserialize":1:{i:0;O:6:"Wakeup":1:{s:4:"data";a:1:{i:0;O:11:"Unserialize":0:{}}}}}}" __unserialize() called array(0) { diff --git a/ext/standard/tests/serialize/bug14293.phpt b/ext/standard/tests/serialize/bug14293.phpt index 5c7b19906c91a..c52ced3d0f3d4 100644 --- a/ext/standard/tests/serialize/bug14293.phpt +++ b/ext/standard/tests/serialize/bug14293.phpt @@ -26,7 +26,6 @@ var_dump($t); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d __sleep called Warning: serialize(): "b" returned as member variable from __sleep() but does not exist in %s on line %d diff --git a/ext/standard/tests/serialize/bug21957.phpt b/ext/standard/tests/serialize/bug21957.phpt index b3bd73c661ffb..9d761a6699c96 100644 --- a/ext/standard/tests/serialize/bug21957.phpt +++ b/ext/standard/tests/serialize/bug21957.phpt @@ -28,8 +28,7 @@ echo $s . "\n"; var_dump(unserialize($s)); ?> ---EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- array(2) { ["one"]=> string(3) "ABC" diff --git a/ext/standard/tests/serialize/bug35895.phpt b/ext/standard/tests/serialize/bug35895.phpt index 003b8eb5f0873..de7ff6d3e1a4f 100644 --- a/ext/standard/tests/serialize/bug35895.phpt +++ b/ext/standard/tests/serialize/bug35895.phpt @@ -21,8 +21,4 @@ serialize($obj); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Warning: serialize(): "parents" returned as member variable from __sleep() but does not exist in %s on line %d diff --git a/ext/standard/tests/serialize/bug64354_2.phpt b/ext/standard/tests/serialize/bug64354_2.phpt index ddb81af8be476..675305132157e 100644 --- a/ext/standard/tests/serialize/bug64354_2.phpt +++ b/ext/standard/tests/serialize/bug64354_2.phpt @@ -20,6 +20,5 @@ try { var_dump($e->getMessage()); } ?> ---EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- string(6) "Failed" diff --git a/ext/standard/tests/serialize/bug64354_3.phpt b/ext/standard/tests/serialize/bug64354_3.phpt index 195ca32e376e0..e3832e653bbfb 100644 --- a/ext/standard/tests/serialize/bug64354_3.phpt +++ b/ext/standard/tests/serialize/bug64354_3.phpt @@ -26,7 +26,5 @@ try { } ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d string(6) "Failed" diff --git a/ext/standard/tests/serialize/bug65806.phpt b/ext/standard/tests/serialize/bug65806.phpt index 3059959b1f448..166b694442b78 100644 --- a/ext/standard/tests/serialize/bug65806.phpt +++ b/ext/standard/tests/serialize/bug65806.phpt @@ -73,10 +73,7 @@ function check(myObjC $obj) { return 'successful'; } ?> ---EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- SCRIPT START check successful start serialize/unserialize diff --git a/ext/standard/tests/serialize/bug68976.phpt b/ext/standard/tests/serialize/bug68976.phpt index 4d60bc6b7feb3..514bd8b453fda 100644 --- a/ext/standard/tests/serialize/bug68976.phpt +++ b/ext/standard/tests/serialize/bug68976.phpt @@ -25,8 +25,7 @@ for($i = 0; $i < 5; $i++) { var_dump($data); ?> ---EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- array(2) { [0]=> object(evilClass)#1 (0) { diff --git a/ext/standard/tests/serialize/bug69210.phpt b/ext/standard/tests/serialize/bug69210.phpt index 30ea71b28deb1..41cc8f55f9a5d 100644 --- a/ext/standard/tests/serialize/bug69210.phpt +++ b/ext/standard/tests/serialize/bug69210.phpt @@ -34,10 +34,7 @@ echo $si . "\n"; var_dump(unserialize($ss)); var_dump(unserialize($si)); ?> ---EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- O:10:"testString":1:{s:1:"a";b:1;} O:11:"testInteger":1:{s:1:"a";b:1;} object(testString)#3 (1) { diff --git a/ext/standard/tests/serialize/bug69425.phpt b/ext/standard/tests/serialize/bug69425.phpt index 6199ba394b44d..1bc79c0387c8c 100644 --- a/ext/standard/tests/serialize/bug69425.phpt +++ b/ext/standard/tests/serialize/bug69425.phpt @@ -23,7 +23,6 @@ var_dump($data); ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d int(1) array(2) { [0]=> diff --git a/ext/standard/tests/serialize/bug70172_2.phpt b/ext/standard/tests/serialize/bug70172_2.phpt index 9730d44cfc6ff..27e77951fe37c 100644 --- a/ext/standard/tests/serialize/bug70172_2.phpt +++ b/ext/standard/tests/serialize/bug70172_2.phpt @@ -48,9 +48,7 @@ function ptr2str($ptr) } ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: obj implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d array(2) { [0]=> object(obj2)#%d (1) { diff --git a/ext/standard/tests/serialize/bug70513.phpt b/ext/standard/tests/serialize/bug70513.phpt index c45f61353ffbc..9a93a3359b678 100644 --- a/ext/standard/tests/serialize/bug70513.phpt +++ b/ext/standard/tests/serialize/bug70513.phpt @@ -26,8 +26,7 @@ var_dump($x); var_dump($obj); ?> ---EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- array(1) { [0]=> int(1) diff --git a/ext/standard/tests/serialize/bug71995.phpt b/ext/standard/tests/serialize/bug71995.phpt index 032a198d261a1..9d51ace750e13 100644 --- a/ext/standard/tests/serialize/bug71995.phpt +++ b/ext/standard/tests/serialize/bug71995.phpt @@ -18,8 +18,6 @@ var_dump($s); var_dump(unserialize($s)); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Warning: serialize(): "b" is returned from __sleep() multiple times in %s on line %d string(39) "O:1:"A":1:{s:1:"b";O:8:"stdClass":0:{}}" object(A)#%d (1) { diff --git a/ext/standard/tests/serialize/bug72663.phpt b/ext/standard/tests/serialize/bug72663.phpt index b92f3a1c50426..ce767973e97f1 100644 --- a/ext/standard/tests/serialize/bug72663.phpt +++ b/ext/standard/tests/serialize/bug72663.phpt @@ -49,10 +49,6 @@ try { ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Warning: unserialize(): Error at offset 17 of 24 bytes in %s on line %d bool(false) diff --git a/ext/standard/tests/serialize/bug72731.phpt b/ext/standard/tests/serialize/bug72731.phpt index f13103288873f..9489928cfb128 100644 --- a/ext/standard/tests/serialize/bug72731.phpt +++ b/ext/standard/tests/serialize/bug72731.phpt @@ -15,5 +15,4 @@ var_dump(unserialize($poc)); ?> --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d %s(73588229205) diff --git a/ext/standard/tests/serialize/bug73154.phpt b/ext/standard/tests/serialize/bug73154.phpt index 8caf5a7013c11..8d0f188bf7f34 100644 --- a/ext/standard/tests/serialize/bug73154.phpt +++ b/ext/standard/tests/serialize/bug73154.phpt @@ -12,6 +12,5 @@ class a { $s = 'a:1:{i:0;O:1:"a":1:{s:1:"a";R:2;}}'; var_dump(serialize(unserialize($s))); ?> ---EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- string(22) "a:1:{i:0;O:1:"a":0:{}}" diff --git a/ext/standard/tests/serialize/bug79526.phpt b/ext/standard/tests/serialize/bug79526.phpt index e2e3154dadae8..440c18772d53d 100644 --- a/ext/standard/tests/serialize/bug79526.phpt +++ b/ext/standard/tests/serialize/bug79526.phpt @@ -24,10 +24,6 @@ serialize(new B()); ?> Done --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Warning: serialize(): A::__sleep() should return an array only containing the names of instance-variables to serialize in %s on line %d Warning: serialize(): B::__sleep() should return an array only containing the names of instance-variables to serialize in %s on line %d diff --git a/ext/standard/tests/serialize/bug81163.phpt b/ext/standard/tests/serialize/bug81163.phpt index a223188b2fd45..855fc1c953ed2 100644 --- a/ext/standard/tests/serialize/bug81163.phpt +++ b/ext/standard/tests/serialize/bug81163.phpt @@ -18,6 +18,4 @@ class bar extends foo serialize(new bar()); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Warning: serialize(): bar::__sleep() should return an array only containing the names of instance-variables to serialize in %s on line %d diff --git a/ext/standard/tests/serialize/gh12265b.phpt b/ext/standard/tests/serialize/gh12265b.phpt index 83c2603d71376..22246b4e47920 100644 --- a/ext/standard/tests/serialize/gh12265b.phpt +++ b/ext/standard/tests/serialize/gh12265b.phpt @@ -42,7 +42,6 @@ printf("serialized temp : %s\n", $stc); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d serialized original: O:1:"B":1:{s:1:"a";O:1:"A":1:{s:1:"x";r:1;}} serialized temp : O:1:"B":1:{s:1:"a";O:1:"A":1:{s:1:"x";r:1;}} serialized original: O:1:"C":1:{s:1:"b";O:1:"B":1:{s:1:"a";O:1:"A":1:{s:1:"x";r:2;}}} diff --git a/ext/standard/tests/serialize/gh19701.phpt b/ext/standard/tests/serialize/gh19701.phpt index a8c1d53c6e376..d7ef08e20331b 100644 --- a/ext/standard/tests/serialize/gh19701.phpt +++ b/ext/standard/tests/serialize/gh19701.phpt @@ -27,5 +27,4 @@ echo serialize($data), "\n"; ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d a:2:{i:0;O:4:"Item":2:{s:8:"children";a:1:{i:0;O:4:"Item":2:{s:8:"children";a:0:{}s:6:"parent";O:4:"Item":2:{s:8:"children";a:1:{i:0;r:4;}s:6:"parent";N;}}}s:6:"parent";N;}i:1;r:6;} diff --git a/ext/standard/tests/serialize/sleep_deprecation_promoted_exception.phpt b/ext/standard/tests/serialize/sleep_deprecation_promoted_exception.phpt deleted file mode 100644 index e0e32c3b4edc6..0000000000000 --- a/ext/standard/tests/serialize/sleep_deprecation_promoted_exception.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -__sleep() deprecation promoted to exception ---FILE-- -getMessage(), PHP_EOL; -} - -?> ---EXPECT-- -ErrorException: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) diff --git a/ext/standard/tests/serialize/sleep_deprecation_promoted_exception2.inc b/ext/standard/tests/serialize/sleep_deprecation_promoted_exception2.inc deleted file mode 100644 index af121bc44d70e..0000000000000 --- a/ext/standard/tests/serialize/sleep_deprecation_promoted_exception2.inc +++ /dev/null @@ -1,7 +0,0 @@ -getMessage(), PHP_EOL; -} - -?> ---EXPECT-- -ErrorException: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) diff --git a/ext/standard/tests/serialize/sleep_deref.phpt b/ext/standard/tests/serialize/sleep_deref.phpt index 9beb0ba0dc933..36777db0a358c 100644 --- a/ext/standard/tests/serialize/sleep_deref.phpt +++ b/ext/standard/tests/serialize/sleep_deref.phpt @@ -14,6 +14,5 @@ class Test { var_dump(serialize(new Test)); ?> ---EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- string(28) "O:4:"Test":1:{s:1:"x";i:42;}" diff --git a/ext/standard/tests/serialize/sleep_mangled_name_clash.phpt b/ext/standard/tests/serialize/sleep_mangled_name_clash.phpt index 2e4d47c661eef..eef5949abbe57 100644 --- a/ext/standard/tests/serialize/sleep_mangled_name_clash.phpt +++ b/ext/standard/tests/serialize/sleep_mangled_name_clash.phpt @@ -12,7 +12,5 @@ $s = serialize(new Test); var_dump(str_replace("\0", '\0', $s)); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Warning: serialize(): "priv" is returned from __sleep() multiple times in %s on line %d string(37) "O:4:"Test":1:{s:10:"\0Test\0priv";N;}" diff --git a/ext/standard/tests/serialize/sleep_undefined_declared_properties.phpt b/ext/standard/tests/serialize/sleep_undefined_declared_properties.phpt index c660b051b7830..3c7f802e670b6 100644 --- a/ext/standard/tests/serialize/sleep_undefined_declared_properties.phpt +++ b/ext/standard/tests/serialize/sleep_undefined_declared_properties.phpt @@ -21,8 +21,6 @@ var_dump(serialize(new Test)); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Warning: serialize(): "pub" returned as member variable from __sleep() but does not exist in %s on line %d Warning: serialize(): "prot" returned as member variable from __sleep() but does not exist in %s on line %d diff --git a/ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt b/ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt index 1c444a7dfda44..ebef92ca188ae 100644 --- a/ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt +++ b/ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt @@ -32,8 +32,7 @@ var_dump(unserialize(serialize($t)) == $t); var_dump($t); ?> ---EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- string(15) "O:4:"Test":0:{}" bool(true) bool(true) diff --git a/ext/standard/tests/serialize/wakeup_deprecation_promoted_exception.phpt b/ext/standard/tests/serialize/wakeup_deprecation_promoted_exception.phpt deleted file mode 100644 index 2535148bd7d3d..0000000000000 --- a/ext/standard/tests/serialize/wakeup_deprecation_promoted_exception.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -__wakeup() deprecation promoted to exception ---FILE-- -getMessage(), PHP_EOL; -} - -?> ---EXPECT-- -ErrorException: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) diff --git a/ext/standard/tests/serialize/wakeup_deprecation_promoted_exception2.inc b/ext/standard/tests/serialize/wakeup_deprecation_promoted_exception2.inc deleted file mode 100644 index b4f8b7e42940c..0000000000000 --- a/ext/standard/tests/serialize/wakeup_deprecation_promoted_exception2.inc +++ /dev/null @@ -1,7 +0,0 @@ -getMessage(), PHP_EOL; -} - -?> ---EXPECT-- -ErrorException: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) - diff --git a/ext/standard/tests/strings/bug72663_3.phpt b/ext/standard/tests/strings/bug72663_3.phpt index d4f157cb7877e..bcec2b182a1da 100644 --- a/ext/standard/tests/strings/bug72663_3.phpt +++ b/ext/standard/tests/strings/bug72663_3.phpt @@ -14,7 +14,5 @@ unserialize($poc); ?> DONE --EXPECTF-- -Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Warning: unserialize(): Error at offset 50 of 50 bytes in %s on line %d DONE diff --git a/tests/classes/bug26737.phpt b/tests/classes/bug26737.phpt index 230422fc07462..ea7ae1ed9a1cc 100644 --- a/tests/classes/bug26737.phpt +++ b/tests/classes/bug26737.phpt @@ -18,7 +18,5 @@ $data = serialize($foo); var_dump(str_replace("\0", '\0', $data)); ?> --EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d - Warning: serialize(): "no_such" returned as member variable from __sleep() but does not exist in %s on line %d string(114) "O:3:"foo":3:{s:12:"\0foo\0private";s:7:"private";s:12:"\0*\0protected";s:9:"protected";s:6:"public";s:6:"public";}" diff --git a/tests/classes/private_members_serialization.phpt b/tests/classes/private_members_serialization.phpt index 2a4039411b0c5..1b04b6f59c723 100644 --- a/tests/classes/private_members_serialization.phpt +++ b/tests/classes/private_members_serialization.phpt @@ -19,6 +19,5 @@ class bar extends foo var_dump(str_replace("\0", '\0', serialize(new bar()))); ?> ---EXPECTF-- -Deprecated: The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d +--EXPECT-- string(114) "O:3:"bar":3:{s:12:"\0foo\0private";s:7:"private";s:12:"\0*\0protected";s:9:"protected";s:6:"public";s:6:"public";}"