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

Add a command to remove the acme demo bundle #499

Closed
wants to merge 5 commits into from

Conversation

inelgnu
Copy link

@inelgnu inelgnu commented Feb 23, 2013

No description provided.

$security['security']['firewalls']['login'], $security['security']['firewalls']['secured_area']);

file_put_contents($rootDir.'/config/routing_dev.yml', Yaml::dump($route, 6));
file_put_contents($rootDir.'/config/security.yml', Yaml::dump($security, 6));
Copy link
Member

Choose a reason for hiding this comment

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

This will remove all comments in your config files

@stof
Copy link
Member

stof commented Feb 24, 2013

This command has already been rejected 3 or 4 times because it was not possible to ensure the removal would not remove some other stuff in the project. and this implementation does not take care of this at all.

@inelgnu
Copy link
Author

inelgnu commented Feb 24, 2013

well i understand the problem...
is my last solution good ?
this implies that if the default config routing_dev file change the command have to be updated also. But i think that this would't happen frequently. am i wrong?

@stof
Copy link
Member

stof commented Feb 24, 2013

Your new solution is even worse as it will remove any config added by the user in these files

@inelgnu
Copy link
Author

inelgnu commented Feb 24, 2013

you think that's better ?

@dlsniper
Copy link

@inalgnu I think you should rather look here: #412 before going forward with this.
Also, no, the current solution isn't any better.

@inelgnu
Copy link
Author

inelgnu commented Feb 24, 2013

@dlsniper can you please tell me why isn't it?

@dlsniper
Copy link

Because some times AcmeBundle might be left with the developing application for a day or two and so the command is now useless for that case. Please read the whole thread from #412 :)

@jonmchan
Copy link

have we considered the other option of making default symfony project empty and adding a simple command to create AcmeBundle example? Users who are comfortable using symfony do not need this example to be created by default. For new users, making sure the command is dead simple (1 line) would probably suffice to make sure the learning curve to getting symfony2 up and running is not too high.

@ecentinela
Copy link

Or an option to create a symfony project with an argument to avoid acme bundle

@thunderer
Copy link
Contributor

I'd welcome a nice solution to clean standard distribution of that Acme thing, even shipping Symfony without it is a viable for me. OTOH it isn't that hard to rm -rf src/Acme and remove several lines from $bundles array inside app/AppKernel.php and app/config/routing.yml. I don't think it is worth a separate one-time command.

@cordoval
Copy link
Contributor

👎 having this command basically adds confusion to a simple SE. SE is a startup simple thing that you are free to modify later on and adjust to your needs. It is not the ultimate solution for every case.

👶

@jdespatis
Copy link
Contributor

I'm also looking for a clean way to remove this AcmeBundle

AFAIK, I've seen some other frameworks (Sencha Extjs/Touch frameworks for example) letting developers create a project skeleton with a command that also accept a 'starter'

This command first creates an empty skeleton, as clean as possible, and, according to user choice, populate this skeleton with some dumy files as an example of application

Therefore, if a developer, only want the clean skeleton, he/she tells this script to not populate the skeleton with dummy files

Why not having the same logic with Symfony2, as already exposed in this thread ?
(not populate is safer than deleting afterwards)

@althaus
Copy link

althaus commented May 14, 2013

👍 for @jdespatis approach.

@lavoiesl
Copy link

Maybe a better approach would be to create two distributions. The default could be a base one, a bit like https://github.com/ehough/symfony-barebones, and a demo would also be available to download, as a kickstart for enthusiast developers.

@gnugat
Copy link

gnugat commented Jun 18, 2013

I've also made an Empty Edition with AcmeDemo bundle and its configuration (routing and security) completely stripped of, because it's really slowing down the process of creating projects.

This, in my opinion, should be the standard edition, and asecond edition should be made as @lavoiesl proposed (symfony1 had once a sandbox edition for this).

@lsmith77
Copy link
Contributor

struggling to find the time to finish the Liip distribution. there we aim to provide examples as branches while keeping master and so called feature branches (fe. adding FOSRestBundle or the CMF) separate. this way one can get various combinations of features along with examples using them in one repo.

@gnugat
Copy link

gnugat commented Jun 18, 2013

@lsmith77: This is not the way to go IMO. A Symfony2 Factory would be clearly welcomed, using a naked base (somewhere between the onefile-challenge bootstrap and a cleaned distribution and allowing to add easily bundles.

Twitter Bootstrap does this just fine, so...
Why not Symfony2?

@jdespatis
Copy link
Contributor

fmpov, I prefer refering to the official symfony standard, and not to a git fork that may be obsolete whenever symfony-standard evolves

So I've ended with this solution: somekind of git clone symfony-standard, and remove on the fly all Acme stuff
I use yeoman generator for this

Now in one single command, it generates a complete app with no acme (could be a bundle with a fake app for functional tests), and all CI files stuff

@gnugat
Copy link

gnugat commented Jun 18, 2013

I completely agree with you: a third party edition cannot be as fully trusted as the standard one.
While creating tools is an effective solution, I think the best would be to remove AcmeDemo bundle from the standard edition, and create a standard sandbox in a different repository, so people would still have a model to refer to.

@jdespatis
Copy link
Contributor

@gnugat I'd say it's preferable to have a clean symfony standard with no Acme inside, but have the possibility to run a command to install an AcmeBundle as an example (app/console generate:bundle)

That way, we would have the benefit of both worlds : a clean skeleton and a clean one with an example bundle,
and also with only one repository to maintain, instead of 2 that may be desynchronized

@alsar
Copy link

alsar commented Jun 19, 2013

@jdespatis I really like the idea of a clean standard-edition and the possibility to run a console command to install AcmeBundle.
We could also hook up the command with a composer script handler. That way when you run "composer install" composer would ask the user "Do you want ot install AcmeBundle..."

@jdespatis
Copy link
Contributor

@alsar exactly
Inceentev already exists for that kind of questions (it currently set the parameters.yml, during composer install on postHook)

@stof
Copy link
Member

stof commented Jun 19, 2013

@jdespatis The Incenteev ParameterHandler will never ask whether you want to install a demo bundle. It is not even tied to Symfony at all.
And any other script handler could also ask questions. It is just a matter of using the IO.

@wouterj
Copy link
Member

wouterj commented Jun 19, 2013

+1 For removing Acme from the standard and creating a sandbox for the acme demo bundle. You shouldn't create a command for only this imo

@fabpot
Copy link
Member

fabpot commented Mar 14, 2014

Now that we have Composer, I suggest that instead of removing the Acme files/configuration, we actually makes its installation optional when using the create-project command.

Closing in favor of #639, which a meta-issue about things we might improve in the future but for which we don't have the solution yet.

@fabpot fabpot closed this Mar 14, 2014
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.