[php-src] Issue #7873: Adding __toString method to class defined below instantiation causes class to not be detected
| From: | iluuu1994 | Date: | Mon, 03 Jan 2022 10:56:32 +0000 |
| Subject: | [php-src] Issue #7873: Adding __toString method to class defined below instantiation causes class to not be detected | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-238721@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7873
Comment Author: iluuu1994
I think this comes down to classes with
__toString implicitly implementing
Stringable. When classes have inheritance their definition becomes order-dependent. In
this case that's not really true as Stringable is internal and will always be
declared first. That said, the order dependence is a known issue and AFAIK a WONTFIX. I'm not
sure it's worth adding a special case here.