Port for php8 (#8105)
* Port for php8
* Port php c extension for php8
* Update composer.json
* Drop php7.0 support
* Update phpunit for php7.1 in c extension test
* Add back support for php7.0
* Add badge for php8 continuous build
diff --git a/php/tests/DescriptorsTest.php b/php/tests/DescriptorsTest.php
index b2c5e01..ca7e8f3 100644
--- a/php/tests/DescriptorsTest.php
+++ b/php/tests/DescriptorsTest.php
@@ -205,22 +205,20 @@
$this->assertSame(self::GPBTYPE_ENUM, $mapDesc->getField(1)->getType());
}
- /**
- * @expectedException \Exception
- */
public function testFieldDescriptorEnumException()
{
+ $this->expectException(Exception::class);
+
$pool = DescriptorPool::getGeneratedPool();
$desc = $pool->getDescriptorByClassName(get_class(new TestDescriptorsMessage()));
$fieldDesc = $desc->getField(0);
$fieldDesc->getEnumType();
}
- /**
- * @expectedException \Exception
- */
public function testFieldDescriptorMessageException()
{
+ $this->expectException(Exception::class);
+
$pool = DescriptorPool::getGeneratedPool();
$desc = $pool->getDescriptorByClassName(get_class(new TestDescriptorsMessage()));
$fieldDesc = $desc->getField(0);