Skip to content

[FrameworkBundle] Hide server:log command based on deps #25027

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

Merged

Conversation

sroze
Copy link
Contributor

@sroze sroze commented Nov 19, 2017

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #25025
License MIT
Doc PR ø

Remove the server:log command if monolog is not installed.

@ro0NL
Copy link
Contributor

ro0NL commented Nov 19, 2017

in fact, the issue looks related to lazy command loading given ServerLogCommand::isEnabled is called 🤔

looking at Application::get we call add($lazyLoadedCommand), but add() itself doesnt register if it's a disabled command, yet get() happily returns $lazyLoadedCommand anyway. Causing server:log also to look available in bin/console list.

@chalasr
Copy link
Member

chalasr commented Nov 19, 2017

See #25030

@sroze
Copy link
Contributor Author

sroze commented Nov 19, 2017

I think I prefer your approach @chalasr 👍

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this one stays fine regarding the framework, no need to process a useless definition esp. based on class existence.

@nicolas-grekas
Copy link
Member

Thank you @sroze.

@nicolas-grekas nicolas-grekas merged commit b505ac7 into symfony:3.4 Nov 19, 2017
nicolas-grekas added a commit that referenced this pull request Nov 19, 2017
…roze)

This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Hide server:log command based on deps

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25025
| License       | MIT
| Doc PR        | ø

Remove the `server:log` command if monolog is not installed.

Commits
-------

b505ac7 Remove the `server:log` command if monolog is not loaded
@sroze sroze deleted the issue-25025-hide-serverlog-based-on-deps branch November 19, 2017 20:19
This was referenced Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants