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

Re-evaluate icecave dependency #753

Open
W0rma opened this issue Sep 20, 2024 · 4 comments
Open

Re-evaluate icecave dependency #753

W0rma opened this issue Sep 20, 2024 · 4 comments
Labels

Comments

@W0rma
Copy link

W0rma commented Sep 20, 2024

#518 added the dependency to icecave/parity.

In composer/composer#12039 (comment) it was recommended to check whether this dependency is really necessary:

At some point we maybe should (re-) evaluate them. Especially the icecave/* seems the odd one out as it is advertised as a A customizable deep comparison library. Which seems unneeded at a quick glance.

I just created this issue to not forget about this evaluation.

@DannyvdSluijs
Copy link
Collaborator

Thanks for issue report. Is this something you've already did some investigation into or have some knowledge about?
Or is it purely a reminder at this point?

@W0rma
Copy link
Author

W0rma commented Sep 23, 2024

It's purely a reminder.
I haven't done any research yet.

@erayd
Copy link
Contributor

erayd commented Sep 23, 2024

@W0rma The dependency on icecave/parity was added in order to fix an issue with deep comparison of objects in the enum & const constraint validation. PHP did not at the time have a native mechanism to do it properly (is that still the case?)

An alternative to the dependency would be to implement proper deep comparison in this library.

@petski
Copy link

petski commented Nov 26, 2024

justinrainbow/json-schema 6.0.0 requires icecave/parity (1.0.0) 
icecave/parity 1.0.0 requires icecave/repr (~1) 

Both icecave/* dependencies were released 10+ years ago. I found out that icecave/repr even has a file on board (see ./vendor/icecave/repr/src/Generator.php:229) that isn't parsable since PHP 8.0. A fix is already present in icecave/repr@9ccbaec (5 years ago) though...

PHPUnit has a (very) good way of comparing "things", and PHPUnit's author has released the compare component under https://github.com/sebastianbergmann/comparator. It may be a good candidate to swap out icecave/* for sebastianbergmann/comparator (?)

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

No branches or pull requests

4 participants