Revert "Removed legacy toString implementations as promised in 7.0
(#10916)" (accidentally merged from 7.1)

This reverts commit 5be248803b9b670cd4cf24d5173e7f580180545e.

Change-Id: If4371976f8afe68d08e814128e3256d66b8ecdb3