phpstan / phpdoc-parser

Next-gen phpDoc parser with support for intersection types and generics
MIT License
1.31k stars 62 forks source link

Add # as vallid character for variable. #218

Closed jonkerw85 closed 11 months ago

jonkerw85 commented 11 months ago

This pull request is related to the issue https://github.com/phpstan/phpstan/issues/9919#issuecomment-1733364261. The problem that it resolves can be seen in https://phpstan.org/r/459a7de6-aa15-42ee-8967-0777088f411e.

Our application is connected to an IBM i DB2 database. The column names are sometimes like the following

Currently, the lexer does not recognize these as valid property names, while in fact, these are valid properties in PHP that can be accessed with $this->{'PBGD#L'} syntax.

ondrejmirtes commented 11 months ago

We can't do this change so lightly. It's a BC break and it's questionable whether we even want that.