@@ -544,6 +544,8 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
544
544
/**
545
545
* The ReflectionProperty instances of the mapped class.
546
546
*
547
+ * @deprecated Use $propertyAccessors instead.
548
+ *
547
549
* @var LegacyReflectionFields|array<string, ReflectionProperty>
548
550
*/
549
551
public LegacyReflectionFields |array $ reflFields = [];
@@ -573,6 +575,8 @@ public function __construct(public string $name, NamingStrategy|null $namingStra
573
575
/**
574
576
* Gets the ReflectionProperties of the mapped class.
575
577
*
578
+ * @deprecated Use getPropertyAccessors() instead.
579
+ *
576
580
* @return LegacyReflectionFields|ReflectionProperty[] An array of ReflectionProperty instances.
577
581
* @phpstan-return LegacyReflectionFields|array<string, ReflectionProperty>
578
582
*/
@@ -593,6 +597,8 @@ public function getPropertyAccessors(): array
593
597
594
598
/**
595
599
* Gets a ReflectionProperty for a specific field of the mapped class.
600
+ *
601
+ * @deprecated Use getPropertyAccessor() instead.
596
602
*/
597
603
public function getReflectionProperty (string $ name ): ReflectionProperty |null
598
604
{
@@ -604,7 +610,11 @@ public function getPropertyAccessor(string $name): PropertyAccessor|null
604
610
return $ this ->propertyAccessors [$ name ] ?? null ;
605
611
}
606
612
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
+ */
608
618
public function getSingleIdReflectionProperty (): ReflectionProperty |null
609
619
{
610
620
if ($ this ->isIdentifierComposite ) {
@@ -818,7 +828,8 @@ public function newInstance(): object
818
828
public function wakeupReflection (ReflectionService $ reflService ): void
819
829
{
820
830
// Restore ReflectionClass and properties
821
- $ this ->reflClass = $ reflService ->getClass ($ this ->name );
831
+ $ this ->reflClass = $ reflService ->getClass ($ this ->name );
832
+ /** @phpstan-ignore property.deprecated */
822
833
$ this ->reflFields = new LegacyReflectionFields ($ this , $ reflService );
823
834
$ this ->instantiator = $ this ->instantiator ?: new Instantiator ();
824
835
0 commit comments