Repository: EasyCorp/EasyAdminBundle (language: php)

Issue:
Global search fails with inherited properties in EasyAdmin
**Describe the bug**
I am experiencing an issue with EasyAdmin when trying to perform a global search on an entity that has properties inherited from a parent class. The error occurs when EasyAdmin tries to access these inherited properties via reflection, resulting in the following error message:
Property `App\Entity\Link::$startTime` does not exist.

It seems that EasyAdmin is not handling inherited properties properly during the reflection process, leading to this error when performing searches.

**To Reproduce**

1. Create an entity (Link) that inherits from a parent class with a property (startTime).
2. Use EasyAdmin to perform a global search for an attribute that is inherited (e.g., startTime).
3. The following error occurs:
`Property App\Entity\Link::$startTime does not exist`.

- EasyAdmin Version:  `All 4.X`

**(OPTIONAL) Additional context**
I have traced the issue to the reflection process in EasyAdmin. The code currently attempts to reflect only the current class and does not take parent classes into account. This causes the reflection to fail when searching for inherited properties.
I have tried to work around this issue by manually adding a check for parent classes in my custom controller, but this does not resolve the issue for the global search feature.

Here’s the relevant code from the error trace:

```php
/** @var \ReflectionNamedType|\ReflectionUnionType|null $idClassType */  
$idClassType = (new \ReflectionProperty($entityFqcn, $propertyName))->getType();
```

The issue arises because `ReflectionProperty` fails when the property is not found in the current class and no logic is in place to check the parent class.




Discussion / hints:

Fix patch:
diff --git a/src/Orm/EntityRepository.php b/src/Orm/EntityRepository.php
index 2607ebc36f..640c9a4d6c 100644
--- a/src/Orm/EntityRepository.php
+++ b/src/Orm/EntityRepository.php
@@ -309,10 +309,22 @@ private function getSearchablePropertiesConfig(QueryBuilder $queryBuilder, Searc
                     ? $associatedEntityDto->getFqcn()
                     : $entityDto->getFqcn()
                 ;
+
                 /** @var \ReflectionNamedType|\ReflectionUnionType|null $idClassType */
-                $idClassType = (new \ReflectionProperty($entityFqcn, $propertyName))->getType();
+                $idClassType = null;
+                $reflectionClass = new \ReflectionClass($entityFqcn);
+
+                while (false !== $reflectionClass) {
+                    if ($reflectionClass->hasProperty($propertyName)) {
+                        $reflection = $reflectionClass->getProperty($propertyName);
+                        $idClassType = $reflection->getType();
+                        break;
+                    }
+                    $reflectionClass = $reflectionClass->getParentClass();
+                }
 
                 if (null !== $idClassType) {
+                    /** @var \ReflectionNamedType|\ReflectionUnionType|null $idClassType */
                     $idClassName = $idClassType->getName();
 
                     if (class_exists($idClassName)) {


Test patch: