Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #113 Add make:crud & improve make:form commands (sadikoff, we…
…averryan) This PR was merged into the 1.0-dev branch. Discussion ---------- Add make:crud & improve make:form commands Hi all, ## Improved make:form command Main improvement is that command works in two ways. First way simple, it just generates skeleton form class and user can do with it whatever he want. Second way is generation from entity class. Generator checks if entity exists and ask user if he wants to generate form from entity or user can use `--entity` flag if he knows that entity exists. ### Generation features: - Simple skeleton form class - Doctrine entity form class ### Examples: **Simple class generation** ```bash root@striX: ~/project_root# bin/console make:form The name of the form class (e.g. GentleElephantType): > SimpleForm Enter the class or entity name that the new form will be bound to (empty for none): > created: src/Form/SimpleFormType.php Success! ``` **Entity form generation** ```bash root@striX: ~/project_root# bin/console make:form The name of the form class (e.g. GentleElephantType): > EntityFormType Enter the class or entity name that the new form will be bound to (empty for none): > Entity created: src/Form/EntityFormType.php Success! ``` Closes: #114 ## New make:crud command Want to introduce `make:crud` command it is similar to doctrine:generate:crud from SensioGeneratorBundle. All you need to generate cool crud is Entity :) ### Features - complete crud generation ### Example: ```bash root@striX: ~/project_root# bin/console make:crud SweetFood created: src/Controller/SweetFoodController.php created: src/Form/SweetFoodType.php created: templates/sweet_food/_delete_form.html.twig created: templates/sweet_food/_form.html.twig created: templates/sweet_food/index.html.twig created: templates/sweet_food/show.html.twig created: templates/sweet_food/new.html.twig created: templates/sweet_food/edit.html.twig Success! ``` Closes: #3 Commits ------- 2683114 some improvements 2ec8ff0 fix form variables 0d9e637 added validation on arguments ada7db0 fix phpcs f740e2e fix variables to follow official recommendations b3bf878 some make:form improvements + experiments 204f5aa final fix for skeleton templates 96d54a7 Merge branch 'master' of https://github.com/sadikoff/maker-bundle 38b2864 Merge remote-tracking branch 'upstream/master' ee98865 making test name less specific so we can run only it ba0438f phpcs fix 3d319bd some skeleton improvements da37780 Merge remote-tracking branch 'upstream/master' 2ebff8c fix cs and improvements according to review request 772f0db fix make:form 44b7851 completed improvement of make:form command db30634 added tests for crud testig ad8a4fb fix tests on appveyor e8eabd6 Merge remote-tracking branch 'upstream/master' 60c0005 php cs fix 404c38f update all to lastest bundle code cc4b758 Merge remote-tracking branch 'upstream/master' 1b95509 add csrf dependency it's necessary for delete action in crud and for better security 52a20bb improve make:crud command to use make:form logic for form generation e24b22c fix to use with php 7.0 7555a3a improved make:form command 4045695 removed unnecessary code 7ed6b8b improved tests 3787739 cs fix 71d2e90 some code refactoring + testing new GeneratorHelper to simplify skeleton templates 6f1c296 array style fix 96f2af2 Merge remote-tracking branch 'upstream/master' ab0a0dc Merge remote-tracking branch 'upstream/master' 422d31b Merge branch 'master' of https://github.com/sadikoff/maker-bundle ff9a08d some fixes 42047a6 fix Token parameter name in delete action 5157e0a fix interception of /new url by show action 7783313 fix fobpot.io cs 31d9e81 fix templates generation with date fields in entity 1b0f17a test remove some phpdoc comments to pass travis.ci 207d8be add exception if entity doesn't exists 478b457 fix fabpot.io cs 3 791241d fix fabpot.io cs 2 9961f43 fix fabpot.io cs f189efd fix tests 8c98b45 trying tests 2 08d4bc5 trying tests 8e9bd67 fix skeleton according to community recommendations e9f91ef add MakeCrud class to makers.xml 6cdda8f final fix fabpot.ci CS 4c0b639 fix fabpot.ci CS bf9a5c1 make:crud command initial commit
- Loading branch information