sebastianbergmann / comparator

Provides the functionality to compare PHP values for equality.
BSD 3-Clause "New" or "Revised" License
6.97k stars 67 forks source link

`ObjectComparator::assertEquals()` fixes closure comparison #94

Closed WinterSilence closed 2 years ago

WinterSilence commented 2 years ago

Example of compare closures https://3v4l.org/NbIOq#v7.3.33

sebastianbergmann commented 2 years ago

What is your use case for wanting to compare closures?

sebastianbergmann commented 2 years ago

And please write commit messages that are more descriptive than just Update ObjectComparatorTest.php. Thanks!

WinterSilence commented 2 years ago

@sebastianbergmann This is useful to compare complex objects uses closures as properties. The native comparison $closure == $closure2 work as $closure === $closure2, my solution not so strict.

And please write commit messages that are more descriptive than just Update ObjectComparatorTest.php

😕 sorry, last commits only try normalize code style

sebastianbergmann commented 2 years ago

Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it.

WinterSilence commented 2 years ago

@sebastianbergmann what's reason?