Skip to content
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

Test dev phpdoc/parser #1406

Closed
wants to merge 1 commit into from
Closed

Test dev phpdoc/parser #1406

wants to merge 1 commit into from

Conversation

ondrejmirtes
Copy link
Member

No description provided.

@ondrejmirtes
Copy link
Member Author

@rvanvelzen And we have a bug :)

------ ----------------------------------------------------------------------- 
  Line   src/Parser/CachedParser.php                                            
 ------ ----------------------------------------------------------------------- 
  13     PHPDoc tag @var has invalid value (array<string, Node\Stmt[]>):        
         Unexpected token "*/", expected TOKEN_HORIZONTAL_WS at offset 35       

This is the offending PHPDoc:

	/** @var array<string, Node\Stmt[]>*/
	private array $cachedNodesByString = [];

I think no white-space before the ending */ should be fine...

@ondrejmirtes
Copy link
Member Author

An idea - looking at the integration results, we should be super-careful, it should be possible to make the behaviour in phpstan/phpdoc-parser#128 optional. PhpDocParser could have an optional constructor parameter, we could then change the default behaviour as part of bleedingEdge in phpstan-src.

But #1406 (comment) is still a bug that should be fixed IMHO :)

@ondrejmirtes ondrejmirtes deleted the test-phpdoc-parser branch June 9, 2022 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant