Skip to content

Commit 95057f4

Browse files
authored
Merge pull request #122 from thelem/thelem/121
Symfony flex compatibility
2 parents 0a20eab + 4b7a485 commit 95057f4

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

DependencyInjection/Compiler/FormPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class FormPass implements CompilerPassInterface
2626
*/
2727
public function process(ContainerBuilder $container)
2828
{
29-
$template = "ComurImageBundle:Form:fields.html.twig";
29+
$template = "@ComurImage/Form/fields.html.twig";
3030
$resources = $container->getParameter('twig.form.resources');
3131
// Ensure it wasn't already added via config
3232
if (!in_array($template, $resources)) {
@@ -41,7 +41,7 @@ public function process(ContainerBuilder $container)
4141
$container->setParameter('twig.form.resources', $resources);
4242
}
4343

44-
$template = "ComurImageBundle:Form:croppable_image_modal.html.twig";
44+
$template = "@ComurImage/Form/croppable_image_modal.html.twig";
4545
// Ensure it wasn't already added via config
4646
if (!in_array($template, $resources)) {
4747
// If form_div_layout.html.twig is found, insert ComurImageBundle right after

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,22 @@ return [
115115
];
116116
```
117117

118+
### Step 3: Create routing files
119+
120+
Two of the bundles provides routes, which must be enabled by creating these files:
121+
122+
```yaml
123+
# config/routes/fos_js_routing.yaml
124+
fos_js_routing:
125+
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing-sf4.xml"
126+
```
127+
```yaml
128+
# config/routes/comur_image.yaml
129+
comur_image:
130+
resource: "@ComurImageBundle/Resources/config/routing.yml"
131+
prefix: /
132+
```
133+
118134
119135
Applications that don't use Symfony Flex
120136
----------------------------------------

0 commit comments

Comments
 (0)