Do not autowire bulkImport parameters globally

This commit is contained in:
Jan Böhmer 2025-09-20 14:33:16 +02:00
parent 2c195d9767
commit 98b62cc81e
2 changed files with 3 additions and 2 deletions

View file

@ -17,8 +17,6 @@ services:
bool $gdpr_compliance: '%partdb.gdpr_compliance%'
bool $kernel_debug_enabled: '%kernel.debug%'
string $kernel_cache_dir: '%kernel.cache_dir%'
int $bulkImportBatchSize: '%partdb.bulk_import.batch_size%'
int $bulkImportMaxParts: '%partdb.bulk_import.max_parts_per_operation%'
_instanceof:
App\Services\LabelSystem\PlaceholderProviders\PlaceholderProviderInterface:

View file

@ -33,6 +33,7 @@ use App\Services\InfoProviderSystem\DTOs\FieldMappingDTO;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
@ -46,7 +47,9 @@ class BulkInfoProviderImportController extends AbstractController
private readonly BulkInfoProviderService $bulkService,
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger,
#[Autowire(param: 'partdb.bulk_import.batch_size')]
private readonly int $bulkImportBatchSize,
#[Autowire(param: 'partdb.bulk_import.max_parts_per_operation')]
private readonly int $bulkImportMaxParts
) {
}