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 $maxDepth attribute, parameter, etc. #3336

Closed
sebastianbergmann opened this issue Oct 10, 2018 · 4 comments
Closed

Remove $maxDepth attribute, parameter, etc. #3336

sebastianbergmann opened this issue Oct 10, 2018 · 4 comments
Labels
type/backward-compatibility Something will be/is intentionally broken

Comments

@sebastianbergmann
Copy link
Owner

Moved here from #3335 (comment).

@sebastianbergmann sebastianbergmann added the type/backward-compatibility Something will be/is intentionally broken label Oct 10, 2018
@sebastianbergmann sebastianbergmann added this to the PHPUnit 8.0 milestone Oct 10, 2018
@localheinz
Copy link
Collaborator

Also replaces #3180.

@sebastianbergmann
Copy link
Owner Author

Removing the $maxDepth parameter from assertEquals() etc. will break all tests that use assertEquals() with optional parameters that go after $maxDepth.

The only way to clean up assertEquals() that {hopefully|possibly} causes less problems would be to clean up more drastically and not only remove $maxDepth but also all optional parameters that come after it. This, too, is not really appealling.

All these optional parameters should have never been added, they make for a terrible API. I am not sure, though, if the benefit of cleaning up assertEquals() etc. by removing these optional parameters and adding more specific assertion methods in their stead outweighs the pain of breaking compatibility.

@Jean85
Copy link
Contributor

Jean85 commented Oct 10, 2018

The only parameter that I used sometimes is the ignore case one. Never used any other.

Migrating to a dedicated assertion for that seems a reasonable upgrade path for me.

@sebastianbergmann
Copy link
Owner Author

Superseded by #3341.

@sebastianbergmann sebastianbergmann removed this from the PHPUnit 8.0 milestone Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/backward-compatibility Something will be/is intentionally broken
Projects
None yet
Development

No branches or pull requests

3 participants