public static function loadPropertyReflection($object, $property, $searchInParents = true)
    {
        $reflection = self::loadClassReflection($object);

        if (!$searchInParents) {
            return $reflection->getProperty($property);
        }

        $exception = null;

        do {
            try {
                $reflectionProperty = $reflection->getProperty($property);

                return $reflectionProperty;
            } catch (\ReflectionException $e) {
                if (!$exception) {
                    $exception = $e;
                }
            }
        } while ($reflection = $reflection->getParentClass());

        throw $exception;
    }