vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.54k stars 659 forks source link

FunctionLikeDocblockScanner exception #7571

Closed AdamCoulterOz closed 2 years ago

AdamCoulterOz commented 2 years ago

While starting the language server in vscode, on macos, with php 7.2:

Server initialization failed.

Message: Exception: RuntimeException PHP Error: Uninitialized string offset: 0 in 
~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php:449
Emitted in 
~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php:66
psalm-github-bot[bot] commented 2 years ago

Hey @AdamCoulterOz, can you reproduce the issue on https://psalm.dev ?

AdamCoulterOz commented 2 years ago

@psalm-github-bot - its not a functional issue... it can't start the language server because of a reference bug

weirdan commented 2 years ago

Does a cli run fail as well? If so, can you run it with --debug-by-line and post the last 100-200 lines?

AdamCoulterOz commented 2 years ago

@weirdan - This is what I got by running:

ProjectFolder % ~/.composer/vendor/bin/psalm --debug-by-line

I have removed the file names ***.php and replaced the folder path with /ProjectFolder and ~/ for my home folder

Target PHP version: 7.2 (set by config file)
Scanning files...
Registering autoloaded files
   /ProjectFolder/vendor/autoload.php
   /ProjectFolder/vendor/composer/autoload_real.php
   /ProjectFolder/vendor/composer/ClassLoader.php
   /ProjectFolder/vendor/composer/include_paths.php
   /ProjectFolder/vendor/composer/autoload_static.php
   /ProjectFolder/vendor/ralouphie/getallheaders/src/getallheaders.php
   /ProjectFolder/vendor/guzzlehttp/psr7/src/functions_include.php
   /ProjectFolder/vendor/guzzlehttp/psr7/src/functions.php
   /ProjectFolder/vendor/guzzlehttp/promises/src/functions_include.php
   /ProjectFolder/vendor/guzzlehttp/promises/src/functions.php
   /ProjectFolder/vendor/symfony/polyfill-intl-normalizer/bootstrap.php
   /ProjectFolder/vendor/symfony/polyfill-php72/bootstrap.php
   /ProjectFolder/vendor/symfony/polyfill-intl-idn/bootstrap.php
   /ProjectFolder/vendor/symfony/polyfill-mbstring/bootstrap.php
   /ProjectFolder/vendor/guzzlehttp/guzzle/src/functions_include.php
   /ProjectFolder/vendor/guzzlehttp/guzzle/src/functions.php
   /ProjectFolder/vendor/mtdowling/jmespath.php/src/JmesPath.php
   /ProjectFolder/vendor/aws/aws-sdk-php/src/functions.php
   /ProjectFolder/vendor/symfony/polyfill-ctype/bootstrap.php
   /ProjectFolder/vendor/opis/closure/functions.php
   /ProjectFolder/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php
   /ProjectFolder/vendor/ircmaxell/password-compat/lib/password.php
   /ProjectFolder/vendor/php-di/php-di/src/functions.php
   /ProjectFolder/vendor/ramsey/uuid/src/functions.php
   /ProjectFolder/vendor/simplesamlphp/saml2/src/_autoload.php
   /ProjectFolder/vendor/smarty/smarty/libs/bootstrap.php
   /ProjectFolder/vendor/smarty/smarty/libs/Autoloader.php
   /ProjectFolder/vendor/tamtamchik/namecase/src/functions.php
   /ProjectFolder/lib/php/resolvables/resolvables.php
   ~/.composer/vendor/autoload.php
   ~/.composer/vendor/composer/autoload_real.php
   ~/.composer/vendor/composer/platform_check.php
   ~/.composer/vendor/composer/autoload_static.php
   ~/.composer/vendor/symfony/deprecation-contracts/function.php
   ~/.composer/vendor/symfony/polyfill-php80/bootstrap.php
   ~/.composer/vendor/amphp/amp/lib/functions.php
   ~/.composer/vendor/amphp/amp/lib/Internal/functions.php
   ~/.composer/vendor/symfony/polyfill-intl-grapheme/bootstrap.php
   ~/.composer/vendor/symfony/polyfill-php73/bootstrap.php
   ~/.composer/vendor/symfony/polyfill-php73/Php73.php
   ~/.composer/vendor/symfony/string/Resources/functions.php
   ~/.composer/vendor/amphp/byte-stream/lib/functions.php
   ~/.composer/vendor/vimeo/psalm/src/functions.php
   ~/.composer/vendor/vimeo/psalm/src/spl_object_id.php
   ~/.composer/vendor/composer/package-versions-deprecated/src/PackageVersions/Versions.php
   ~/.composer/vendor/composer/InstalledVersions.php
   ~/.composer/vendor/composer/installed.php
   /ProjectFolder/vendor/composer/installed.php
   /ProjectFolder/vendor/composer/autoload_files.php
   /ProjectFolder/tests/psalm/common-psalm.inc
   /ProjectFolder/www/_inc/compat-php7.inc
   /ProjectFolder/www/_inc/classes/class_loader.class.php
