|
@@ -36,6 +36,7 @@ use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
|
|
|
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
|
|
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
|
|
|
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
|
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
|
|
use Symfony\Contracts\HttpClient\ResponseInterface;
|
|
use Symfony\Contracts\HttpClient\ResponseInterface;
|
|
|
|
|
+use Symfony\Contracts\Service\Attribute\Required;
|
|
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -46,6 +47,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|
|
*/
|
|
*/
|
|
|
class DolibarrSyncService
|
|
class DolibarrSyncService
|
|
|
{
|
|
{
|
|
|
|
|
+ private LoggerInterface $logger;
|
|
|
|
|
+
|
|
|
public function __construct(
|
|
public function __construct(
|
|
|
private OrganizationRepository $organizationRepository,
|
|
private OrganizationRepository $organizationRepository,
|
|
|
private AccessRepository $accessRepository,
|
|
private AccessRepository $accessRepository,
|
|
@@ -54,9 +57,12 @@ class DolibarrSyncService
|
|
|
private AddressPostalUtils $addressPostalUtils,
|
|
private AddressPostalUtils $addressPostalUtils,
|
|
|
private ArrayUtils $arrayUtils,
|
|
private ArrayUtils $arrayUtils,
|
|
|
private TranslatorInterface $translator,
|
|
private TranslatorInterface $translator,
|
|
|
- private LoggerInterface $logger
|
|
|
|
|
) {}
|
|
) {}
|
|
|
|
|
|
|
|
|
|
+ #[Required]
|
|
|
|
|
+ /** @see https://symfony.com/doc/current/logging/channels_handlers.html#how-to-autowire-logger-channels */
|
|
|
|
|
+ public function setLoggerInterface(LoggerInterface $cronLogger): void { $this->logger = $cronLogger; }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Performs a scan, comparing data from the Opentalent DB and the data returned
|
|
* Performs a scan, comparing data from the Opentalent DB and the data returned
|
|
|
* by the Dolibarr API
|
|
* by the Dolibarr API
|