From b17a0ee6787b5141c452a900022b8fb6dd2005e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Chru=C5=9Bciel?= Date: Wed, 23 Dec 2015 15:09:26 +0100 Subject: [PATCH] Introduce DemoBundle --- app/AppKernel.php | 1 + app/config/api.yml | 2 +- app/config/routing.yml | 2 +- src/DemoBundle/DemoBundle.php | 9 +++++++++ src/{AppBundle => DemoBundle}/Entity/Post.php | 2 +- .../Resources/config/doctrine/Post.orm.yml | 2 +- .../Resources/config/routing.yml | 0 .../Tests/Controller/PostControllerApiTest.php | 2 +- .../Tests/DataFixtures/ORM/posts.yml | 2 +- .../Tests/Responses/Expected/posts/create_response.json | 0 .../Tests/Responses/Expected/posts/index_response.json | 0 .../Responses/Expected/posts/not_found_response.json | 0 .../Tests/Responses/Expected/posts/show_response.json | 0 .../Expected/posts/validation_failed_response.json | 0 14 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 src/DemoBundle/DemoBundle.php rename src/{AppBundle => DemoBundle}/Entity/Post.php (95%) rename src/{AppBundle => DemoBundle}/Resources/config/doctrine/Post.orm.yml (92%) rename src/{AppBundle => DemoBundle}/Resources/config/routing.yml (100%) rename src/{AppBundle => DemoBundle}/Tests/Controller/PostControllerApiTest.php (98%) rename src/{AppBundle => DemoBundle}/Tests/DataFixtures/ORM/posts.yml (91%) rename src/{AppBundle => DemoBundle}/Tests/Responses/Expected/posts/create_response.json (100%) rename src/{AppBundle => DemoBundle}/Tests/Responses/Expected/posts/index_response.json (100%) rename src/{AppBundle => DemoBundle}/Tests/Responses/Expected/posts/not_found_response.json (100%) rename src/{AppBundle => DemoBundle}/Tests/Responses/Expected/posts/show_response.json (100%) rename src/{AppBundle => DemoBundle}/Tests/Responses/Expected/posts/validation_failed_response.json (100%) diff --git a/app/AppKernel.php b/app/AppKernel.php index 23a4759..9a1109d 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -22,6 +22,7 @@ public function registerBundles() new Symfony\Bundle\MonologBundle\MonologBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new AppBundle\AppBundle(), + new DemoBundle\DemoBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { diff --git a/app/config/api.yml b/app/config/api.yml index 07c0aec..e371cd1 100644 --- a/app/config/api.yml +++ b/app/config/api.yml @@ -3,7 +3,7 @@ sylius_resource: acme.post: driver: doctrine/orm classes: - model: AppBundle\Entity\Post + model: DemoBundle\Entity\Post fos_rest: disable_csrf_role: ROLE_API diff --git a/app/config/routing.yml b/app/config/routing.yml index 4e5b684..47cd227 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,3 +1,3 @@ acme_demo: - resource: "@AppBundle/Resources/config/routing.yml" + resource: "@DemoBundle/Resources/config/routing.yml" prefix: / diff --git a/src/DemoBundle/DemoBundle.php b/src/DemoBundle/DemoBundle.php new file mode 100644 index 0000000..2436d26 --- /dev/null +++ b/src/DemoBundle/DemoBundle.php @@ -0,0 +1,9 @@ +