Skip to content

PHP Fatal error: Uncaught Error: Class '...' not found #3062

@teohhanhui

Description

@teohhanhui

Bug report

 ------ ------------------------------------------------------------------- 
  Line   src/Bridge/Doctrine/MongoDbOdm/Filter/BooleanFilter.php            
 ------ ------------------------------------------------------------------- 
         Internal error: Class 'Doctrine\ODM\MongoDB\Types\Type' not found  
         Run PHPStan with --debug option and post the stack trace to:       
         https://github.com/phpstan/phpstan/issues/new                      
 ------ -------------------------------------------------------------------
PHP Fatal error:  Uncaught Error: Class 'Doctrine\ODM\MongoDB\Types\Type' not found in phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Reflection/ClassConstantReflection.php:38
Stack trace:
#0 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Reflection/ClassConstantReflection.php(38): ReflectionClassConstant->getValue()
#1 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Reflection/ClassConstantReflection.php(42): PHPStan\Reflection\ClassConstantReflection->getValue()
#2 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Analyser/MutatingScope.php(1028): PHPStan\Reflection\ClassConstantReflection->getValueType()
#3 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Analyser/MutatingScope.php(298): PHPStan\Analyser\MutatingScope->resolveType(Object(PhpParser\Node\Expr\ClassConstFetch))
#4 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Analyser/MutatingScope.php(354): PHPStan\Analyser\MutatingScope->getType(Object(PhpParser\Node\Expr\C in phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Reflection/ClassConstantReflection.php on line 38
Fatal error: Uncaught Error: Class 'Doctrine\ODM\MongoDB\Types\Type' not found in phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Reflection/ClassConstantReflection.php:38
Stack trace:
#0 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Reflection/ClassConstantReflection.php(38): ReflectionClassConstant->getValue()
#1 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Reflection/ClassConstantReflection.php(42): PHPStan\Reflection\ClassConstantReflection->getValue()
#2 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Analyser/MutatingScope.php(1028): PHPStan\Reflection\ClassConstantReflection->getValueType()
#3 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Analyser/MutatingScope.php(298): PHPStan\Analyser\MutatingScope->resolveType(Object(PhpParser\Node\Expr\ClassConstFetch))
#4 phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Analyser/MutatingScope.php(354): PHPStan\Analyser\MutatingScope->getType(Object(PhpParser\Node\Expr\C in phar:///src/api-platform/core/vendor/phpstan/phpstan/phpstan/src/Reflection/ClassConstantReflection.php on line 38

Code snippet that reproduces the problem

https://github.com/api-platform/core/blob/914d9a6185560a26802be8bb6cc7932123f0c9ca/src/Bridge/Doctrine/MongoDbOdm/Filter/BooleanFilter.php

Expected output

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions