-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
Psalm fatal error #314
Comments
amphp/amp currently requires psalm 3.11; you could try upgrading your psalm version - psalm 3.8 still has a few issues with templating and generics. |
@kelunik Perhaps it would make sense to explicitly add a conflicts "vimeo/psalm" rule to composer.json for |
Thanks, I can confirm that your advice works: Sylius/SyliusResourceBundle#164 I was expecting something like this, however, I couldn't find this hint. Maybe it will help others in the future. |
@bwoebi that might be a good idea, yes. |
This PR was merged into the 1.7 branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | 1.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | | License | MIT Should resolve: ```bash PHP Fatal error: Uncaught Psalm\Exception\TypeParseTreeException: Unterminated bracket in /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Type/ParseTree.php:571 Stack trace: #0 /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Type.php(171): Psalm\Internal\Type\ParseTree::createFromTokens(Array) #1 /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Visitor/ReflectorVisitor.php(2668): Psalm\Type::parseTokens(Array) #2 /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Visitor/ReflectorVisitor.php(2207): Psalm\Internal\Visitor\ReflectorVisitor->getAssertionParts('array<array-key...', Object(PhpParser\Node\Stmt\Function_)) #3 /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Visitor/ReflectorVisitor.php(323): Psalm\Internal\Visitor\ReflectorVisitor->registerFunctionLike(Object(PhpParser\Node\Stmt\Function_)) #4 /home/travis/build/Sylius/Sylius/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(200): Psalm\Internal\Visitor\Reflect in /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Type/ParseTree.php on line 571 Fatal error: Uncaught Psalm\Exception\TypeParseTreeException: Unterminated bracket in /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Type/ParseTree.php:571 Stack trace: #0 /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Type.php(171): Psalm\Internal\Type\ParseTree::createFromTokens(Array) #1 /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Visitor/ReflectorVisitor.php(2668): Psalm\Type::parseTokens(Array) #2 /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Visitor/ReflectorVisitor.php(2207): Psalm\Internal\Visitor\ReflectorVisitor->getAssertionParts('array<array-key...', Object(PhpParser\Node\Stmt\Function_)) #3 /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Visitor/ReflectorVisitor.php(323): Psalm\Internal\Visitor\ReflectorVisitor->registerFunctionLike(Object(PhpParser\Node\Stmt\Function_)) #4 /home/travis/build/Sylius/Sylius/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(200): Psalm\Internal\Visitor\Reflect in /home/travis/build/Sylius/Sylius/vendor/vimeo/psalm/src/Psalm/Internal/Type/ParseTree.php on line 571 ``` Ref. https://travis-ci.org/github/Sylius/Sylius/jobs/682877325 Ref. amphp/amp#314 <!-- - Bug fixes must be submitted against the 1.6 or 1.7 branches (the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set --> Commits ------- f6819a2 [Maintenance] Upgrade psalm version
Since: v.2.4.3
At @Sylius, we are using psalm pretty extensively. Recently, we have experienced some strange errors connected to your library. Psalm is reporting that you have some
Unterminated bracket
(ref. https://travis-ci.org/github/Sylius/SyliusResourceBundle/jobs/681382237).I don't have time to dig into it right now, so I cannot determine where the problem lays. However, I'm sure that limiting your library below 2.4.3 solves the issue for us. We do not have a direct dependency on you, so I've decided to temporary conflict with the newest releases, which fixed our builds: Sylius/SyliusResourceBundle#163 and Sylius/SyliusResourceBundle#161
If you would be interested, here are some logs:
I just wanted to keep you informed. Maybe some have a similar issue.
Have a good day :)
The text was updated successfully, but these errors were encountered: