Warn if an object lacking __toString() is cast to string
Open
@TysonAndre is already working on this.
Since Sep 2, 2019.
enhancement
- Dominant language
- PHP
- Stars
- 5.6k
- Forks
- 365
- Avg merge
- 1h 25m
- Merged PRs (30d)
- 6
Description
Also, warn if __toString() is @deprecated
Observed: there are no Phan warnings
<?php
class MyClass2 {
}
$x = new MyClass2();
$a = (string)$x;
$a = (int)$x; // also warn about this
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.