-
Notifications
You must be signed in to change notification settings - Fork 696
Closed
Description
We're seeing the following error when running Psalm v5.1.3 on Alpine Linux:
Uncaught Psalm\Exception\CodeException: Error with core stub file docblocks: InvalidDocblock - vendor/vimeo/psalm/stubs/CoreGenericFunctions.phpstub:1744:1 - Template F has invalid as type - int-mask types must all be integer values in /app/vendor/vimeo/psalm/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php:571
Stack trace:
#0 /app/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(230): Psalm\Internal\PhpVisitor\ReflectorVisitor->leaveNode(Object(PhpParser\Node\Stmt\Function_))
#1 /app/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(91): PhpParser\NodeTraverser->traverseArray(Array)
#2 /app/vendor/vimeo/psalm/src/Psalm/Internal/Scanner/FileScanner.php(79): PhpParser\NodeTraverser->traverse(Array)
#3 /app/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(554): Psalm\Internal\Scanner\FileScanner->scan(Object(Psalm\Codebase), Object(Psalm\Storage\FileStorage), false, Object(Psalm\Progress\DefaultProgress))
#4 /app/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(782): Psalm\Internal\Codebase\Scanner->scanFile('/app/vendor/vim...', Array, true)
#5 /app/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(428): Psalm\Internal\Codebase\Scanner->scanAPath(0, '/app/vendor/vim...')
#6 /app/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Scanner.php(280): Psalm\Internal\Codebase\Scanner->scanFilePaths(1)
#7 /app/vendor/vimeo/psalm/src/Psalm/Codebase.php(505): Psalm\Internal\Codebase\Scanner->scanFiles(Object(Psalm\Internal\Codebase\ClassLikes), 1)
#8 /app/vendor/vimeo/psalm/src/Psalm/Config.php(2331): Psalm\Codebase->scanFiles()
#9 /app/vendor/vimeo/psalm/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php(551): Psalm\Config->visitStubFiles(Object(Psalm\Codebase), Object(Psalm\Progress\DefaultProgress))
#10 /app/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(370): Psalm\Internal\Analyzer\ProjectAnalyzer->check('/app/', true)
#11 /app/vendor/vimeo/psalm/psalm(9): Psalm\Internal\Cli\Psalm::run(Array)
#12 /app/vendor/bin/psalm(120): include('/app/vendor/vim...')
#13 {main}
(Psalm 5.13.0@a0a9c27630bcf8301ee78cb06741d2907d8c9fef crashed due to an uncaught Throwable)
I suspect this is because GLOB_BRACE doesn't exist in Alpine.
I've set up a repo to replicate the issue here: https://github.com/andyexeter/psalm-513-alpine-issue-demo
Downgrading to v5.1.2 resolves the issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels