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

feat!: Support php8.0 #132

Merged
merged 2 commits into from
Apr 19, 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
static-analysis:
uses: dvsa/.github/.github/workflows/php-static.yml@main
with:
php-version: '7.4'
php-version: '8.0'

tests:
uses: dvsa/.github/.github/workflows/php-tests.yml@main
with:
php-versions: "[\"7.4\"]"
php-versions: '["8.0"]'
fail-fast: false
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/dvsa/laminas-form.git"
}],
"require": {
"php": "^7.4",
"php": "~8.0.0",
"ext-redis": "*",
"doctrine/annotations": "^1.14.2",
"doctrine/doctrine-module": "^5",
Expand All @@ -31,10 +31,10 @@
"laminas/laminas-validator": "^2.25",
"laminas/laminas-view": "^2.11",
"lm-commons/lmc-rbac-mvc": "^3.3",
"olcs/olcs-auth": "^7.0",
"olcs/olcs-common": "^6.0.0",
"olcs/olcs-auth": "^8.0",
"olcs/olcs-common": "^7.0.2",
"olcs/olcs-logging": "^7.2",
"olcs/olcs-transfer": "^6.0.0",
"olcs/olcs-transfer": "^7.0",
"olcs/olcs-utils": "^6.0.0",
"psr/container": "^1.1|^2",
"aws/aws-sdk-php": "^3.300"
Expand Down
935 changes: 458 additions & 477 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ class AddVehiclesQuestionController
*/
protected $commandHandler;

/**
* @param Url $urlHelper
* @param Redirect $redirectHelper
* @param HandleQuery $queryHandler
* @param FlashMessenger $flashMessenger
* @param FormValidator $formValidator
* @param HandleCommand $commandHandler
*/
public function __construct(
Url $urlHelper,
Redirect $redirectHelper,
Expand All @@ -103,8 +95,6 @@ public function __construct(
* This handles posts instead of having a second action in order to satisfy backwards compatibility with a legacy
* implementation.
*
* @param Request $request
* @param RouteMatch $routeMatch
* @return Response|ViewModel
* @throws BadCommandResponseException
* @throws BadQueryResponseException
Expand Down Expand Up @@ -149,8 +139,6 @@ public function indexAction(Request $request, RouteMatch $routeMatch)
}

/**
* @param Request $request
* @param RouteMatch $routeMatch
* @return Response
* @throws ResourceNotFoundException
* @throws BadCommandResponseException
Expand Down Expand Up @@ -198,7 +186,6 @@ protected function newForm(array $input = null): AddVehiclesQuestionForm
}

/**
* @param int $applicationId
* @return array
* @throws ResourceNotFoundException
* @throws BadQueryResponseException
Expand Down Expand Up @@ -235,40 +222,31 @@ protected function getApplicationData(int $applicationId): array
}

/**
* @param int $applicationId
* @param mixed $applicationVersion
*
* @throws BadCommandResponseException
* @throws BailOutException
*/
protected function updateVehicleSectionStatusToComplete(int $applicationId, $applicationVersion): void
protected function updateVehicleSectionStatusToComplete(int $applicationId, mixed $applicationVersion): void
{
$this->updateVehicleSectionStatus($applicationId, $applicationVersion, false);
}

/**
* @param int $applicationId
* @param mixed $applicationVersion
*
* @throws BadCommandResponseException
* @throws BailOutException
*/
protected function updateVehicleSectionStatusToIncomplete(int $applicationId, $applicationVersion): void
protected function updateVehicleSectionStatusToIncomplete(int $applicationId, mixed $applicationVersion): void
{
$this->updateVehicleSectionStatus($applicationId, $applicationVersion, true);
}

/**
* @param int $applicationId
* @param mixed $applicationVersion
* @param bool $intendingToEnterVehicleDetails
*
* @throws BadCommandResponseException
* @throws BailOutException
*
* @return void
*/
protected function updateVehicleSectionStatus(int $applicationId, $applicationVersion, bool $intendingToEnterVehicleDetails)
protected function updateVehicleSectionStatus(int $applicationId, mixed $applicationVersion, bool $intendingToEnterVehicleDetails)
{
$command = UpdateVehicles::create([
'id' => $applicationId,
Expand All @@ -284,7 +262,6 @@ protected function updateVehicleSectionStatus(int $applicationId, $applicationVe
}

/**
* @param array $applicationData
* @return bool
*/
protected function applicationHasBeenCompletedWithoutVehicles(array $applicationData): bool
Expand All @@ -303,7 +280,6 @@ protected function applicationHasBeenCompletedWithoutVehicles(array $application
}

/**
* @param array $applicationData
* @return bool
*/
protected function applicationHasVehicles(array $applicationData): bool
Expand Down
10 changes: 2 additions & 8 deletions module/Application/src/Controller/AddressesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class AddressesController extends Lva\AbstractAddressesController
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;
protected StringHelperService $stringHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand All @@ -47,12 +44,9 @@ public function __construct(
FlashMessengerHelperService $flashMessengerHelper,
FormServiceManager $formServiceManager,
ScriptFactory $scriptFactory,
RestrictionHelperService $restrictionHelper,
StringHelperService $stringHelper
protected RestrictionHelperService $restrictionHelper,
protected StringHelperService $stringHelper
) {
$this->restrictionHelper = $restrictionHelper;
$this->stringHelper = $stringHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
10 changes: 2 additions & 8 deletions module/Application/src/Controller/BusinessDetailsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ class BusinessDetailsController extends AbstractBusinessDetailsController
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;
protected StringHelperService $stringHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand All @@ -52,14 +49,11 @@ public function __construct(
FormServiceManager $formServiceManager,
ScriptFactory $scriptFactory,
IdentityProviderInterface $identityProvider,
RestrictionHelperService $restrictionHelper,
StringHelperService $stringHelper,
protected RestrictionHelperService $restrictionHelper,
protected StringHelperService $stringHelper,
TableFactory $tableFactory,
FileUploadHelperService $uploadHelper
) {
$this->restrictionHelper = $restrictionHelper;
$this->stringHelper = $stringHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
10 changes: 2 additions & 8 deletions module/Application/src/Controller/BusinessTypeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ class BusinessTypeController extends AbstractBusinessTypeController
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;
protected StringHelperService $stringHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand All @@ -67,13 +64,10 @@ public function __construct(
TranslationHelperService $translationHelper,
AnnotationBuilder $transferAnnotationBuilder,
QueryService $queryService,
RestrictionHelperService $restrictionHelper,
StringHelperService $stringHelper,
protected RestrictionHelperService $restrictionHelper,
protected StringHelperService $stringHelper,
GenericBusinessTypeAdapter $lvaAdapter
) {
$this->restrictionHelper = $restrictionHelper;
$this->stringHelper = $stringHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class ConvictionsPenaltiesController extends Lva\AbstractConvictionsPenaltiesCon
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;
protected StringHelperService $stringHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand All @@ -47,13 +44,10 @@ public function __construct(
FlashMessengerHelperService $flashMessengerHelper,
FormServiceManager $formServiceManager,
TableFactory $tableFactory,
RestrictionHelperService $restrictionHelper,
StringHelperService $stringHelper,
protected RestrictionHelperService $restrictionHelper,
protected StringHelperService $stringHelper,
ScriptFactory $scriptFactory
) {
$this->restrictionHelper = $restrictionHelper;
$this->stringHelper = $stringHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ class FinancialEvidenceController extends Lva\AbstractFinancialEvidenceControlle
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;
protected StringHelperService $stringHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand All @@ -54,14 +51,11 @@ public function __construct(
TableFactory $tableFactory,
AnnotationBuilder $transferAnnotationBuilder,
CommandService $commandService,
RestrictionHelperService $restrictionHelper,
StringHelperService $stringHelper,
protected RestrictionHelperService $restrictionHelper,
protected StringHelperService $stringHelper,
Lva\Adapters\ApplicationFinancialEvidenceAdapter $lvaAdapter,
FileUploadHelperService $fileUploadHelperService
) {
$this->restrictionHelper = $restrictionHelper;
$this->stringHelper = $stringHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
10 changes: 2 additions & 8 deletions module/Application/src/Controller/FinancialHistoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class FinancialHistoryController extends Lva\AbstractFinancialHistoryController
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;
protected StringHelperService $stringHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand All @@ -47,13 +44,10 @@ public function __construct(
FormServiceManager $formServiceManager,
ScriptFactory $scriptFactory,
DataHelperService $dataHelper,
RestrictionHelperService $restrictionHelper,
StringHelperService $stringHelper,
protected RestrictionHelperService $restrictionHelper,
protected StringHelperService $stringHelper,
FileUploadHelperService $uploadHelper
) {
$this->restrictionHelper = $restrictionHelper;
$this->stringHelper = $stringHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class LicenceHistoryController extends Lva\AbstractLicenceHistoryController
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand All @@ -54,10 +52,8 @@ public function __construct(
StringHelperService $stringHelper,
TableFactory $tableFactory,
FormHelperService $formHelper,
RestrictionHelperService $restrictionHelper
protected RestrictionHelperService $restrictionHelper
) {
$this->restrictionHelper = $restrictionHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
10 changes: 2 additions & 8 deletions module/Application/src/Controller/LvaVehicleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ class LvaVehicleController extends AbstractGoodsVehiclesController
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;
protected StringHelperService $stringHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand Down Expand Up @@ -58,12 +55,9 @@ public function __construct(
ScriptFactory $scriptFactory,
VariationLvaService $variationLvaService,
GoodsVehiclesVehicle $goodsVehiclesVehicleMapper,
RestrictionHelperService $restrictionHelper,
StringHelperService $stringHelper
protected RestrictionHelperService $restrictionHelper,
protected StringHelperService $stringHelper
) {
$this->restrictionHelper = $restrictionHelper;
$this->stringHelper = $stringHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
10 changes: 2 additions & 8 deletions module/Application/src/Controller/OperatingCentresController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ class OperatingCentresController extends Lva\AbstractOperatingCentresController
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;
protected StringHelperService $stringHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand All @@ -54,13 +51,10 @@ public function __construct(
TranslationHelperService $translationHelper,
ScriptFactory $scriptFactory,
VariationLvaService $variationLvaService,
RestrictionHelperService $restrictionHelper,
StringHelperService $stringHelper,
protected RestrictionHelperService $restrictionHelper,
protected StringHelperService $stringHelper,
FileUploadHelperService $uploadHelper
) {
$this->restrictionHelper = $restrictionHelper;
$this->stringHelper = $stringHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
10 changes: 2 additions & 8 deletions module/Application/src/Controller/OverviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ class OverviewController extends AbstractOverviewController
protected $lva = 'application';
protected string $location = 'external';

protected RestrictionHelperService $restrictionHelper;
protected StringHelperService $stringHelper;

/**
* @param NiTextTranslation $niTextTranslationUtil
* @param AuthorizationService $authService
Expand All @@ -35,12 +32,9 @@ public function __construct(
AuthorizationService $authService,
FormServiceManager $formServiceManager,
FormHelperService $formHelper,
RestrictionHelperService $restrictionHelper,
StringHelperService $stringHelper
protected RestrictionHelperService $restrictionHelper,
protected StringHelperService $stringHelper
) {
$this->restrictionHelper = $restrictionHelper;
$this->stringHelper = $stringHelper;

parent::__construct(
$niTextTranslationUtil,
$authService,
Expand Down
Loading
Loading