Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

fix: Licence data service duplicated in service manager causing multi… #44

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion module/Olcs/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,6 @@
DataService\IrhpPermitPrintRangeType::class => DataService\IrhpPermitPrintRangeTypeFactory::class,
DataService\IrhpPermitPrintStock::class => DataService\IrhpPermitPrintStockFactory::class,
DataService\IrhpPermitPrintType::class => CommonDataService\AbstractDataServiceFactory::class,
DataService\Licence::class => DataService\LicenceFactory::class,
DataService\OperatingCentresForInspectionRequest::class => DataService\OperatingCentresForInspectionRequestFactory::class,
DataService\PaymentType::class => CommonDataService\RefDataFactory::class,
DataService\PresidingTc::class => CommonDataService\AbstractDataServiceFactory::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Common\Service\Cqrs\Command\CommandService;
use Common\Service\Cqrs\Query\QueryService;
use Common\Service\Data\PluginManager;
use Common\Service\Helper\DateHelperService;
use Common\Service\Helper\FlashMessengerHelperService;
use Common\Service\Helper\FormHelperService;
Expand Down Expand Up @@ -34,7 +35,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$transferAnnotationBuilder = $container->get(AnnotationBuilder::class);
$commandService = $container->get(CommandService::class);
$flashMessengerHelper = $container->get(FlashMessengerHelperService::class);
$licenceDataService = $container->get(Licence::class);
$licenceDataService = $container->get(PluginManager::class)->get(Licence::class);
$queryService = $container->get(QueryService::class);
$navigation = $container->get('Navigation');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Common\Service\Cqrs\Command\CommandService;
use Common\Service\Cqrs\Query\QueryService;
use Common\Service\Data\PluginManager;
use Common\Service\Helper\DateHelperService;
use Common\Service\Helper\FlashMessengerHelperService;
use Common\Service\Helper\FormHelperService;
Expand Down Expand Up @@ -36,7 +37,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$transferAnnotationBuilder = $container->get(AnnotationBuilder::class);
$commandService = $container->get(CommandService::class);
$flashMessengerHelper = $container->get(FlashMessengerHelperService::class);
$licenceDataService = $container->get(Licence::class);
$licenceDataService = $container->get(PluginManager::class)->get(Licence::class);
$queryService = $container->get(QueryService::class);
$navigation = $container->get('Navigation');
$docSubCategoryDataService = $container->get(DocumentSubCategory::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Common\Service\Cqrs\Command\CommandService;
use Common\Service\Cqrs\Query\QueryService;
use Common\Service\Data\PluginManager;
use Common\Service\Helper\DateHelperService;
use Common\Service\Helper\FlashMessengerHelperService;
use Common\Service\Helper\FormHelperService;
Expand Down Expand Up @@ -35,7 +36,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$transferAnnotationBuilder = $container->get(AnnotationBuilder::class);
$commandService = $container->get(CommandService::class);
$flashMessengerHelper = $container->get(FlashMessengerHelperService::class);
$licenceDataService = $container->get(Licence::class);
$licenceDataService = $container->get(PluginManager::class)->get(Licence::class);
$queryService = $container->get(QueryService::class);
$navigation = $container->get('Navigation');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Common\Service\Cqrs\Command\CommandService;
use Common\Service\Cqrs\Query\QueryService;
use Common\Service\Data\PluginManager;
use Common\Service\Helper\DateHelperService;
use Common\Service\Helper\FlashMessengerHelperService;
use Common\Service\Helper\FormHelperService;
Expand Down Expand Up @@ -37,7 +38,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$transferAnnotationBuilder = $container->get(AnnotationBuilder::class);
$commandService = $container->get(CommandService::class);
$flashMessengerHelper = $container->get(FlashMessengerHelperService::class);
$licenceDataService = $container->get(Licence::class);
$licenceDataService = $container->get(PluginManager::class)->get(Licence::class);
$queryService = $container->get(QueryService::class);
$navigation = $container->get('Navigation');
$translationHelper = $container->get(TranslationHelperService::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Common\Service\Cqrs\Command\CommandService;
use Common\Service\Cqrs\Query\QueryService;
use Common\Service\Data\PluginManager;
use Common\Service\Helper\DateHelperService;
use Common\Service\Helper\FlashMessengerHelperService;
use Common\Service\Helper\FormHelperService;
Expand Down Expand Up @@ -34,7 +35,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$transferAnnotationBuilder = $container->get(AnnotationBuilder::class);
$commandService = $container->get(CommandService::class);
$flashMessengerHelper = $container->get(FlashMessengerHelperService::class);
$licenceDataService = $container->get(Licence::class);
$licenceDataService = $container->get(PluginManager::class)->get(Licence::class);
$queryService = $container->get(QueryService::class);
$navigation = $container->get('Navigation');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Common\Service\Cqrs\Command\CommandService;
use Common\Service\Cqrs\Query\QueryService;
use Common\Service\Data\PluginManager;
use Common\Service\Helper\DateHelperService;
use Common\Service\Helper\FlashMessengerHelperService;
use Common\Service\Helper\FormHelperService;
Expand Down Expand Up @@ -38,7 +39,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$transferAnnotationBuilder = $container->get(AnnotationBuilder::class);
$commandService = $container->get(CommandService::class);
$flashMessengerHelper = $container->get(FlashMessengerHelperService::class);
$licenceDataService = $container->get(Licence::class);
$licenceDataService = $container->get(PluginManager::class)->get(Licence::class);
$queryService = $container->get(QueryService::class);
$navigation = $container->get('Navigation');
$translationHelper = $container->get(TranslationHelperService::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Common\Service\Cqrs\Command\CommandService;
use Common\Service\Cqrs\Query\QueryService;
use Common\Service\Data\PluginManager;
use Common\Service\Helper\DateHelperService;
use Common\Service\Helper\FlashMessengerHelperService;
use Common\Service\Helper\FormHelperService;
Expand Down Expand Up @@ -35,7 +36,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$transferAnnotationBuilder = $container->get(AnnotationBuilder::class);
$commandService = $container->get(CommandService::class);
$flashMessengerHelper = $container->get(FlashMessengerHelperService::class);
$licenceDataService = $container->get(Licence::class);
$licenceDataService = $container->get(PluginManager::class)->get(Licence::class);
$queryService = $container->get(QueryService::class);
$navigation = $container->get('Navigation');
$subCategoryDataService = $container->get(SubCategory::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Common\Service\Cqrs\Command\CommandService;
use Common\Service\Cqrs\Query\QueryService;
use Common\Service\Data\PluginManager;
use Common\Service\Helper\DateHelperService;
use Common\Service\Helper\FlashMessengerHelperService;
use Common\Service\Helper\FormHelperService;
Expand Down Expand Up @@ -36,7 +37,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$transferAnnotationBuilder = $container->get(AnnotationBuilder::class);
$commandService = $container->get(CommandService::class);
$flashMessengerHelper = $container->get(FlashMessengerHelperService::class);
$licenceDataService = $container->get(Licence::class);
$licenceDataService = $container->get(PluginManager::class)->get(Licence::class);
$queryService = $container->get(QueryService::class);
$navigation = $container->get('Navigation');
$translationHelper = $container->get(TranslationHelperService::class);
Expand Down
18 changes: 9 additions & 9 deletions module/Olcs/src/Controller/Operator/OperatorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public function indexJumpAction()
public function newApplicationAction()
{
/**
* @var \Laminas\Http\Request $request
*/
* @var \Laminas\Http\Request $request
*/
$request = $this->getRequest();

if ($request->isPost()) {
Expand All @@ -112,8 +112,8 @@ public function newApplicationAction()
$formHelper = $this->formHelper;

/**
* @var \Laminas\Form\FormInterface $form
*/
* @var \Laminas\Form\FormInterface $form
*/
$form = $formHelper->createForm('NewApplication');
$form->setData($data);
$this->alterForm($form, $data);
Expand Down Expand Up @@ -159,8 +159,8 @@ public function newApplicationAction()
$command = $this->transferAnnotationBuilder->createCommand($dto);

/**
* @var \Common\Service\Cqrs\Response $response
*/
* @var \Common\Service\Cqrs\Response $response
*/
$response = $this->commandService->send($command);

if ($response->isOk()) {
Expand Down Expand Up @@ -261,13 +261,13 @@ protected function isUnlicensed()
*/
public function mergeAction()
{

$organisationId = (int) $this->params()->fromRoute('organisation');

$this->licenceDataService->setOrganisationId($organisationId);

/**
* @var \Laminas\Http\Request $request
*/
* @var \Laminas\Http\Request $request
*/
$request = $this->getRequest();
if ($request->isPost()) {
$data = (array)$request->getPost();
Expand Down
Loading