vinkla / hashids

A small PHP library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user.
https://hashids.org/php
MIT License
5.29k stars 417 forks source link

Fix the data provider to test both Gmp and BCMath when both extensions are installed #189

Closed stof closed 1 year ago

stof commented 1 year ago

Tests should run for both implementations when possible.

vinkla commented 1 year ago

Thanks for the pull request Christophe!

What are the benefits of having both available? We run the test suite twice with each math extension.

https://github.com/vinkla/hashids/blob/c42c4c588fa13cd4b1608f911a8ec44e8e3c6ad8/.github/workflows/phpunit.yml#L12

stof commented 1 year ago

@vinkla this allows having all tests running when running tests locally for instance (and it would also help if you try to compute code coverage)

vinkla commented 1 year ago

Thanks Christophe 🙌