Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support command aliases #127

Merged
merged 2 commits into from
Sep 27, 2021
Merged

Support command aliases #127

merged 2 commits into from
Sep 27, 2021

Conversation

vjik
Copy link
Member

@vjik vjik commented Sep 27, 2021

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues #125

For commands always use names and aliases from configuration of \Yiisoft\Yii\Console\CommandLoader.
Names and aliases from command class always ignored.

For mark command as hidden start name/aliases definition from |.

Example:

'yiisoft/yii-console' => [
	'commands' => [
		'hello' => Hello::class, // name: 'hello', aliases: [], hidden: false
		'start|run|s|r' => Run::class, // name: 'start', aliases: ['run', 's', 'r'], hidden: false
		'|hack|h' => Run::class, // name: 'hack', aliases: ['h'], hidden: true
	],
],

@vjik vjik added the status:code review The pull request needs review. label Sep 27, 2021
@vjik vjik requested a review from a team September 27, 2021 09:24
@samdark samdark mentioned this pull request Sep 27, 2021
2 tasks
@samdark samdark merged commit 4a2108b into master Sep 27, 2021
@samdark samdark deleted the aliases branch September 27, 2021 11:51
@samdark
Copy link
Member

samdark commented Sep 27, 2021

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants