Commit 84af0ad1 by Alexander Makarov

Fixes #4592: Fixed `yii help` command was listing incorrect action names for…

Fixes #4592: Fixed `yii help` command was listing incorrect action names for methods like `actionSayNO`
parent 7aa6a30d
...@@ -78,6 +78,7 @@ Yii Framework 2 Change Log ...@@ -78,6 +78,7 @@ Yii Framework 2 Change Log
- Bug #4497: Fixed StringHelper::byteSubstr() returning empty string on null $length param (mbman) - Bug #4497: Fixed StringHelper::byteSubstr() returning empty string on null $length param (mbman)
- Bug #4514: Fixed Request class crashing when empty CSRF token value is sent in cookie (cebe) - Bug #4514: Fixed Request class crashing when empty CSRF token value is sent in cookie (cebe)
- Bug #4519: `yii\base\Model::isAttributeRequired()` should check if the `when` option of the validator is set (thiagotalma) - Bug #4519: `yii\base\Model::isAttributeRequired()` should check if the `when` option of the validator is set (thiagotalma)
- Bug #4592: Fixed `yii help` command was listing incorrect action names for methods like `actionSayNO` (samdark)
- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark) - Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark)
- Bug: URL encoding for the route parameter added to `\yii\web\UrlManager` (klimov-paul) - Bug: URL encoding for the route parameter added to `\yii\web\UrlManager` (klimov-paul)
- Bug: Fixed the bug that requesting protected or private action methods would cause 500 error instead of 404 (qiangxue) - Bug: Fixed the bug that requesting protected or private action methods would cause 500 error instead of 404 (qiangxue)
......
...@@ -121,7 +121,7 @@ class HelpController extends Controller ...@@ -121,7 +121,7 @@ class HelpController extends Controller
foreach ($class->getMethods() as $method) { foreach ($class->getMethods() as $method) {
$name = $method->getName(); $name = $method->getName();
if ($method->isPublic() && !$method->isStatic() && strpos($name, 'action') === 0 && $name !== 'actions') { if ($method->isPublic() && !$method->isStatic() && strpos($name, 'action') === 0 && $name !== 'actions') {
$actions[] = Inflector::camel2id(substr($name, 6)); $actions[] = Inflector::camel2id(substr($name, 6), '-', true);
} }
} }
sort($actions); sort($actions);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment