From 200b231ab94147cf55799da2b0f22dd9814bb654 Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Mon, 21 Jul 2025 19:23:12 -0300 Subject: [PATCH] [ObjectMapper] Remove deprecated `LazyGhostTrait` test in favor of native lazy object coverage --- .../ObjectMapper/Tests/Fixtures/LazyFoo.php | 22 ------------------- .../ObjectMapper/Tests/ObjectMapperTest.php | 9 -------- 2 files changed, 31 deletions(-) delete mode 100644 src/Symfony/Component/ObjectMapper/Tests/Fixtures/LazyFoo.php diff --git a/src/Symfony/Component/ObjectMapper/Tests/Fixtures/LazyFoo.php b/src/Symfony/Component/ObjectMapper/Tests/Fixtures/LazyFoo.php deleted file mode 100644 index e8bb45e26d2c..000000000000 --- a/src/Symfony/Component/ObjectMapper/Tests/Fixtures/LazyFoo.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ObjectMapper\Tests\Fixtures; - -use Symfony\Component\VarExporter\LazyGhostTrait; -use Symfony\Component\VarExporter\LazyObjectInterface; - -class LazyFoo extends \stdClass implements LazyObjectInterface -{ - use LazyGhostTrait; - - public string $name = 'foo'; -} diff --git a/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php b/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php index ccea0c320e53..a7322b746977 100644 --- a/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php +++ b/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php @@ -41,7 +41,6 @@ use Symfony\Component\ObjectMapper\Tests\Fixtures\InstanceCallback\B as InstanceCallbackB; use Symfony\Component\ObjectMapper\Tests\Fixtures\InstanceCallbackWithArguments\A as InstanceCallbackWithArgumentsA; use Symfony\Component\ObjectMapper\Tests\Fixtures\InstanceCallbackWithArguments\B as InstanceCallbackWithArgumentsB; -use Symfony\Component\ObjectMapper\Tests\Fixtures\LazyFoo; use Symfony\Component\ObjectMapper\Tests\Fixtures\MapStruct\AToBMapper; use Symfony\Component\ObjectMapper\Tests\Fixtures\MapStruct\MapStructMapperMetadataFactory; use Symfony\Component\ObjectMapper\Tests\Fixtures\MapStruct\Source; @@ -371,14 +370,6 @@ public static function objectMapperProvider(): iterable yield [new ObjectMapper(new ReflectionObjectMapperMetadataFactory(), PropertyAccess::createPropertyAccessor())]; } - public function testMapInitializesLazyObject() - { - $lazy = new LazyFoo(); - $mapper = new ObjectMapper(); - $mapper->map($lazy, \stdClass::class); - $this->assertTrue($lazy->isLazyObjectInitialized()); - } - public function testMapInitializesNativePhp84LazyObject() { $initialized = false; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy