Move configuration into the rigth files.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 28 Jun 2018 09:32:06 +0000 (11:32 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 28 Jun 2018 09:32:06 +0000 (11:32 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
config/config.yaml [deleted file]
config/packages/fos_rest.yaml
config/packages/framework.yaml
config/routes.yaml
config/routing.yaml [deleted file]

diff --git a/config/config.yaml b/config/config.yaml
deleted file mode 100644 (file)
index 1bb645b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#config/config.yml
-
-framework:
-    serializer:
-        enabled: true
-
-fos_rest:
-    routing_loader:
-        include_format: false
-    view:
-        view_response_listener: true
-        mime_types:
-            json: ['application/json', 'application/json;version=1.0', 'application/json;version=2.0']
-    format_listener:
-        rules:
-            - { path: '^/api', priorities: ['json'], fallback_format: 'json' }
-    body_listener:
-        enabled: true
-    versioning:
-        enabled: true
-        resolvers:
-            media_type: # Accept header
-                enabled: true
-                regex: '/(v|version)=(?P<version>[0-9\.]+)/'
index 0440800d70a35ca21d63f2c0a7e0dadfc14b2da3..f7062898386a44e0f4f617eb93626f08024c48f2 100644 (file)
@@ -13,3 +13,21 @@ fos_rest: ~
 #    format_listener:
 #        rules:
 #            - { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json, html ] }
+
+    routing_loader:
+        include_format: false
+    view:
+        view_response_listener: true
+        mime_types:
+            json: ['application/json', 'application/json;version=1.0', 'application/json;version=2.0']
+    format_listener:
+        rules:
+            - { path: '^/api', priorities: ['json'], fallback_format: 'json' }
+    body_listener:
+        enabled: true
+    versioning:
+        enabled: true
+        resolvers:
+            media_type: # Accept header
+                enabled: true
+                regex: '/(v|version)=(?P<version>[0-9\.]+)/'
index f37ff702a0f4bfa5d0bdb7d015752e90ba1c3bae..02784c0f365558c244263f6e224a6f7d755fde8e 100644 (file)
@@ -28,4 +28,6 @@ framework:
 
         # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
         #app: cache.adapter.apcu
-    templating: { engines: ['twig'] } 
+
+    serializer:
+        enabled: true
index c3283aa2e33bc813c55504d6c5a7a26653bd3dde..653836363ffb8ea3690668e3066ba47e5b581561 100644 (file)
@@ -1,3 +1,6 @@
 #index:
 #    path: /
 #    controller: App\Controller\DefaultController::index
+person:
+    type:     rest
+    resource: App\Controller\PersonController
diff --git a/config/routing.yaml b/config/routing.yaml
deleted file mode 100644 (file)
index f7572ad..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-person:
-    type:     rest
-    resource: App\Controller\PersonController