Skip to content

Changes to the standalone console testing section #1079

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
merged 4 commits into from
Feb 20, 2012

Conversation

richardmiller-zz
Copy link
Contributor

Creating a new Application and passing it a kernel seem to me to be specific to using the console as part of the full stack and are unnecessary if the console component is being used on its own.

@stof
Copy link
Member

stof commented Feb 14, 2012

There is an issue here: the command has a getApplication method. If it is not set in an application, the method will return null which may break your command whereas it will work when using it in the CLI.

@richardmiller-zz
Copy link
Contributor Author

Ah I see, passing the kernel still needs removing as this is specific to the FrameworkBundle version of Application.

Having to specify the command name in the arguments seems counter intuitive since the CommandTest object only tests a single Command but that is not a documentation issue I guess.

@stof
Copy link
Member

stof commented Feb 14, 2012

Some other things in this chapter are not related to the standalone component either. the ContainerAwareCommand from FrameworkBundle will work only when using the extended Application class from the bundle

@richardmiller-zz
Copy link
Contributor Author

I've removed the ContainerAwareCommand section and added another on creating a file to run at the command line since app/console would not be in place if using as standalone.

weaverryan added a commit that referenced this pull request Feb 20, 2012
Changes to the standalone console testing section
@weaverryan weaverryan merged commit 2fed448 into symfony:2.0 Feb 20, 2012
@weaverryan
Copy link
Member

Yea, well done Richard - I think that we had a bunch of existing code that was just moved into this standalone section.

I still think we have a bit more work to do, however. For example, the Creating a basic Command immediately starts into a Symfony2 framework context. So, this all needs some more love - we should mention the "Command" directory thing, but only as a note later related to bundles.

I've opened up an issue on this topic: #1091

Thanks!

@richardmiller-zz
Copy link
Contributor Author

Yeah, it looks like it was a cookbook article to start with that was moved into the components section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants