mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Bump version dependencies on phpunit/phpunit to ">=11.5.0 <12.0.0"
PiperOrigin-RevId: 861973659
This commit is contained in:
parent
ffa7ac383c
commit
b9ab5812ce
8 changed files with 24 additions and 14 deletions
|
|
@ -9,7 +9,7 @@
|
|||
"php": ">=8.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=5.0.0 <8.5.27"
|
||||
"phpunit/phpunit": ">=11.5.0 <12.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "Need to support JSON deserialization"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"php": ">=8.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=5.0.0 <8.5.27"
|
||||
"phpunit/phpunit": ">=11.5.0 <12.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "Need to support JSON deserialization"
|
||||
|
|
|
|||
|
|
@ -629,6 +629,10 @@ class EncodeDecodeTest extends TestBase
|
|||
|
||||
$m = new TestMessage();
|
||||
$m->mergeFromString($payload);
|
||||
|
||||
// If execution reaches this line, it means no exception was thrown.
|
||||
// This assertion prevents PHPUnit from marking the test as risky.
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
public function testOverlyRecursiveMessage() {
|
||||
|
|
@ -1636,7 +1640,7 @@ class EncodeDecodeTest extends TestBase
|
|||
$this->assertEquals($defaultValue, $to->getOneofFieldUnwrapped());
|
||||
}
|
||||
|
||||
public function wrappersDataProvider()
|
||||
public static function wrappersDataProvider()
|
||||
{
|
||||
return [
|
||||
[TestInt32Value::class, 1, "1", 0, "0"],
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class GeneratedPhpdocTest extends TestBase
|
|||
);
|
||||
}
|
||||
|
||||
public function providePhpDocForEnum()
|
||||
public static function providePhpDocForEnum()
|
||||
{
|
||||
return [
|
||||
['getOptionalEnum', '\Foo\TestEnum'],
|
||||
|
|
@ -69,7 +69,7 @@ class GeneratedPhpdocTest extends TestBase
|
|||
}
|
||||
}
|
||||
|
||||
public function providePhpDocForGettersAndSetters()
|
||||
public static function providePhpDocForGettersAndSetters()
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ class PhpImplementationTest extends TestBase
|
|||
$m = new TestMessage([$fieldName => null]);
|
||||
}
|
||||
|
||||
public function provideArrayConstructorWithNullValuesThrowsException()
|
||||
public static function provideArrayConstructorWithNullValuesThrowsException()
|
||||
{
|
||||
return [
|
||||
['optional_bool'],
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ class PreviouslyGeneratedClassTest extends TestBase
|
|||
public function testPrefixForReservedWords()
|
||||
{
|
||||
// In newer versions of PHP, we cannot reference the old class name.
|
||||
if (version_compare(phpversion(), '8.2.0', '>=')) return;
|
||||
if (version_compare(phpversion(), '8.2.0', '>=')) {
|
||||
$this->markTestSkipped('readonly is reserved in PHP >= 8.2');
|
||||
}
|
||||
|
||||
// For older versions of PHP, verify that we can reference the
|
||||
// original class name.
|
||||
|
|
@ -20,5 +22,9 @@ class PreviouslyGeneratedClassTest extends TestBase
|
|||
$m = new \Previous\readonly();
|
||||
$this->assertTrue(true);
|
||||
');
|
||||
|
||||
// If execution reaches this line, it means no exception was thrown.
|
||||
// This assertion prevents PHPUnit from marking the test as risky.
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ class WellKnownTest extends TestBase {
|
|||
}
|
||||
}
|
||||
|
||||
public function enumNameValueConversionDataProvider()
|
||||
public static function enumNameValueConversionDataProvider()
|
||||
{
|
||||
return [
|
||||
['\Google\Protobuf\Field\Cardinality'],
|
||||
|
|
@ -467,7 +467,7 @@ class WellKnownTest extends TestBase {
|
|||
self::assertNull($reflectionProperty->getValue($testMessage));
|
||||
}
|
||||
|
||||
public function optionalFieldsDataProvider()
|
||||
public static function optionalFieldsDataProvider()
|
||||
{
|
||||
return [
|
||||
['true_optional_int32', 0],
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class WrapperTypeSettersTest extends TestBase
|
|||
}
|
||||
}
|
||||
|
||||
public function gettersAndSettersDataProvider()
|
||||
public static function gettersAndSettersDataProvider()
|
||||
{
|
||||
return [
|
||||
[TestWrapperSetters::class, DoubleValue::class, "setDoubleValue", "setDoubleValueUnwrapped", "getDoubleValue", "getDoubleValueUnwrapped", [
|
||||
|
|
@ -172,7 +172,7 @@ class WrapperTypeSettersTest extends TestBase
|
|||
(new TestWrapperSetters())->$setter($value);
|
||||
}
|
||||
|
||||
public function invalidSettersDataProvider()
|
||||
public static function invalidSettersDataProvider()
|
||||
{
|
||||
return [
|
||||
["setDoubleValueUnwrapped", "abc"],
|
||||
|
|
@ -224,7 +224,7 @@ class WrapperTypeSettersTest extends TestBase
|
|||
$this->assertEquals($expectedInstance->$getter()->getValue(), $actualInstance->$getter()->getValue());
|
||||
}
|
||||
|
||||
public function constructorWithWrapperTypeDataProvider()
|
||||
public static function constructorWithWrapperTypeDataProvider()
|
||||
{
|
||||
return [
|
||||
[TestWrapperSetters::class, DoubleValue::class, 'double_value', 'getDoubleValue', 1.1],
|
||||
|
|
@ -259,7 +259,7 @@ class WrapperTypeSettersTest extends TestBase
|
|||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
public function constructorWithRepeatedWrapperTypeDataProvider()
|
||||
public static function constructorWithRepeatedWrapperTypeDataProvider()
|
||||
{
|
||||
$sv7 = new StringValue(['value' => 'seven']);
|
||||
$sv8 = new StringValue(['value' => 'eight']);
|
||||
|
|
@ -304,7 +304,7 @@ class WrapperTypeSettersTest extends TestBase
|
|||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
public function constructorWithMapWrapperTypeDataProvider()
|
||||
public static function constructorWithMapWrapperTypeDataProvider()
|
||||
{
|
||||
$sv7 = new StringValue(['value' => 'seven']);
|
||||
$sv8 = new StringValue(['value' => 'eight']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue