@@ -544,6 +544,8 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
544544 /**
545545 * The ReflectionProperty instances of the mapped class.
546546 *
547+ * @deprecated Use $propertyAccessors instead.
548+ *
547549 * @var LegacyReflectionFields|array<string, ReflectionProperty>
548550 */
549551 public LegacyReflectionFields |array $ reflFields = [];
@@ -573,6 +575,8 @@ public function __construct(public string $name, NamingStrategy|null $namingStra
573575 /**
574576 * Gets the ReflectionProperties of the mapped class.
575577 *
578+ * @deprecated Use getPropertyAccessors() instead.
579+ *
576580 * @return LegacyReflectionFields|ReflectionProperty[] An array of ReflectionProperty instances.
577581 * @phpstan-return LegacyReflectionFields|array<string, ReflectionProperty>
578582 */
@@ -593,6 +597,8 @@ public function getPropertyAccessors(): array
593597
594598 /**
595599 * Gets a ReflectionProperty for a specific field of the mapped class.
600+ *
601+ * @deprecated Use getPropertyAccessor() instead.
596602 */
597603 public function getReflectionProperty (string $ name ): ReflectionProperty |null
598604 {
@@ -604,7 +610,11 @@ public function getPropertyAccessor(string $name): PropertyAccessor|null
604610 return $ this ->propertyAccessors [$ name ] ?? null ;
605611 }
606612
607- /** @throws BadMethodCallException If the class has a composite identifier. */
613+ /**
614+ * @deprecated Use getPropertyAccessor() instead.
615+ *
616+ * @throws BadMethodCallException If the class has a composite identifier.
617+ */
608618 public function getSingleIdReflectionProperty (): ReflectionProperty |null
609619 {
610620 if ($ this ->isIdentifierComposite ) {
@@ -818,7 +828,8 @@ public function newInstance(): object
818828 public function wakeupReflection (ReflectionService $ reflService ): void
819829 {
820830 // Restore ReflectionClass and properties
821- $ this ->reflClass = $ reflService ->getClass ($ this ->name );
831+ $ this ->reflClass = $ reflService ->getClass ($ this ->name );
832+ /** @phpstan-ignore property.deprecated */
822833 $ this ->reflFields = new LegacyReflectionFields ($ this , $ reflService );
823834 $ this ->instantiator = $ this ->instantiator ?: new Instantiator ();
824835
0 commit comments