From https://github.com/yiisoft/yii2/commit/588f9fd57579435482a5f6eeda792ed0049e8f4d