Php 7.3 fix (#5434) * Inherit from message instead of implement When regestering class (implmenets other class) during MINIT, zend_class_implements would call zend_class_entry->interface_gets_implemented(). In PHP-7.3 interface_gets_implemented shares the same location with create_object. However, during MINIT, the global object storeage hasn't been initialized. And thus, caused segment fault in php 7.3. * Use zend_string_init where interned string may be the value. zend_string_dup will keep using the existing interned string. In php 7.3, interned string cannot be destroyed from user's code. * Uncommment debug code * Use latest phpunit for each php versions * Revert change in Dockerfile * Update php test to use the new docker image * Update composer * Change docker organization * Update phpunit * Debug phpunit * Store phpunit into bin dir in docker image * Install valgrind to docker * Fix compatibility test * Remove generated_service_test from compatibility c extension test * Update 32bit php test to the new docker image * Install bison * Fix build.sh * Fix DOCKERIMAGE_PREFIX * Fix basename * Add comment to build_and_run_docker2.sh * Remove commented code * Fix comments
diff --git a/php/tests/encode_decode_test.php b/php/tests/encode_decode_test.php index 8168eeb..06f9a90 100644 --- a/php/tests/encode_decode_test.php +++ b/php/tests/encode_decode_test.php
@@ -31,6 +31,7 @@ { $m = new TestMessage(); $m->mergeFromJsonString("{\"optionalInt32\":1}"); + $this->assertEquals(1, $m->getOptionalInt32()); } public function testDecodeTopLevelBoolValue() @@ -276,6 +277,7 @@ $to = new TestPackedMessage(); $to->mergeFromString(TestUtil::getGoldenTestPackedMessage()); TestUtil::assertTestPackedMessage($to); + $this->assertTrue(true); } public function testPackedDecodeUnpacked() @@ -283,6 +285,7 @@ $to = new TestPackedMessage(); $to->mergeFromString(TestUtil::getGoldenTestUnpackedMessage()); TestUtil::assertTestPackedMessage($to); + $this->assertTrue(true); } public function testUnpackedEncode() @@ -298,6 +301,7 @@ $to = new TestUnpackedMessage(); $to->mergeFromString(TestUtil::getGoldenTestPackedMessage()); TestUtil::assertTestPackedMessage($to); + $this->assertTrue(true); } public function testUnpackedDecodeUnpacked() @@ -305,6 +309,7 @@ $to = new TestUnpackedMessage(); $to->mergeFromString(TestUtil::getGoldenTestUnpackedMessage()); TestUtil::assertTestPackedMessage($to); + $this->assertTrue(true); } public function testDecodeInt64() @@ -361,6 +366,7 @@ $data = hex2bin('c80501'); $m = new TestMessage(); $m->mergeFromString($data); + $this->assertTrue(true); } public function testEncodeNegativeInt32()