Parsing ~/.composer/vendor/composer/ClassLoader.php
Deep scanning ~/.composer/vendor/composer/ClassLoader.php
Using reflection to get metadata for InvalidArgumentException
Using reflection to get metadata for Closure
Using composer to locate file for Psr\Http\Message\MessageInterface
Using composer to locate file for GuzzleHttp\Psr7\Message
Using composer to locate file for Psr\Http\Message\UriInterface
Using composer to locate file for GuzzleHttp\Psr7\Utils
Using composer to locate file for Psr\Http\Message\StreamInterface
Using reflection to get metadata for Iterator
Using composer to locate file for GuzzleHttp\Psr7\Header
Using composer to locate file for Psr\Http\Message\RequestInterface
Using reflection to get metadata for RuntimeException
Using composer to locate file for GuzzleHttp\Psr7\Request
Using composer to locate file for GuzzleHttp\Psr7\Response
Using composer to locate file for GuzzleHttp\Psr7\Query
Using composer to locate file for GuzzleHttp\Psr7\MimeType
Using composer to locate file for GuzzleHttp\Promise\TaskQueueInterface
Using composer to locate file for GuzzleHttp\Promise\Utils
Using composer to locate file for GuzzleHttp\Promise\PromiseInterface
Using composer to locate file for GuzzleHttp\Promise\Create
Using reflection to get metadata for Exception
Using reflection to get metadata for Throwable
Using composer to locate file for GuzzleHttp\Promise\Each
Using composer to locate file for GuzzleHttp\Promise\Is
Using composer to locate file for GuzzleHttp\Promise\Coroutine
Using composer to locate file for Symfony\Polyfill\Intl\Normalizer\Normalizer
Using composer to locate file for Symfony\Polyfill\Php72\Php72
Using composer to locate file for Symfony\Polyfill\Intl\Idn\Idn
Using composer to locate file for Symfony\Polyfill\Mbstring\Mbstring
Using composer to locate file for GuzzleHttp\UriTemplate
Using reflection to get metadata for Countable
Using reflection to get metadata for SimpleXMLElement
Using reflection to get metadata for ResourceBundle
Using composer to locate file for GuzzleHttp\Handler\Proxy
Using composer to locate file for GuzzleHttp\Handler\CurlMultiHandler
Using composer to locate file for GuzzleHttp\Handler\CurlHandler
Using composer to locate file for GuzzleHttp\Handler\StreamHandler
Using composer to locate file for GuzzleHttp\Client
Using composer to locate file for GuzzleHttp\Exception\InvalidArgumentException
Using composer to locate file for JmesPath\Env
Using reflection to get metadata for Generator
Using composer to locate file for Aws\Handler\GuzzleV6\GuzzleHandler
Using composer to locate file for Aws\Handler\GuzzleV5\GuzzleHandler
Using composer to locate file for GuzzleHttp\ClientInterface
Using composer to locate file for Aws\CommandInterface
Using composer to locate file for GuzzleHttp\Promise\FulfilledPromise
Using composer to locate file for Aws\Result
Using composer to locate file for Symfony\Polyfill\Ctype\Ctype
Using composer to locate file for Opis\Closure\SerializableClosure
Using reflection to get metadata for UnexpectedValueException
Using composer to locate file for DI\Definition\ValueDefinition
Using composer to locate file for DI\Definition\Helper\CreateDefinitionHelper
Using composer to locate file for DI\Definition\Helper\AutowireDefinitionHelper
Using composer to locate file for DI\Definition\Helper\FactoryDefinitionHelper
Using composer to locate file for DI\Definition\Reference
Using composer to locate file for DI\Definition\EnvironmentVariableDefinition
Using composer to locate file for DI\Definition\ArrayDefinitionExtension
Using composer to locate file for DI\Definition\StringDefinition
Using composer to locate file for Ramsey\Uuid\Exception\UnsatisfiedDependencyException
Using composer to locate file for Ramsey\Uuid\Uuid
Using composer to locate file for Ramsey\Uuid\Exception\InvalidUuidStringException
Using composer to locate file for Ramsey\Uuid\UuidInterface
Using reflection to get metadata for ArrayObject
Using composer to locate file for Tamtamchik\NameCase\Formatter
Using reflection to locate file for Symfony\Polyfill\Php80\Php80
Using reflection to locate file for Amp\Promise
Using reflection to locate file for Amp\Failure
Using reflection to locate file for Amp\Coroutine
Using reflection to locate file for React\Promise\PromiseInterface
Using reflection to locate file for Amp\Success
Using reflection to locate file for Amp\Delayed
Using reflection to get metadata for TypeError
Using reflection to get metadata for Error
Using reflection to locate file for Amp\Loop
Using reflection to locate file for Amp\Deferred
Using reflection to locate file for Amp\TimeoutException
Using reflection to locate file for Amp\MultiReasonException
Using reflection to locate file for Amp\Iterator
Using reflection to get metadata for Traversable
Using reflection to locate file for Amp\Producer
Using reflection to locate file for Amp\Emitter
Using reflection to locate file for Symfony\Polyfill\Intl\Grapheme\Grapheme
Using reflection to locate file for Symfony\Component\String\u
Using reflection to locate file for Symfony\Component\String\UnicodeString
Using reflection to locate file for Symfony\Component\String\b
Using reflection to locate file for Symfony\Component\String\ByteString
Using reflection to locate file for Symfony\Component\String\s
Using reflection to locate file for Symfony\Component\String\AbstractString
Using reflection to locate file for Amp\ByteStream\InputStream
Using reflection to locate file for Amp\ByteStream\OutputStream
Using reflection to locate file for Amp\ByteStream\ResourceInputStream
Using reflection to locate file for Amp\ByteStream\ResourceOutputStream
Using reflection to locate file for Amp\ByteStream\LineReader
Using reflection to locate file for Amp\ByteStream\StreamException
Using reflection to locate file for Webmozart\PathUtil\Path
Using reflection to get metadata for ReflectionFunction
Using reflection to get metadata for OutOfBoundsException
Using reflection to locate file for PackageVersions\FallbackVersions
Using reflection to locate file for Composer\Semver\VersionParser
Using reflection to get metadata for ArrayIterator
Using reflection to get metadata for ReflectionClass
Using reflection to get metadata for ReflectionExtension
Using reflection to get metadata for ReflectionParameter
Using reflection to get metadata for ReflectionType
Using composer to locate file for GuzzleHttp\Psr7\MessageTrait
Using composer to locate file for Psr\Http\Message\ResponseInterface
Using reflection to get metadata for LogicException
Using composer to locate file for GuzzleHttp\Promise\Promise
Using reflection to get metadata for Normalizer
Using composer to locate file for Symfony\Polyfill\Intl\Idn\Info
Using composer to locate file for GuzzleHttp\Handler\CurlFactoryInterface
Using composer to locate file for GuzzleHttp\Exception\GuzzleException
Using reflection to locate file for GuzzleHttp\Message\ResponseInterface
Using reflection to get metadata for ArrayAccess
Using reflection to get metadata for IteratorAggregate
Using composer to locate file for Aws\HandlerList
Using composer to locate file for Aws\HasDataTrait
Using composer to locate file for Aws\HasMonitoringEventsTrait
Using composer to locate file for Aws\ResultInterface
Using composer to locate file for Aws\MonitoringEventsInterface
Using reflection to get metadata for Serializable
Using composer to locate file for Opis\Closure\ReflectionClosure
Using composer to locate file for Opis\Closure\ClosureContext
Using composer to locate file for Opis\Closure\ISecurityProvider
Using composer to locate file for Opis\Closure\SecurityException
Using reflection to get metadata for SplObjectStorage
Using composer to locate file for Opis\Closure\ClosureScope
Using composer to locate file for DI\Definition\Definition
Using composer to locate file for DI\Definition\SelfResolvingDefinition
Using composer to locate file for Psr\Container\ContainerInterface
Using composer to locate file for DI\Definition\Helper\DefinitionHelper
Using composer to locate file for DI\Definition\ObjectDefinition
Using composer to locate file for DI\Definition\Exception\InvalidDefinition
Using composer to locate file for DI\Definition\AutowireDefinition
Using composer to locate file for DI\Definition\FactoryDefinition
Using composer to locate file for DI\Definition\ArrayDefinition
Using composer to locate file for DI\Definition\ExtendsPreviousDefinition
Using composer to locate file for Ramsey\Uuid\UuidFactoryInterface
Using composer to locate file for Ramsey\Uuid\Codec\CodecInterface
Using composer to locate file for Ramsey\Uuid\Converter\NumberConverterInterface
Using composer to locate file for Ramsey\Uuid\Exception\UnsupportedOperationException
Using reflection to get metadata for JsonSerializable
Using reflection to get metadata for DateTime
Using reflection to locate file for React\Promise\PromiseInterface
Using reflection to locate file for Amp\Internal\Placeholder
Using reflection to locate file for Amp\Loop\Driver
Using reflection to locate file for Amp\Loop\UnsupportedFeatureException
Using reflection to locate file for Amp\Loop\InvalidWatcherError
Using reflection to locate file for Amp\Loop\DriverFactory
Using reflection to locate file for Amp\CallableMaker
Using reflection to locate file for Amp\Internal\Producer
Using reflection to locate file for Symfony\Component\String\AbstractUnicodeString
Using reflection to locate file for parent
Using reflection to locate file for Symfony\Component\String\CodePointString
Using reflection to locate file for Stringable
Using reflection to locate file for Amp\ByteStream\PendingReadError
Using reflection to locate file for Amp\ByteStream\ClosedException
Using reflection to get metadata for SplQueue
Using reflection to locate file for Composer\Semver\Constraint\ConstraintInterface
Using reflection to get metadata for ReflectionMethod
Using reflection to get metadata for ReflectionProperty
Using reflection to get metadata for ReflectionClassConstant
Using reflection to get metadata for ReflectionFunctionAbstract
Using reflection to get metadata for DateTimeZone
Using reflection to get metadata for DateTimeInterface
Using reflection to get metadata for DateInterval
Using composer to locate file for GuzzleHttp\Handler\EasyHandle
Using reflection to get metadata for ReflectionException
Using composer to locate file for DI\Factory\RequestedEntry
Using composer to locate file for Psr\Container\NotFoundExceptionInterface
Using composer to locate file for Psr\Container\ContainerExceptionInterface
Using composer to locate file for DI\Definition\ObjectDefinition\MethodInjection
Using composer to locate file for DI\Definition\ObjectDefinition\PropertyInjection
Using reflection to locate file for React\Promise\PromiseInterface
Using reflection to locate file for Amp\Internal\ResolutionQueue
Using reflection to locate file for Amp\Loop\Watcher
Using reflection to get metadata for Transliterator
Using reflection to locate file for parent
Using reflection to locate file for Composer\Semver\Constraint\Constraint
Using reflection to locate file for Composer\Semver\Constraint\Bound
Using reflection to locate file for React\Promise\PromiseInterface
Using reflection to locate file for Amp\Struct
Finished registering autoloaded files
Visiting autoload files took 0.403s
Initializing plugins...
Forking process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Initialising forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Have initialised forked process for scanning
Parsing /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Deep scanning /ProjectFolder/www/******.php
Deep scanning /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Deep scanning /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Deep scanning /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Deep scanning /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php

Uncaught Exception: RuntimeException PHP Error: Uninitialized string offset: 0 in ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php:449
Emitted in ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php:66
Stack trace in the forked worker:
#0 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php(449): Psalm\Internal\ErrorHandler::Psalm\Internal\{closure}(8, 'Uninitialized s...', '~/.co...', 449, Array)
#1 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php(932): Psalm\Internal\PhpVisitor\Reflector\FunctionLikeDocblockScanner::getConditionalSanitizedTypeTokens('\\$class_name', Object(Psalm\Aliases), Array, Array, Object(Psalm\Storage\MethodStorage), Object(Psalm\Storage\ClassLikeStorage), 'Resourceman_Bas...', Array)
#2 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php(404): Psalm\Internal\PhpVisitor\Reflector\FunctionLikeDocblockScanner::handleReturn(Object(Psalm\Codebase), Object(Psalm\Internal\Scanner\FunctionDocblockComment), '\\$class_name', false, Object(Psalm\Internal\Scanner\FileScanner), Object(Psalm\Storage\MethodStorage), Object(PhpParser\Node\Stmt\ClassMethod), Object(Psalm\Aliases), Array, Array, Array, Object(Psalm\Storage\ClassLikeStorage), 'Resourceman_Bas...', Object(Psalm\Storage\FileStorage))
#3 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeNodeScanner.php(525): Psalm\Internal\PhpVisitor\Reflector\FunctionLikeDocblockScanner::addDocblockInfo(Object(Psalm\Codebase), Object(Psalm\Internal\Scanner\FileScanner), Object(Psalm\Storage\FileStorage), Object(Psalm\Aliases), Array, Object(Psalm\Storage\ClassLikeStorage), Array, Object(Psalm\Storage\MethodStorage), Object(PhpParser\Node\Stmt\ClassMethod), Object(Psalm\Internal\Scanner\FunctionDocblockComment), false, false, 'Resourceman_Bas...')
#4 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php(235): Psalm\Internal\PhpVisitor\Reflector\FunctionLikeNodeScanner->start(Object(PhpParser\Node\Stmt\ClassMethod))
#5 ~/.composer/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(200): Psalm\Internal\PhpVisitor\ReflectorVisitor->enterNode(Object(PhpParser\Node\Stmt\ClassMethod))
#6 ~/.composer/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(114): PhpParser\NodeTraverser->traverseArray(Array)
#7 ~/.composer/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(223): PhpParser\NodeTraverser->traverseNode(Object(PhpParser\Node\Stmt\Class_))
#8 ~/.composer/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(91): PhpParser\NodeTraverser->traverseArray(Array)
#9 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Scanner/FileScanner.php(88): PhpParser\NodeTraverser->traverse(Array)
#10 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(589): Psalm\Internal\Scanner\FileScanner->scan(Object(Psalm\Codebase), Object(Psalm\Storage\FileStorage), false, Object(Psalm\Progress\DebugProgress))
#11 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(339): Psalm\Internal\Codebase\Scanner->scanFile('/Volumes/Code/S...', Array, true)
#12 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Fork/Pool.php(211): Psalm\Internal\Codebase\Scanner->Psalm\Internal\Codebase\{closure}(11, '/Volumes/Code/S...')
#13 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(408): Psalm\Internal\Fork\Pool->__construct(Object(Psalm\Config), Array, Object(Closure), Object(Closure), Object(Closure))
#14 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(303): Psalm\Internal\Codebase\Scanner->scanFilePaths(11)
#15 ~/.composer/vendor/vimeo/psalm/src/Psalm/Codebase.php(518): Psalm\Internal\Codebase\Scanner->scanFiles(Object(Psalm\Internal\Codebase\ClassLikes), 11)
#16 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php(639): Psalm\Codebase->scanFiles(11)
#17 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(373): Psalm\Internal\Analyzer\ProjectAnalyzer->check('/Volumes/Code/S...', true)
#18 ~/.composer/vendor/vimeo/psalm/psalm(6): Psalm\Internal\Cli\Psalm::run(Array)
#19 ~/.composer/vendor/bin/psalm(112): include('~/.co...')
#20 {main} in ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Fork/Pool.php:402
Stack trace:
#0 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Fork/Pool.php(436): Psalm\Internal\Fork\Pool->readResultsFromChildren()
#1 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(415): Psalm\Internal\Fork\Pool->wait()
#2 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(303): Psalm\Internal\Codebase\Scanner->scanFilePaths(11)
#3 ~/.composer/vendor/vimeo/psalm/src/Psalm/Codebase.php(518): Psalm\Internal\Codebase\Scanner->scanFiles(Object(Psalm\Internal\Codebase\ClassLikes), 11)
#4 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php(639): Psalm\Codebase->scanFiles(11)
#5 ~/.composer/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(373): Psalm\Internal\Analyzer\ProjectAnalyzer->check('/Volumes/Code/S...', true)
#6 ~/.composer/vendor/vimeo/psalm/psalm(6): Psalm\Internal\Cli\Psalm::run(Array)
#7 ~/.composer/vendor/bin/psalm(112): include('~/.co...')
#8 {main}
(Psalm 4.19.0@a2ad69ae4f5ab1f7d225a8dc4e2ec2d9415ed599 crashed due to an uncaught Throwable)
weirdan commented 2 years ago

So it's something having to do with the code at those last lines

Deep scanning /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php
Parsing /ProjectFolder/www/******.php

Mind posting them? Or devising a reproducer on psalm.dev?

AdamCoulterOz commented 2 years ago

@weirdan They are very large 400+ line files with references to other classes etc. I'm not quite sure how to reproduce it?

Also, I can't publicly share the code as it's part of a proprietary production system which I can't compromise.

Could I share it with you privately?

weirdan commented 2 years ago

They are very large 400+ line files with references to other classes

But log entries point to specific code lines.

Could I share it with you privately?

Sure. If that happens to be hosted on GitHub, you can add me as a collaborator. Otherwise, contact me on either Symfony Slack (@weirdan, symfony-devs.slack.com) or Twitter (@weirdan), and we can arrange the access.

AdamCoulterOz commented 2 years ago

@weirdan - I invited you to dm on slack ...

image