Skip to content

Commit 39f74f8

Browse files
committed
EV-267: First take on loading fixtures
1 parent e3bb96c commit 39f74f8

File tree

9 files changed

+439
-9
lines changed

9 files changed

+439
-9
lines changed

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"symfony/expression-language": "6.4.*",
2424
"symfony/flex": "^2",
2525
"symfony/framework-bundle": "6.4.*",
26+
"symfony/http-client": "6.4.*",
2627
"symfony/property-access": "6.4.*",
2728
"symfony/property-info": "6.4.*",
2829
"symfony/runtime": "6.4.*",
@@ -93,6 +94,7 @@
9394
"friendsofphp/php-cs-fixer": "^3.40",
9495
"phpunit/phpunit": "^10.5",
9596
"psalm/plugin-symfony": "^5.1",
97+
"symfony/maker-bundle": "^1.52",
9698
"symfony/phpunit-bridge": "^7.0",
9799
"vimeo/psalm": "^5.16",
98100
"weirdan/doctrine-psalm-plugin": "^2.9"

composer.lock

Lines changed: 264 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/bundles.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
99
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
1010
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
11+
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
1112
];

config/services.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ services:
1111
autowire: true # Automatically injects dependencies in your services.
1212
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
1313

14-
# bind:
15-
# # Bound services
16-
# Elasticsearch\Client: '@api_platform.elasticsearch.client'
17-
1814
# makes classes in src/ available to be used as services
1915
# this creates a service per class whose id is the fully-qualified class name
2016
App\:
@@ -26,3 +22,16 @@ services:
2622

2723
# add more service definitions when explicit configuration is needed
2824
# please note that last definitions always *replace* previous ones
25+
26+
App\Command\FixturesLoadCommand:
27+
arguments:
28+
$appEnv: '%env(string:APP_ENV)%'
29+
30+
31+
Elastic\Elasticsearch\Client:
32+
factory: [ '@Elastic\Elasticsearch\ClientBuilder', fromConfig ]
33+
arguments:
34+
$config:
35+
hosts: [ '%env(INDEX_URL)%' ]
36+
37+
Elastic\Elasticsearch\ClientBuilder: ~

docker-compose.override.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ services:
2828
deploy:
2929
resources:
3030
limits:
31-
memory: 4096M
31+
memory: 1096M
3232
reservations:
33-
memory: 4096M
34-
volumes:
35-
- ./.docker/data/elasticsearch:/usr/share/elasticsearch/data
33+
memory: 1096M
3634
environment:
3735
- discovery.type=single-node
3836
- xpack.security.enabled=false

0 commit comments

Comments
 (0)