phpnsc icon indicating copy to clipboard operation
phpnsc copied to clipboard

Finds `new something` in nowdocs/heredocs

Open beberlei opened this issue 12 years ago • 4 comments

When i run the tool on files with nowdocs/heredocs containing the words new foo then it things foo is a classname that is undefined.

beberlei avatar Aug 17 '13 22:08 beberlei

That reminds me again that I always wanted to migrate the tool to use php_parser instead of doing everything by hand with regexes. Shouldn't be too hard and also would catch all of these cases that don't happen in our codebase like this one. Unfortunately I don't know when I'll have time for it, especially since it's no pressing issue for us at the moment as the tool does what it is supposed to do very well on our codebase ;)

bashofmann avatar Aug 20 '13 17:08 bashofmann

Is this still valid? It looks like you're using PHPParser now.

Rican7 avatar Feb 13 '15 00:02 Rican7

Ah... I just noticed you're including the PHPParser in composer but it doesn't look like any of the code is actually using it. :/

Rican7 avatar Feb 13 '15 00:02 Rican7

Unfortunately I did not get any further then this so far

bashofmann avatar Feb 13 '15 10:02 bashofmann