-
Notifications
You must be signed in to change notification settings - Fork 942
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
3.0.5 breaks PHPStan #834
Comments
Also breaks Lines 21 to 27 in 7f4b9e0
/cc @Arslanoov |
Could I get some details about PHPStan version and the level you are using? |
I'm using the latest PHPStan in a Cake PHP project that has swagger-php installed as well. I think it's not an issue when running against this project but within a project that has swagger-php as a dependency. |
Hmmm. Tricky; I guess without reproduction steps this will be hard to change. |
Repro repohttps://github.com/weirdan/parser-fail Steps to reproduce$ git clone git@github.com:weirdan/parser-fail.git
Cloning into 'parser-fail'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (4/4), done.
Receiving objects: 100% (6/6), done.
remote: Total 6 (delta 0), reused 6 (delta 0), pack-reused 0
$ cd parser-fail
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 8 installs, 0 updates, 0 removals
- Installing doctrine/lexer (1.2.1): Loading from cache
- Installing nikic/php-parser (v4.9.1): Loading from cache
- Installing symfony/deprecation-contracts (v2.1.3): Loading from cache
- Installing symfony/polyfill-ctype (v1.18.1): Loading from cache
- Installing symfony/yaml (v5.1.3): Loading from cache
- Installing symfony/finder (v5.1.3): Loading from cache
- Installing doctrine/annotations (1.10.4): Loading from cache
- Installing zircote/swagger-php (3.0.5): Loading from cache
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
Generating autoload files
5 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
$ vendor/bin/php-parse test.php
====> File test.php:
Syntax error, unexpected T_NAME_FULLY_QUALIFIED on line 2 Expected$ vendor/bin/php-parse test.php
====> File test.php:
==> Node dump:
array(
0: Stmt_Namespace(
name: Name(
parts: array(
0: Weirdan
1: ParserFail
)
)
stmts: array(
)
)
) Actual$ vendor/bin/php-parse test.php
====> File test.php:
Syntax error, unexpected T_NAME_FULLY_QUALIFIED on line 2 |
Funny, for some reason it doesn't like them both having the same value. I can create a fix, but unfortunately I have no permission to update pacagist or create a release :/ |
🤔 still happening for me on dev-master |
You must be getting an old revision of dev-master, as the package on Packagist is not autoupdated: |
@swiffer doing |
yes, now works fine - thanks! |
After upgrading to 3.0.5 I'm experiencing a lot of errors when running PHPStan
Line Command\ConsoleCommand.php
17 Syntax error, unexpected T_NAME_FULLY_QUALIFIED on line 17
The text was updated successfully, but these errors were encountered: