Doctrine crud generator command takes a new input option : --force-overwrite
It allows the generation to be done even though the controller already exist
Option renamed: "--force-overwrite" becomes "--overwrite"
[Generator] Added ControllerGenerator
[Command] Added GenerateControllerCommand
[Generate Controller] Created documentation
merged branch WouterJ/adding_generate_controller (PR #157)

This PR was merged into the master branch.

Commits
-------

9636e48 [Generate Controller] Created documentation
ba7ee51 [Command] Added GenerateControllerCommand
a513ff7 [Generator] Added ControllerGenerator

Discussion
----------

[Command][Generator] Created generate:controller

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #33
Todo: -
License of the code: MIT
Documentation PR: na

This PR creates a new Command: `generate:controller`.

This command creates a Controller class and a ControllerTest class inside a given bundle, `--controller AcmeBlogBundle:Post` generates these files: `src/Acme/BlogBundle/Controller/PostController.php` and `src/Acme/BlogBundle/Tests/Controller/PostControllerTest.php`. Both files include use statements and the class.

You can also generate actions. This command creates routing (in the given format), templates (in the given format), test stubs and an action method inside the controller.

---------------------------------------------------------------------------

by WouterJ at 2012-11-28T17:59:31Z

@fabpot Any thoughts about this? /cc @sensio

---------------------------------------------------------------------------

by WouterJ at 2013-01-11T23:25:07Z

Will this PR gets reviewed sometime? Or can I close this PR and just stop sharing my code with the world? I'm disappointed that I don't get any comments on this contribution...

---------------------------------------------------------------------------

by fabpot at 2013-01-12T20:19:23Z

I'm really sorry for the delay. I must admit that this PR was low priority to me as I've (unfortunately) had to work a lot on security issues for Symfony 1 and 2 for the last 3/4 months and of course I still have to cope with the many PRs on Symfony itself. I will definitely review this PR in the new coming days. Thanks for sharing your work and sorry for being too slow.

That also makes me think that I should perhaps ask someone to help me with this bundle.
merged branch NinjDS/crud_force_overwrite (PR #169)

This PR was merged into the master branch.

Commits
-------

3efda38 Option renamed: "--force-overwrite" becomes "--overwrite"
1eec6fc Doctrine crud generator command takes a new input option : --force-overwrite It allows the generation to be done even though the controller already exist

Discussion
----------

[Doctrine][CRUD] option to force overwrite CRUD files

    Bug fix: no
    Feature addition: yes
    Backwards compatibility break: no
    Symfony2 tests pass: yes
    Fixes the following tickets: -
    Todo: -
    License of the code: MIT
    Documentation PR: -`

Introduce a  new option on the CRUD generation command line: --force-overwrite

With that set, the Doctrine CRUD generator command doesn't stop on already existing file and overwrite everything.

Useful when coding CRUD skeletons, testing them often.

---------------------------------------------------------------------------

by NinjDS at 2012-12-26T16:19:58Z

Hi,

Anyone for review? :)

---------------------------------------------------------------------------

by NinjDS at 2013-01-07T16:10:10Z

No activity for over 2 months on this project. Any chance to get feedback here?

---------------------------------------------------------------------------

by fabpot at 2013-01-07T16:50:47Z

Looks good to me. What about renaming `force-overwrite` to just `-overwrite`?

---------------------------------------------------------------------------

by NinjDS at 2013-01-07T16:56:44Z

Hi Fabien,

Well, that's as you wish, i was using the "force" keyword because it's fashionable in Symfony2 commands :)

I'll push a commit with that change tonight.

Just to be sure, you mean that the option should now be named `--overwrite`, right? With two hyphens.

---------------------------------------------------------------------------

by fabpot at 2013-01-07T16:57:32Z

``--overwrite`` looks good.

---------------------------------------------------------------------------

by NinjDS at 2013-01-10T09:25:40Z

Done, PR ready for merging.