-
-
Notifications
You must be signed in to change notification settings - Fork 152
Description
- bug report? no
- feature request? yes
- follow up of Strings: normalize strings into UTF-8 NFC #150
Description
Currently in there are dependencies on php extensions with are marked as suggested. This makes sense as not everyone what to use everything from utils package (as it is collection of independent tools).
"suggest": {
"ext-iconv": "to use Strings::webalize() and toAscii()",
"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
"ext-mbstring": "to use Strings::lower() etc...",
"ext-xml": "to use Strings::length() etc. when mbstring is not available",
"ext-json": "to use Nette\\Utils\\Json",
"ext-gd": "to use Image"
}I have identified 3 groups of dependencies:
StringsrelatedJsonrelatedImagerelated
It happened to me for few times that I have deployed something it passed and then I realized that I forgot to enable json extension. I these extensions are required I would be stopped in installation process, before deploy.
Another thing using Strings class is complex due to 4 extensions that need to properly selected each time someone uses utils. This is so complex that in most my projects there aren't these extensions named in requires as I thought that I'm using nette\utils, they provide Strings class so they will care about dependencies. But they don't.
Goal:
- I would like to share my confusion
- I would like to identify "core" functionality and move it's dependencies into
requires - Or find alternative solution to omit surprises at deploy