Skip to content

Problem on "Console applications" #406

@emiherber

Description

@emiherber

Description

Link to page: Console applications

Subject
Documentation Update: Clarify "Console Application" installation vs. "Console Component"

Description
The current documentation for creating a Console Application can be misleading for new users. It suggests using composer require yiisoft/yii-console, which installs the console component into an existing project, rather than providing the boilerplate needed to bootstrap a standalone console application.

Suggested Change
To improve the developer experience and clarity, the instruction to create a new console application should be updated:
Replace:
composer require yiisoft/yii-console

With:

composer create-project yiisoft/app-console <your-project-directory>

Reasoning

  • Context: Users searching for "How to create a console application" are typically looking for the starting structure (skeleton), not just adding the dependency.

  • Consistency: This aligns with how the Web Application (yiisoft/app) is promoted, ensuring a consistent onboarding flow across different project types.

  • Usability: Using create-project sets up the necessary directory structure, configurations, and entry points (like the yii binary) that are missing when only performing a require.

Note: English is not my native language. This text was translated and structured with the help of Gemini to ensure clarity in the technical proposal.

greetings

Package version

No response

PHP version

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions