File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
src/Symfony/Component/ObjectMapper/Tests Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \ObjectMapper \Tests \Fixtures ;
1313
14- use Symfony \Component \VarExporter \LazyGhostTrait ;
1514use Symfony \Component \VarExporter \LazyObjectInterface ;
1615
1716class LazyFoo extends \stdClass implements LazyObjectInterface
1817{
19- use LazyGhostTrait ;
18+ private bool $ initialized = false ;
2019
21- public string $ name = 'foo ' ;
20+ public function isLazyObjectInitialized (bool $ partial = false ): bool
21+ {
22+ return $ this ->initialized ;
23+ }
24+
25+ public function initializeLazyObject (): object
26+ {
27+ $ this ->initialized = true ;
28+
29+ return $ this ;
30+ }
31+
32+ public function resetLazyObject (): bool
33+ {
34+ $ this ->initialized = false ;
35+
36+ return true ;
37+ }
2238}
Original file line number Diff line number Diff line change @@ -371,9 +371,6 @@ public static function objectMapperProvider(): iterable
371371 yield [new ObjectMapper (new ReflectionObjectMapperMetadataFactory (), PropertyAccess::createPropertyAccessor ())];
372372 }
373373
374- /**
375- * @group legacy
376- */
377374 public function testMapInitializesLazyObject ()
378375 {
379376 $ lazy = new LazyFoo ();
You can’t perform that action at this time.
0 commit comments