Fixes #1791.
Fixes #1791.
Merge branch 'master' of github.com:yiisoft/yii2

Conflicts:
	framework/yii/db/ActiveQuery.php
Fixed test break.
Further cleanup.
added unit test for twig renderer

verify #1755 works
Fix doc for generateSalt.

$cost must be in range 4-31.
Merge pull request #1816 from Crypt/hotfix/Hotfix-PHPDoc

Fix doc for generateSalt.
Fixes #1791