danielstjules / Stringy

A PHP string manipulation library with multibyte support
MIT License
2.46k stars 216 forks source link

Error: Call to undefined function Stringy\mb_regex_encoding() #129

Closed Nayjest closed 8 years ago

Nayjest commented 8 years ago

Looks like becouse of removing ext-mbsring from composer.json default Heroku PHP buildpack not installs it during deploy. So it uses mb_regex_encoding from polyfill and considering that it's not a php function, it's required to use "\" before function name to specify root namespace.

How to reproduce: I suggest to run tests on environment without ext-mbstring PHP: 7.0.4

danielstjules commented 8 years ago

Darn, this wasn't caught by CI since all envs have mb_string installed by default https://github.com/danielstjules/Stringy/blob/master/.travis.yml

danielstjules commented 8 years ago

A little tough to do right now https://github.com/travis-ci/travis-ci/issues/4701#issuecomment-199454113

But I'll push a patch release. Sorry!

danielstjules commented 8 years ago

Published 2.3.1 with a fix, sorry again!