Create console controller with an action which has one required parameter:
public function actionSend($chatId)
{
$result = \Longman\TelegramBot\Request::sendMessage([
'chat_id' => $chatId,
'text' => 'some text',
]);
}
Than run this command with negative chatId:
yii messenger/send -12345
Expected result is running actionSend() with $chatId equals to -12345
You'll get Error: Unknown alias: -12345
| Q | A
| ---------------- | ---
| Yii version | 2.0.10
| PHP version | 7.0.13
| Operating system | Ubuntu 16.0.4
What will happen if you wrap your value in quotes:
yii messenger/send '-12345'
?
@klimov-paul the same. quotes are interpreted at bash level.
@cebe @uaoleg check my pull request https://github.com/yiisoft/yii2/pull/13220 please.
@cebe can you set this issue to 2.0.11 version?
Most helpful comment
@klimov-paul the same. quotes are interpreted at bash level.