A bit less stricter check as suggested by @qiang: https://github.com/yiisoft/yii2/commit/2aa8fc71714134feac3f0a09dd61837d920be534