[PHP] Implicit implements Stringable declaration should produce warning
Open
kind:feature
needs:triage
PHP
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 18
### What happened
Stringable is implicitly present on any class that has the magic ```__toString()``` method defined. It is considered a bad habit not to explicitly state a class as Stringable while it has ```__toString()```.
### How to reproduce
```php
Contributor guide
Research direction
Reproduce the example in Apache NetBeans 18 with a class defining __toString() without explicitly implementing Stringable, and compare it with the explicitly implemented class. Trace the PHP diagnostics for this case and verify that the implicit declaration produces a warning while the explicit implementation remains accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100