path: root/composer.json
diff options
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2015-08-03 07:06:46 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2015-08-03 07:06:46 +0200
commit9c6e7c84880c457a836fea4c9f4668ef766765dd (patch)
tree4ed882b6fd8a118aa7bdaa19d92d5a0735a3372f /composer.json
parent4cf922258a87eeb7edc592b45b21c6cf67b9bc5a (diff)
`ext/iconv` is suggested, no longer required.
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`.
Diffstat (limited to 'composer.json')
1 files changed, 3 insertions, 3 deletions
diff --git a/composer.json b/composer.json
index 1474a13..081f596 100644
--- a/composer.json
+++ b/composer.json
@@ -21,8 +21,7 @@
"source": "http://git.hoa-project.net/"
"require": {
- "hoa/core" : "~2.0",
- "ext-iconv" : "*"
+ "hoa/core": "~2.0"
"require-dev": {
"hoa/test": "~1.0"
@@ -33,7 +32,8 @@
"suggest": {
- "ext-intl": "To get a better Hoa\\Ustring::toAscii() and Hoa\\Ustring::compareTo()."
+ "ext-iconv": "ext/iconv must be present (or a third implementation) to use Hoa\\Ustring::transcode().",
+ "ext-intl" : "To get a better Hoa\\Ustring::toAscii() and Hoa\\Ustring::compareTo()."
"extra" : {
"branch-alias": {