Robert Korulczyk
Robert Korulczyk
I'm afraid this will change behavior for keys with dots, for example`ArrayHelper::map($array, 'model1.id', 'model2.name')`. Old implementation tried to fetch value from `$arrayItem['model1']['id']`, new one will always use `$arrayItem['model1.id']`.
> I also added a `BaseStringHelper::contains()` I'm not sure if it is worth to polyfill function, that exists in PHP since 4 years. This method is already redundant for \~70%...
> if that number is true, that'd mean not including the polyfill would be a breaking change for 30% of users. In what scenario not adding **new** function would be...
My suggestion is: 1. Do not add `BaseStringHelper::contains()`. 2. in `Arrayhelper::map()` use `strpos($to, '.') === false` do detect if key contains dot. If we really want some kind `contains()` helper...
I don't think this is a correct solution. IMO it should be fixed in `QueryBuilder::build()`: https://github.com/yiisoft/yii2/blob/34d2396920a34534fb19cc342b5f4fe863c6e3ac/framework/db/QueryBuilder.php#L225-L269 `$this->buildOrderByAndLimit()` should be called after handing union queries.
@cepaim Does it really work for MySQL? Because only SQLite doesn't have parentheses, for all other DBMS generated query will look like `(SELECT * FROM a) UNION (SELECT * FROM...
PHP should not complain about numerical strings in this case. You will get such error when you try something like `time() + "abcd"`. Typecast wil result `0` in this case,...
> and typecast won't hurt? It may hurt, if value is not a number - then it will be silently casted to `0` and this is not something you want....
Note that there was some discussion about it in: https://discuss.flarum.org/d/22913-what-date-format-do-you-use As for the problem, I would much more prefer format defined as part of forum translation, like: ```js ago =...
> I think this is kinda messy since you have one set of formats in DayJS that cannot be easily edited by forum owners and another set of formats in...