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

Commit

Permalink
feat: Added DVSA Address Service module & general improvements (#197)
Browse files Browse the repository at this point in the history
* feat: Added DVSA Address Service module

* feat: added address helper service to api module

* feat: swap the toggle override check; keep new module clean and re-usable

* feat: added isDisable toggle check to ToggleService

* feat: swapped alias registration

* fix: corrected class the alias replaces

* fix: AddressHelperServiceFactory loads the alias AddressService instead

* feat: address helper service improvements

* feat: Stage 1 Address Service Refactor

* feat: address model and mappers

* feat: legacy address service renames admin area

* fix: general fixes

* feat: enpty result on DVSA Addr Srv response of 400 and 422; bubble otherwise

* feat: general refactor and unit tests

* fix: Fixed Module Unit Test suite in phpunit.xml.dist

* fix: removed leaked assert true

* fix: phpcbf run

* fix: removed AddressServiceInterface from Command and Query Handler and optimised imports

* fix: removed factory test

* fix: return doc block psalm reported issue

* fix: added admin area to serialised address object

* feat: added dvsa_address_service config to config.global.php

* fix: added missing tests for Api AddressHelperService

* fix: removed acquired rights factory test and added namespace to addres helper service test

* fix: removed acquried rights factroy test

* fix: added union type for GetAddress :)

* fix: Removed union type on real code argument
  • Loading branch information
jerotire authored Jul 25, 2024
1 parent 242227d commit 8fcadfe
Show file tree
Hide file tree
Showing 64 changed files with 1,742 additions and 1,457 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"Dvsa\\Olcs\\Scanning\\": "module/Scanning/src",
"Dvsa\\Olcs\\Email\\": "module/Email/src",
"Dvsa\\Olcs\\Address\\": "module/Address/src",
"Dvsa\\Olcs\\DvsaAddressService\\": "module/DvsaAddressService/src",
"Dvsa\\Olcs\\Snapshot\\": "module/Snapshot/src",
"Dvsa\\Olcs\\GdsVerify\\": "module/GdsVerify/src",
"Dvsa\\Olcs\\Queue\\": "module/Queue/src",
Expand Down
3 changes: 2 additions & 1 deletion config/application.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
'Laminas\Mvc\I18n\Module',
'Laminas\I18n\Module',
'Dvsa\Olcs\Utils',
'Dvsa\Olcs\Address',
'Dvsa\Olcs\Auth',
'Dvsa\Olcs\Snapshot',
'Dvsa\Olcs\Email',
Expand All @@ -34,6 +33,8 @@
'Dvsa\Olcs\GdsVerify',
'Dvsa\Olcs\AwsSdk',
'Dvsa\Olcs\Queue',
'Dvsa\Olcs\DvsaAddressService',
'Dvsa\Olcs\Address', // Load after DvsaAddressService as it may overwrite the AddressService alias until removed
],
// These are various options for the listeners attached to the ModuleManager
'module_listener_options' => [
Expand Down
582 changes: 297 additions & 285 deletions config/autoload/config.global.php

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions config/autoload/local.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,16 @@ return [
'proxy' => new \Laminas\Stdlib\ArrayUtils\MergeRemoveKey(),
],
'openam' => new \Laminas\Stdlib\ArrayUtils\MergeRemoveKey(),
'dvsa_address_service' => [
'client' => [ // Guzzle client options; see https://docs.guzzlephp.org/en/stable/quickstart.html
'base_uri' => '', //param
'headers' => [], // additional or override default client headers
],
'oauth2' => [ // if client['headers']['Authorization'] is not set, then this will be used to get token
'client_id' => '', //param
'client_secret' => '', // secret
'token_url' => '', //param
'scope' => '', //param
],
],
];
129 changes: 0 additions & 129 deletions module/AcquiredRights/test/Client/AcquiredRightsClientFactoryTest.php

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion module/Address/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return [
'service_manager' => [
'factories' => [
'AddressService' => \Dvsa\Olcs\Address\Service\AddressFactory::class
\Dvsa\Olcs\Address\Service\Address::class => \Dvsa\Olcs\Address\Service\AddressFactory::class
],
],
];
Loading

0 comments on commit 8fcadfe

Please sign in to comment.