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

Remove Dont\ToString from Dont\JustDont #35

Closed
wants to merge 2 commits into from
Closed

Remove Dont\ToString from Dont\JustDont #35

wants to merge 2 commits into from

Conversation

lexidor
Copy link
Contributor

@lexidor lexidor commented Jul 21, 2021

Fixes #34
THIS BREAKS BC
The objects which use this trait are not a Stringable anymore.
Refer to #34 for the full rationale.
Thanks @johanrosenson for reminding me of this issue.

Fixes #34
THIS BREAKS BC
The objects which use this trait are not a Stringable anymore.
Refer to #34 for the full rationale.
Thanks @johanrosenson for reminding me of this issue.
@lexidor
Copy link
Contributor Author

lexidor commented Jul 21, 2021

Oh, yeah. I should probably update the tests XD.

@lexidor
Copy link
Contributor Author

lexidor commented Jul 21, 2021

Also @afilina, you are the author of Dont\ToString, so you'll probably have the best insight in what kind of version change this should be.

@afilina
Copy link
Contributor

afilina commented Jul 21, 2021

The code was written by @OskarStark. I merely cleaned up the PR (tests, docs). I'll chime in regardless.

  • Although the tests pass, I don't see a test case that exposes the bug.
  • We need to update the documentation: https://github.com/Roave/Dont/blob/1.4.x/docs/JustDont.md We'll probably need to include the rationale behind this change.
  • Anything that breaks BC would normally go into a major release (2.x).
  • We might as well completely remove the trait if it causes problems with PHP 8.0+.

@lexidor
Copy link
Contributor Author

lexidor commented Jul 21, 2021

If 2.0 is what we're going for (strict semver), PR #32 could be reverted and the README would need to mention this change. I feel uncomfortable erasing hard work of someone else without reaching out to them first. I'll give @OskarStark some time to respond. I hope you do not take the critiques in #34 personally. You made this PR at a different point in time when the language semantics were different.

@OskarStark
Copy link
Contributor

Sounds reasonable, we should remove it from Dont in a new major and, if not done yet, bump php min to 8.

Does that makes sense?

@lexidor
Copy link
Contributor Author

lexidor commented Jul 22, 2021

Okay, then I'll close this PR. What is the preferred way to revert a PR for this project?

@lexidor lexidor closed this Jul 22, 2021
@afilina
Copy link
Contributor

afilina commented Jul 22, 2021

The minimum is already 8.0 according to composer.json. I haven't considered the fact that the introduction of Dont\ToString is a BC break in itself. It might be viewed as a bug, I suppose, therefore could be reverted any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dont\ToString lies to its consumers in PHP 8 because it implements Stringable
3 participants