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

Adjust Application use statement #6822

Closed
wants to merge 1 commit into from
Closed

Conversation

kvdnberg
Copy link
Contributor

@kvdnberg kvdnberg commented Aug 2, 2016

The code example assumes the use of the Console Application (no kernel parameter) but the use statement is for the Frameworkbundle Console Application, which requires the kernel parameter. This is confusing, basically the example cannot work as it is.

The code example assumes the use of the Console Application (no kernel parameter) but the use statement is for the Frameworkbundle Console Application, which requires the kernel parameter. This is confusing, basically the example cannot work as it is.
@snoek09
Copy link

snoek09 commented Aug 7, 2016

After the code example there's this note:

When using the Console component in a standalone project, use :class:Symfony\\Component\\Console\\Application <Symfony\\Component\\Console\\Application> instead of :class:Symfony\\Bundle\\FrameworkBundle\\Console\\Application <Symfony\\Bundle\\FrameworkBundle\\Console\\Application>

Perhaps this note should be moved up, before the code example.

@kvdnberg
Copy link
Contributor Author

kvdnberg commented Aug 8, 2016

@snoek09 That would be helpful but it doesn't change the fact that the sample itself is invalid. Either it needs to use the console application (as suggested in this PR) or it needs to provide a kernel parameter with the instantiation of the Application class.

@snoek09
Copy link

snoek09 commented Aug 8, 2016

Fix looks fine to me. Thanks @kvdnberg 👍

Status: reviewed.

weaverryan added a commit that referenced this pull request Aug 20, 2016
This PR was submitted for the 3.1 branch but it was merged into the 2.7 branch instead (closes #6822).

Discussion
----------

Adjust Application use statement

The code example assumes the use of the Console Application (no kernel parameter) but the use statement is for the Frameworkbundle Console Application, which requires the kernel parameter. This is confusing, basically the example cannot work as it is.

Commits
-------

38d8f15 Adjust Application use statement
@weaverryan
Copy link
Member

Hey Karin!

This is great - you're absolutely right: the current code example just would not have worked as written. I've merged this PR (into the 2.7 branch) and also added some additional comments about how to do this in the framework at sha: f979387. If you see any issues, please let me know.

Thanks!

@weaverryan weaverryan closed this Aug 20, 2016
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.

4 participants