-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.x bc layer #512
1.x bc layer #512
Conversation
31fe65b
to
307b3de
Compare
public function __toString(): string | ||
{ | ||
$object = $this->_real(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first, I emitted a deprecation here, saying
Class "Proxy" will not extend \Stringable anymore in 2.0. You should not use Proxy::__toString() nor cast a proxy to string.'
But it can cause some troubles because doctrine sometimes casts the entity to a string when it throws exceptions
I think we should not emit a deprecation here, because whereas we have old or new proxy system, the cast ends up calling real object's __toString()
1f042a6
to
9197b81
Compare
9197b81
to
c63c3fd
Compare
Instantiator::withConstructor()
will throw an exception if class's constructor is not public