mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch '362-bug-manager-registry-fix2' into 'master'
Resolve loading of manager registry Closes #362 See merge request Chill-Projet/chill-bundles!803
This commit is contained in:
commit
40eb71f95a
6
.changes/unreleased/Fixed-20250304-160058.yaml
Normal file
6
.changes/unreleased/Fixed-20250304-160058.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
kind: Fixed
|
||||
body: Fix Dependency Injection, which prevented to save the CalendarRange
|
||||
time: 2025-03-04T16:00:58.269626007+01:00
|
||||
custom:
|
||||
Issue: "362"
|
||||
SchemaChange: No schema change
|
@ -63,7 +63,6 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
parent::getSubscribedServices(),
|
||||
[
|
||||
'chill_main.paginator_factory' => PaginatorFactory::class,
|
||||
ManagerRegistry::class => ManagerRegistry::class,
|
||||
'translator' => TranslatorInterface::class,
|
||||
AuthorizationHelper::class => AuthorizationHelper::class,
|
||||
EventDispatcherInterface::class => EventDispatcherInterface::class,
|
||||
@ -213,7 +212,7 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
|
||||
protected function getManagerRegistry(): ManagerRegistry
|
||||
{
|
||||
return $this->container->get(ManagerRegistry::class);
|
||||
return $this->container->get('doctrine');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -226,7 +225,7 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
|
||||
protected function getValidator(): ValidatorInterface
|
||||
{
|
||||
return $this->get('validator');
|
||||
return $this->container->get('validator');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,8 +68,8 @@ class AddressReferenceBEFromBestAddress
|
||||
$csv->setDelimiter(',');
|
||||
$csv->setHeaderOffset(0);
|
||||
|
||||
$stmt = Statement::create()
|
||||
->process($csv);
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv);
|
||||
|
||||
foreach ($stmt as $record) {
|
||||
$this->baseImporter->importAddress(
|
||||
|
@ -55,8 +55,8 @@ class AddressReferenceFromBAN
|
||||
|
||||
$csv = Reader::createFromStream($csvDecompressed);
|
||||
$csv->setDelimiter(';')->setHeaderOffset(0);
|
||||
$stmt = Statement::create()
|
||||
->process($csv, [
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv, [
|
||||
'id',
|
||||
'id_fantoir',
|
||||
'numero',
|
||||
|
@ -43,8 +43,8 @@ class AddressReferenceFromBano
|
||||
|
||||
$csv = Reader::createFromStream($file);
|
||||
$csv->setDelimiter(',');
|
||||
$stmt = Statement::create()
|
||||
->process($csv, [
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv, [
|
||||
'refId',
|
||||
'streetNumber',
|
||||
'street',
|
||||
|
@ -54,7 +54,8 @@ class AddressReferenceLU
|
||||
|
||||
private function process_address(Reader $csv, ?string $sendAddressReportToEmail = null): void
|
||||
{
|
||||
$stmt = Statement::create()->process($csv);
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv);
|
||||
foreach ($stmt as $record) {
|
||||
$this->addressBaseImporter->importAddress(
|
||||
$record['id_geoportail'],
|
||||
@ -74,7 +75,8 @@ class AddressReferenceLU
|
||||
|
||||
private function process_postal_code(Reader $csv): void
|
||||
{
|
||||
$stmt = Statement::create()->process($csv);
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv);
|
||||
$arr_postal_codes = [];
|
||||
foreach ($stmt as $record) {
|
||||
if (false === \array_key_exists($record['code_postal'], $arr_postal_codes)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user