| Commit message (Collapse) | Author | Age | Files |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, this patch introduces and testes the `checkIconv` static method
that checks whether the `ext/iconv` extension is available or not.
Second, this method is used in the `Ustring::transcode` static method to
test whether this extension is available. If not, then an exception is
thrown.
Finally, because this is only for one method **and** to allow third
implementation to be used instead of the official `ext/iconv` extension,
this extension is now suggested instead of required in the
`composer.json` file. It removes one (strong) dependency to projects
using `hoa/ustring` if they are sure to not use
`Hoa\Ustring::transcode`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, in the constructor, we tested whether the `ext/mbstring`
extension was available or not. This check was made each time the
constructor run. This is useless and we can optimize it. Second, some
static methods were using `ext/mbstring`, so this check was not made and
this situation could lead to unexpected errors.
This patch introduces and testes the `checkMbString` static method. As
its name suggests, it checks whether the `ext/mbstring` extension is
available or not.
We finally use this method globally, after the class declaration, and
throw an exception if the extension is not available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quoting https://github.com/php/php-src/blob/7dcfdbbee4/UPGRADING#L378-L387:
> It is no longer possible to use the following class, interface and trait names
> (case-insensitive):
>
> * bool
> * int
> * float
> * string
> * null
> * false
> * true
|
| |
|
|
|
|
|
|
|
|
|
| |
In case where the `$char` given to `toCode` is not a valid UTF-8
character, a variable was missing. We fix this problem to mimic a valid
UTF-8 character.
Fix https://github.com/hoaproject/String/issues/26. Thanks @mdarse for
the report!
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
Thanks @jubianchi!
|
| |
|
| |
|
| |
|
| |
|
|
|