History log of /PHP-8.0/Zend/tests/stringable_trait.phpt (Results 1 – 2 of 2)
Revision Date Author Comments
# d478ae73 05-Nov-2021 Nikita Popov

Don't implement Stringable on traits

Traits do not support interfaces, so we should not implement
Stringable on them.

Also check the __toString() return type in the same way oth

Don't implement Stringable on traits

Traits do not support interfaces, so we should not implement
Stringable on them.

Also check the __toString() return type in the same way other
magic methods do, otherwise we would now miss the check in the
trait case.

show more ...


# d3932682 04-Nov-2021 Nikita Popov

Fixed bug #81582

If __toString() comes from a trait, implement Stringable during
inheritance.