mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-19 08:39:34 +00:00
EntityExporter: Konstruktor-Deklaration korrigieren; Dienstkonfiguration für Tests aktualisieren
Fügt Standardwerte für autowire und autoconfigure in der Testumgebung hinzu. Markiert EntityExporter als öffentlich und bereinigt die Konstruktor-Definition in der zugehörigen Klasse.
This commit is contained in:
parent
86ac2822b7
commit
5a92086148
2 changed files with 8 additions and 1 deletions
|
|
@ -283,6 +283,10 @@ services:
|
||||||
|
|
||||||
when@test: &test
|
when@test: &test
|
||||||
services:
|
services:
|
||||||
|
_defaults:
|
||||||
|
autowire: true
|
||||||
|
autoconfigure: true
|
||||||
|
|
||||||
# Decorate the doctrine fixtures load command to use our custom purger by default
|
# Decorate the doctrine fixtures load command to use our custom purger by default
|
||||||
doctrine.fixtures_load_command.custom:
|
doctrine.fixtures_load_command.custom:
|
||||||
decorates: doctrine.fixtures_load_command
|
decorates: doctrine.fixtures_load_command
|
||||||
|
|
@ -291,3 +295,6 @@ when@test: &test
|
||||||
- '@doctrine.fixtures.loader'
|
- '@doctrine.fixtures.loader'
|
||||||
- '@doctrine'
|
- '@doctrine'
|
||||||
- { default: '@App\Doctrine\Purger\DoNotUsePurgerFactory' }
|
- { default: '@App\Doctrine\Purger\DoNotUsePurgerFactory' }
|
||||||
|
|
||||||
|
App\Services\ImportExportSystem\EntityExporter:
|
||||||
|
public: true
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ class EntityExporter
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
protected SerializerInterface $serializer,
|
protected SerializerInterface $serializer,
|
||||||
protected AssemblyPartAggregator $partAggregator, private readonly AssemblyPartAggregator $assemblyPartAggregator
|
protected AssemblyPartAggregator $assemblyPartAggregator,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue