Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] More info returned by AboutCommand#29923

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@przemyslaw-bogusz
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
LicenseMIT

This will makeAboutCommand display additional information, indicating which basic symfony bundles are installed. For example:

bundles

As a consequence, a user will have a general idea about the commands that can be run, without having to go through composer.json, or checking if a command is available by trying something likephp bin/console make:entity --help.

@javiereguiluz
Copy link
Member

Thanks for your (first) contribution to Symfony!

I'm not sure I understand the purpose of this change. You mentioned that instead of runningbin/console make:entity and realize it doesn't exist, developers could runbin/console about, check the list of installed bundles ... and then remember which bundle does the command belong to and then decide if it's available or not. It looks more complicated to me :(

@przemyslaw-bogusz
Copy link
ContributorAuthor

This is a kind pf reverse of what I proposed here#29865. Image yourself in the followig situation:

  1. You are working in the terminal and want to create some entities and migrations. You don't know if you have the required bundles, i.e. if you can run the necessary commands likemake:entity, ordoctrine:migrations:migrate. You just runabout and you know what is installed.

  2. Or you run one of these commands and get aCommandNotFoundException. What else is missing? Runabout and you know.

I guess, an experienced Symfony user like you, never had to ask these kind of questions. But a less experienced, like me, had to. So it might be useful to somebody else. If anybody wonders, why not just show the list of commands - listing bundles instead of commands is better, bacuse the list is shorter.

@stof
Copy link
Member

but how many users know exactly which bundle provide which command when they don't have these bundles ?

And which non-installed bundles should we display in the list ? We would have to hardcode a list in Symfony for that (as that cannot rely on installed things). And then, how do we decide which bundle are allowed to enter that list ?

@linaori
Copy link
Contributor

You are working in the terminal and want to create some entities and migrations. You don't know if you have the required bundles

I usually do this:$ composer show | grep the-bundle. It's not ideal and certainly doesn't match the bundle name, but it usually works. Though the command not found message also indicates that it isn't installed.

@przemyslaw-bogusz
Copy link
ContributorAuthor

@stof Yes, the list has to be hardcoded. I included the most common "internal" Symfony bundles, that provide commads.

@iltar That's why I thought that maybe modifyingabout would be a simpler way to get extra information.

To all. I created this PR as a byproduct of another one. It was a quick idea, and seeing your comments, it seems I should have given it more thought. If I don't get any positive reactions, I will close this PR within 24 hours.

@delirehberi
Copy link

I think this is cool but not necessary for a general purpose framework. Maybe one day, someone makes a command list database in flex servers and we improve CommandNotFoundException class, capable of command and bundle relation find.

@przemyslaw-bogusz
Copy link
ContributorAuthor

@delirehberi If I understand you correctly, this is a simple version of what you have in mind#29865

@delirehberi
Copy link

@przemyslaw-bogusz yes, that is related. But I suggest a command-package relation server for ideal resolution for that problem. The reason of server, hardcoded command-package relation data is not enough for fixing that problem.

However, this feature needs internet access. It`s not pretty for error handling.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@przemyslaw-bogusz@javiereguiluz@stof@linaori@delirehberi@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp