diff --git a/src/Symfony/Component/ObjectMapper/Tests/Fixtures/LazyFoo.php b/src/Symfony/Component/ObjectMapper/Tests/Fixtures/LazyFoo.php index e8bb45e26d2c..22dbebaad14a 100644 --- a/src/Symfony/Component/ObjectMapper/Tests/Fixtures/LazyFoo.php +++ b/src/Symfony/Component/ObjectMapper/Tests/Fixtures/LazyFoo.php @@ -11,12 +11,28 @@ namespace Symfony\Component\ObjectMapper\Tests\Fixtures; -use Symfony\Component\VarExporter\LazyGhostTrait; use Symfony\Component\VarExporter\LazyObjectInterface; class LazyFoo extends \stdClass implements LazyObjectInterface { - use LazyGhostTrait; + private bool $initialized = false; - public string $name = 'foo'; + public function isLazyObjectInitialized(bool $partial = false): bool + { + return $this->initialized; + } + + public function initializeLazyObject(): object + { + $this->initialized = true; + + return $this; + } + + public function resetLazyObject(): bool + { + $this->initialized = false; + + return true; + } } diff --git a/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php b/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php index fd4818fcc77e..8cb3b82c2baa 100644 --- a/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php +++ b/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php @@ -371,9 +371,6 @@ public static function objectMapperProvider(): iterable yield [new ObjectMapper(new ReflectionObjectMapperMetadataFactory(), PropertyAccess::createPropertyAccessor())]; } - /** - * @group legacy - */ public function testMapInitializesLazyObject() { $lazy = new LazyFoo();
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: