Skip to content

HUGE PROBLEM: class ImportResolver is missing #11

@TommasoScardi

Description

@TommasoScardi

Class "Brick\Reflection\ImportResolver" not found

row 289 of Reflection/Reflector.php file

private function convertNamedType(string $namedType, bool $isReflection, ReflectionParameter $reflectionParameter): SimpleType|ClassType|EnumType
    {
        $namedTypeLower = strtolower($namedType);

        $isAllowedBuiltinType = in_array($namedTypeLower, self::ALLOWED_BUILTIN_TYPES, true);
        $isDisallowedBuiltinType = in_array($namedTypeLower, self::DISALLOWED_BUILTIN_TYPES, true);
        $isBuiltinType = $isAllowedBuiltinType || $isDisallowedBuiltinType;

        if (! $isBuiltinType && ! $isReflection) {
            // Class names coming from reflection are already fully qualified, while class names coming from @param
            // must be resolved according to the current namespace & use statements,
            $importResolver = new ImportResolver($reflectionParameter); <--- HERE

            $namedType = $importResolver->resolve($namedType);
            $namedTypeLower = strtolower($namedType);
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions