Remove old PHP extension (#7695)
* Removed references to legacy class names from generated code.
* Removed old PHP extension in favor of new extension. This drops PHP5 compat.
* Updated failure lists for things fixed by the new extension.
* Updated Makefile.am for new file list.
* Fix distcheck.
diff --git a/php/tests/compile_extension.sh b/php/tests/compile_extension.sh
index 37c6810..5834249 100755
--- a/php/tests/compile_extension.sh
+++ b/php/tests/compile_extension.sh
@@ -12,18 +12,9 @@
CFLAGS="-g -O0 -Wall"
fi
-
pushd ../ext/google/protobuf
phpize --clean
rm -f configure.in configure.ac
+php make-preload.php
phpize && ./configure --with-php-config=$(which php-config) CFLAGS="$CFLAGS" && make
popd
-
-if [ $(php -r "echo PHP_VERSION;" | cut -c1) != "5" ]; then
- pushd ../ext/google/protobuf2
- phpize --clean
- rm -f configure.in configure.ac
- php make-preload.php
- phpize && ./configure --with-php-config=$(which php-config) CFLAGS="$CFLAGS" && make
- popd
-fi
diff --git a/php/tests/php_implementation_test.php b/php/tests/php_implementation_test.php
index 307b749..db3c361 100644
--- a/php/tests/php_implementation_test.php
+++ b/php/tests/php_implementation_test.php
@@ -538,7 +538,7 @@
/**
* @expectedException Exception
- * @expectedExceptionMessage Expect Foo\TestMessage_Sub.
+ * @expectedExceptionMessage Expect Foo\TestMessage\Sub.
*/
public function testArraysForMessagesThrowsException()
{
diff --git a/php/tests/test.sh b/php/tests/test.sh
index b1d8d5f..b10b57f 100755
--- a/php/tests/test.sh
+++ b/php/tests/test.sh
@@ -8,14 +8,9 @@
./compile_extension.sh
PHP_VERSION=$(php -r "echo PHP_VERSION;")
-TEST_NEW_EXTENSION=true
# Each version of PHPUnit supports a fairly narrow range of PHP versions.
case "$PHP_VERSION" in
- 5.*.*)
- PHPUNIT=phpunit-5.6.8.phar
- TEST_NEW_EXTENSION=false
- ;;
7.0.*|7.1.*|7.2.*)
# Oddly older than for 5.6. Not sure the reason.
PHPUNIT=phpunit-5.6.0.phar
@@ -24,7 +19,7 @@
PHPUNIT=phpunit-8.phar
;;
*)
- echo "ERROR: Unknown PHP version $PHP_VERSION"
+ echo "ERROR: Unsupported PHP version $PHP_VERSION"
exit 1
;;
esac
@@ -39,9 +34,6 @@
echo "* $t"
echo "****************************"
php -dextension=../ext/google/protobuf/modules/protobuf.so $PHPUNIT --bootstrap autoload.php $t
- if [ "$TEST_NEW_EXTENSION" = "true" ]; then
- php -dextension=../ext/google/protobuf2/modules/protobuf.so $PHPUNIT --bootstrap autoload.php $t
- fi
echo ""
done
@@ -51,9 +43,6 @@
echo "* $t persistent"
echo "****************************"
php -d protobuf.keep_descriptor_pool_after_request=1 -dextension=../ext/google/protobuf/modules/protobuf.so $PHPUNIT --bootstrap autoload.php $t
- if [ "$TEST_NEW_EXTENSION" = "true" ]; then
- php -d protobuf.keep_descriptor_pool_after_request=1 -dextension=../ext/google/protobuf2/modules/protobuf.so $PHPUNIT --bootstrap autoload.php $t
- fi
echo ""
done
@@ -64,10 +53,6 @@
export USE_ZEND_ALLOC=0
valgrind --leak-check=yes php -dextension=../ext/google/protobuf/modules/protobuf.so memory_leak_test.php
valgrind --leak-check=yes php -d protobuf.keep_descriptor_pool_after_request=1 -dextension=../ext/google/protobuf/modules/protobuf.so memory_leak_test.php
-if [ "$TEST_NEW_EXTENSION" = "true" ]; then
- valgrind --leak-check=yes php -dextension=../ext/google/protobuf2/modules/protobuf.so memory_leak_test.php
- valgrind --leak-check=yes php -d protobuf.keep_descriptor_pool_after_request=1 -dextension=../ext/google/protobuf2/modules/protobuf.so memory_leak_test.php
-fi
# TODO(teboring): Only for debug (phpunit has memory leak which blocks this beging used by
# regresssion test.)