File tree Expand file tree Collapse file tree 2 files changed +6
-21
lines changed
src/Bridge/Symfony/Bundle/DependencyInjection Expand file tree Collapse file tree 2 files changed +6
-21
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ Feature: Configurable resource CRUD
44
44
}
45
45
"""
46
46
47
+ @dropSchema
47
48
Scenario : Retrieve the ConfigDummy resource
48
49
When I send a "GET" request to "/fileconfigdummies/1"
49
50
Then the response status code should be 200
@@ -60,20 +61,3 @@ Feature: Configurable resource CRUD
60
61
"foo": "Foo"
61
62
}
62
63
"""
63
-
64
- @dropSchema
65
- Scenario : Entities can be configured using a Flex-like directory structure
66
- When I send a "GET" request to "/flex_configs"
67
- Then the response status code should be 200
68
- And the response should be in JSON
69
- And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
70
- And the JSON should be equal to:
71
- """
72
- {
73
- "@context": "/contexts/FlexConfig",
74
- "@id": "/flex_configs",
75
- "@type": "hydra:Collection",
76
- "hydra:member": [],
77
- "hydra:totalItems": 0
78
- }
79
- """
Original file line number Diff line number Diff line change @@ -246,13 +246,14 @@ private function getBundlesResourcesPaths(ContainerBuilder $container): array
246
246
247
247
private function getResourcesToWatch (ContainerBuilder $ container , array $ resourcesPaths ): array
248
248
{
249
- // Flex structure
249
+ $ paths = array_unique (array_merge ($ resourcesPaths , $ this ->getBundlesResourcesPaths ($ container )));
250
+
251
+ // Flex structure (only if nothing specified)
250
252
$ projectDir = $ container ->getParameter ('kernel.project_dir ' );
251
- if (is_dir ($ dir = "$ projectDir/config/api_platform " )) {
252
- $ resourcesPaths [] = $ dir ;
253
+ if (! $ paths && is_dir ($ dir = "$ projectDir/config/api_platform " )) {
254
+ $ paths = [ $ dir] ;
253
255
}
254
256
255
- $ paths = array_unique (array_merge ($ resourcesPaths , $ this ->getBundlesResourcesPaths ($ container )));
256
257
$ resources = ['yml ' => [], 'xml ' => [], 'dir ' => []];
257
258
258
259
foreach ($ paths as $ path ) {
You can’t perform that action at this time.
0 commit comments