diff --git a/composer.json b/composer.json index 430d4b009f5..c4e1e7ecb8b 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "silverstripe/template-engine": "^1", "silverstripe/vendor-plugin": "^2", "sminnee/callbacklist": "^0.1.1", - "symfony/cache": "^7.0", + "symfony/cache": "^7.1.5", "symfony/config": "^7.0", "symfony/console": "^7.0", "symfony/dom-crawler": "^7.0", diff --git a/tests/php/ORM/DataObjectTest.php b/tests/php/ORM/DataObjectTest.php index f71787a16e7..a5996a5aa24 100644 --- a/tests/php/ORM/DataObjectTest.php +++ b/tests/php/ORM/DataObjectTest.php @@ -4,6 +4,7 @@ use InvalidArgumentException; use LogicException; +use PHPUnit\Framework\Attributes\DataProvider; use SilverStripe\Core\Config\Config; use SilverStripe\Core\Injector\Injector; use SilverStripe\Dev\SapphireTest; @@ -27,7 +28,6 @@ use SilverStripe\Model\ModelData; use ReflectionMethod; use stdClass; -use PHPUnit\Framework\Attributes\DataProvider; class DataObjectTest extends SapphireTest { @@ -1913,7 +1913,7 @@ public function testManyManyUnlimitedRowCount() $this->assertEquals(2, $player->Teams()->dataQuery()->query()->unlimitedRowCount()); } - public function provideSingularName(): array + public static function provideSingularName(): array { return [ [ @@ -1933,8 +1933,8 @@ public function provideSingularName(): array /** * Tests that singular_name() generates sensible defaults. - * @dataProvider provideSingularName */ + #[DataProvider('provideSingularName')] public function testSingularName(string $class, string $expected): void { i18n::set_locale('en_NZ'); @@ -1952,7 +1952,7 @@ public function testSingularName(string $class, string $expected): void ); } - public function providePluralName(): array + public static function providePluralName(): array { return [ [ @@ -1984,8 +1984,8 @@ public function providePluralName(): array /** * Tests that plural_name() generates sensible defaults. - * @dataProvider providePluralName */ + #[DataProvider('providePluralName')] public function testPluralName(string $class, string $expected): void { i18n::set_locale('en_NZ'); @@ -2003,7 +2003,7 @@ public function testPluralName(string $class, string $expected): void ); } - public function provideClassDescription(): array + public static function provideClassDescription(): array { return [ 'no description by default' => [ @@ -2021,9 +2021,7 @@ public function provideClassDescription(): array ]; } - /** - * @dataProvider provideClassDescription - */ + #[DataProvider('provideClassDescription')] public function testClassDescription(string $class, ?string $expected): void { i18n::set_locale('en_NZ');