Skip to content

Commit

Permalink
Fix issue with loading fixture images on standalone project
Browse files Browse the repository at this point in the history
  • Loading branch information
senghe committed Oct 8, 2024
1 parent 4c1d985 commit bb5343c
Show file tree
Hide file tree
Showing 24 changed files with 2 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/DependencyInjection/SyliusCmsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function load(array $configs, ContainerBuilder $container): void
public function prepend(ContainerBuilder $container): void
{
$config = $this->getCurrentConfiguration($container);
$container->setParameter('sylius_cms.fixtures_dir', __DIR__.'/../Resources/config/fixtures');

$this->registerResources('sylius_cms', 'doctrine/orm', $config['resources'], $container);

Expand Down
3 changes: 0 additions & 3 deletions src/Resources/config/fixtures/1_collection.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
parameters:
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"

sylius_fixtures:
suites:
default:
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/fixtures/1_media.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"
fixtures_dir: "%sylius_cms.fixtures_dir%/images"

sylius_fixtures:
suites:
Expand Down
3 changes: 0 additions & 3 deletions src/Resources/config/fixtures/1_template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
parameters:
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"

sylius_fixtures:
suites:
default:
Expand Down
3 changes: 0 additions & 3 deletions src/Resources/config/fixtures/2_block.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
parameters:
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"

sylius_fixtures:
suites:
default:
Expand Down
3 changes: 0 additions & 3 deletions src/Resources/config/fixtures/2_page.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
parameters:
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"

sylius_fixtures:
suites:
default:
Expand Down

0 comments on commit bb5343c

Please sign in to comment.