Skip to content

Commit

Permalink
Merge pull request comur#122 from thelem/thelem/121
Browse files Browse the repository at this point in the history
Symfony flex compatibility
  • Loading branch information
comur authored Apr 16, 2020
2 parents 0a20eab + 4b7a485 commit 95057f4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DependencyInjection/Compiler/FormPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class FormPass implements CompilerPassInterface
*/
public function process(ContainerBuilder $container)
{
$template = "ComurImageBundle:Form:fields.html.twig";
$template = "@ComurImage/Form/fields.html.twig";
$resources = $container->getParameter('twig.form.resources');
// Ensure it wasn't already added via config
if (!in_array($template, $resources)) {
Expand All @@ -41,7 +41,7 @@ public function process(ContainerBuilder $container)
$container->setParameter('twig.form.resources', $resources);
}

$template = "ComurImageBundle:Form:croppable_image_modal.html.twig";
$template = "@ComurImage/Form/croppable_image_modal.html.twig";
// Ensure it wasn't already added via config
if (!in_array($template, $resources)) {
// If form_div_layout.html.twig is found, insert ComurImageBundle right after
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,22 @@ return [
];
```

### Step 3: Create routing files

Two of the bundles provides routes, which must be enabled by creating these files:

```yaml
# config/routes/fos_js_routing.yaml
fos_js_routing:
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing-sf4.xml"
```
```yaml
# config/routes/comur_image.yaml
comur_image:
resource: "@ComurImageBundle/Resources/config/routing.yml"
prefix: /
```
Applications that don't use Symfony Flex
----------------------------------------
Expand Down

0 comments on commit 95057f4

Please sign in to comment.