Closed dbotezat closed 1 week ago
this fixed the issue
if (class_exists(PhpDocParser::class)) { $config = new ParserConfig([]); $phpDocParser = new PhpDocParser($config,new TypeParser($config,new ConstExprParser($config)), new ConstExprParser($config)); $lexer = new Lexer($config); }
what exactly should i use as an array param in new ParserConfig(???) ... i did not research
it's going to be fixed by https://github.com/api-platform/core/pull/6789
API Platform version(s) affected: 4.0.8
Description
[critical] Uncaught Error: Too few arguments to function PHPStan\PhpDocParser\Parser\ConstExprParser::__construct(), 0 passed in /DriversCheck/dev/projects/beed-backend/vendor/api-platform/core/src/Metadata/Resource/Factory/PhpDocResourceMetadataCollectionFactory.php on line 62 and exactly 1 expected
currently using phptan v1.12
How to reproduce
create new ymfony project usinc smyfony cli add api platform via composer
Possible Solution
repalce with $phpDocParser = new PhpDocParser(new ParserConfig(),new TypeParser(new ConstExprParser()), new ConstExprParser()); Additional Context
Error screenshot
Composer requirements screenshot