Skip to content
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

__toString() #18

Closed
OskarStark opened this issue Dec 17, 2019 · 2 comments · Fixed by #32
Closed

__toString() #18

OskarStark opened this issue Dec 17, 2019 · 2 comments · Fixed by #32
Assignees
Milestone

Comments

@OskarStark
Copy link
Contributor

What about don’t __toString() as you cannot throw exceptions?

@asgrim
Copy link
Member

asgrim commented Dec 17, 2019

Since PHP 7.4+ allows exceptions to be thrown in __toString() the benefit for that specific reason is limited.

That said, there is still good reasoning to ban __toString() - see here: ShittySoft/symfony-live-berlin-2018-doctrine-tutorial#3 (comment)

@Ocramius
Copy link
Member

Please do send a patch: good addition 👍

Also, not a problem (IMO) to bump to 7.4 either: past releases still valid anyway

@Ocramius Ocramius added this to the 1.2.0 milestone Dec 17, 2019
@asgrim asgrim removed this from the 1.2.0 milestone Dec 7, 2020
@Ocramius Ocramius added this to the 1.3.0 milestone Jan 7, 2021
@Ocramius Ocramius self-assigned this Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants