Closed dakujem closed 6 years ago
You need to install either the BC Math or GMP extension with PHP to be able to use this package.
Well I understand the error. But how is it possible, that with 2.0.3 which I am using, I do not need it either?
We updated the error messages a while back to make it possible to use either GMP or BC.
Anyway, I wanted to say that somehow it worked with 2.0.3 and not with 2.0.4. Maybe you made some changes that should be noted in a changelog or so. For me it was an update that broke the app. Just to let you know. I do not wish to poke, just trying to help. The lib itself is awesome. Thanks.
It is noted in the changelog https://github.com/ivanakimov/hashids.php/releases/tag/2.0.4
Fair enough. Though the fact that the change breaks a functioning app remains.
I'd have written: "BC Break: blah requirement removed, install either A or B manually."
Never mind. Sorry for wasting your time.
This isn’t a breaking change. If it were we would have it released as a new major version.
What PHP extensions do you have installed in your environment?
Well I'm guessing this is only a problem with Heroku (and similar platforms). Since 2.0.3 had that in composer.json, heroku installed the bcmath extension automatically. 2.0.4 does not. That is why it did not get isntalled. I guess.
Then you can add ext-bcmath
to the required
object in your composer.json
file and you should be good to go.
Yes, thanks for the help. Though i solved the issue even before posting this issue :-) All I wanted to note was what I wrote earlier: It surprised me that after doing a simple "patch" update the app started crashing.
We're sorry about that but we can't support all deployment platforms. If you know of a better way to support two math libraries without forcing to install one of them we would be happy to look at any pull request you send our way.
Sorry, i do not.
hello, i am getting the same error, i installed the bcmath but still is not working
@antonioreyna You are experiencing a different problem. This issue was about a changed behaviour between 2.0.3 and 2.0.4 versions.
Your problem should be fixed by installing either GMP or BCMath. If you are using Heroku (or a similar platform), all you need to do is add either ext-bcmath
or ext-gmp
into the requirements section of your composer.json
file.
Hello. Just run into an issue on Heroku hosted app.
Version
2.0.3
runs fine, version2.0.4
crashes with this:It is confusing... by looking at the code it looks like version 2.0.3 would crash on "bad method call" or similar as well, but it really does not crash with 2.0.3. I'm using the
I have not delved any deeper.
The app is really simple and this is how I use hashids:
where
$this->hs
holds an instance ofHashids\Hashids
class.