Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HUGE PROBLEM: class ImportResolver is missing #11

Open
TommasoScardi opened this issue Jun 18, 2024 · 0 comments
Open

HUGE PROBLEM: class ImportResolver is missing #11

TommasoScardi opened this issue Jun 18, 2024 · 0 comments

Comments

@TommasoScardi
Copy link

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);
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant