Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Added a new "symfony demo" command #118

Closed
wants to merge 3 commits into from

Conversation

javiereguiluz
Copy link
Member

This is a WIP and early release of the new symfony demo command. The general idea around this command is the following:

  • Soon the AcmeDemoBundle will be gone forever.
  • The Symfony Standard Edition (and therefore, the symfony new command) will always give you a clean and empty Symfony application.
  • We'll publish a complete Symfony demo application that combines what we did for the Best Practices book (and which wasn't released) and the current AcmeDemoBundle. This will be a real application using AppBundle and all the best practices. No more Acme or Demo.
  • If you are new to Symfony and want to test it ... install the Symfony Installer in 1 minute and execute the symfony demo command. In 10 seconds you'll have a full-featured Symfony application ready to test.

And here are some comments regarding this command:

  • For now it doesn't download anything because the Symfony_Demo package doesn't exist yet.
  • This command must be as simple as possible (remember that it will be used by newcomers that just want to test-drive Symfony quickly and easily). That's why we don't allow to select the Symfony version (it will always be the most recent one). And we also don't allow to select the directory where the demo project is installed (it will be installed in getcwd().'symfony_demo/')

And here it is the demo command in action:

symfony_demo_command

@Pierstoval
Copy link
Contributor

👍

I'm gonna use this command in my trainings once it becomes available 👍

@xabbuh
Copy link
Member

xabbuh commented Mar 19, 2015

Just a quick suggestion: Instead of copying a lot of code from the new command, we should probably some parts to a dedicated layer and reuse it in both commands. As a benefit, this would probably also ease testing them quite a lot (I still need to wrap up my pull request though).

@javiereguiluz
Copy link
Member Author

@xabbuh what would you think if I make the DemoCommand inherit from the NewCommand?

@xabbuh
Copy link
Member

xabbuh commented Mar 19, 2015

In this case, an abstract base command class would probably be better.

@javiereguiluz
Copy link
Member Author

@xabbuh I've updated this PR to introduce the common abstract method.

}
}

$this->fs->dumpFile($this->downloadedFilePath, $response->getBody());
Copy link
Member

Choose a reason for hiding this comment

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

$this->fs should be moved to the DownloadCommand as it is used here

javiereguiluz added a commit that referenced this pull request Mar 29, 2015
This PR was squashed before being merged into the 1.0-dev branch (closes #121).

Discussion
----------

Improved the Download abstract command

This PR addresses the comments made by @stof in #118 and tries to improve the emergency solution provided by @xabbuh in #120.

Commits
-------

7cf9611 Improved the Download abstract command
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants