You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php namespace Foo;
// By the gods' wounds, this was an annoying bug!
class Bla {
public function helloWorld() {
return 'hello world';
}
}
will result in this:
<?php namespace Foo;
}
}
and as a result parseFileWithRegexForDefinedEntities will later fail to find the Foo class.
I'd be happy to apply some regex wizardry to find a way to clean this up, but it's very difficult to do so at the moment because cleanContent is completely undocumented and I dunno for sure what stuff it's supposed to be removing from the file content.
The text was updated successfully, but these errors were encountered:
The cleanContent implementation is extremely hacky, the plan was always to replace it with using a proper PHP AST Parser (e.g. https://github.com/nikic/PHP-Parser) completely.
Since this a bit of a larger project and the current hacky and buggy solution is good enough for our use-case this did not have a huge priority so far unfortunately. I also can't give you an estimate when we will get around to do it, but feel free to chip in there :)
Calling
cleanContent
on this file...will result in this:
and as a result
parseFileWithRegexForDefinedEntities
will later fail to find theFoo
class.I'd be happy to apply some regex wizardry to find a way to clean this up, but it's very difficult to do so at the moment because
cleanContent
is completely undocumented and I dunno for sure what stuff it's supposed to be removing from the file content.The text was updated successfully, but these errors were encountered: