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

Commit

Permalink
refactor: rationalise namespaces in olcs-backend. (#198)
Browse files Browse the repository at this point in the history
* refactor: rationalise namespaces in olcs-backend.

* refactor: fix composer dump-autoload -o namespace warnings.
  • Loading branch information
fibble authored Jul 16, 2024
1 parent d5aa8ce commit 1dd525a
Show file tree
Hide file tree
Showing 510 changed files with 1,026 additions and 1,208 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
},
"autoload": {
"classmap": [
"module/Olcs/Db/src"
"module/Db/src"
],
"psr-4": {
"Olcs\\Db\\": "module/Olcs/Db/src",
"Dvsa\\Olcs\\Db\\": "module/Db/src",
"Dvsa\\Olcs\\AcquiredRights\\": "module/AcquiredRights/src",
"Dvsa\\Olcs\\Api\\": "module/Api/src",
"Dvsa\\Olcs\\DocumentShare\\": "module/DocumentShare/src",
Expand All @@ -75,10 +75,10 @@
},
"autoload-dev": {
"psr-4": {
"Dvsa\\Olcs\\Auth\\Test\\": "module/Auth/test",
"Dvsa\\Olcs\\CompaniesHouse\\Test\\": "module/CompaniesHouse/test",
"Dvsa\\Olcs\\Cpms\\Test\\": "module/Cpms/test",
"OlcsTest\\Db\\": "test/module/Olcs/Db/src",
"Dvsa\\OlcsTest\\Auth\\": "test/module/Auth/src",
"Dvsa\\OlcsTest\\CompaniesHouse\\": "test/module/CompaniesHouse/src",
"Dvsa\\OlcsTest\\Cpms\\": "test/module/Cpms/src",
"Dvsa\\OlcsTest\\Db\\": "test/module/Olcs/Db/src",
"Dvsa\\OlcsTest\\": "test/src",
"Dvsa\\OlcsTest\\Address\\": "test/module/Address/src",
"Dvsa\\OlcsTest\\Api\\": "test/module/Api/src",
Expand Down
1 change: 0 additions & 1 deletion config/application.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
'Dvsa\Olcs\Transfer',
'DoctrineModule',
'DoctrineORMModule',
'Olcs\Db',
'Dvsa\Olcs\AcquiredRights',
'Dvsa\Olcs\Api',
'Dvsa\Olcs\Scanning',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Dvsa\Olcs\Api\Domain\CommandHandler\AbstractCommandHandler;
use Dvsa\Olcs\Api\Domain\CommandHandler\TransactionedInterface;
use Dvsa\Olcs\Db\Service\Search\Search;
use Dvsa\Olcs\Transfer\Command\CommandInterface;
use Psr\Container\ContainerInterface;

Expand All @@ -17,7 +18,7 @@ final class UpdateSection26 extends AbstractCommandHandler implements Transactio
protected $repoServiceName = 'Vehicle';

/**
* @var \Olcs\Db\Service\Search\Search
* @var Search
*/
private $searchService;

Expand Down
2 changes: 1 addition & 1 deletion module/Olcs/Db/Module.php → module/Db/Module.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Olcs\Db;
namespace Dvsa\Olcs\Db;

use Laminas\EventManager\EventInterface;
use Laminas\ModuleManager\Feature\BootstrapListenerInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
\Laminas\Log\LoggerAbstractServiceFactory::class
],
'factories' => [
\Elasticsearch\Client::class => \Olcs\Db\Service\Search\ClientFactory::class,
'Elasticsearch\Search' => \Olcs\Db\Service\Search\SearchFactory::class,
\Elasticsearch\Client::class => Dvsa\Olcs\Db\Service\Search\ClientFactory::class,
'Elasticsearch\Search' => Dvsa\Olcs\Db\Service\Search\SearchFactory::class,
],
],
'controllers' => [
'invokables' => [

],
'factories' => [
'Search' => Olcs\Db\Controller\SearchControllerFactory::class,
'Search' => Dvsa\Olcs\Db\Controller\SearchControllerFactory::class,
],
],
'view_manager' => [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace Olcs\Db\Controller;
namespace Dvsa\Olcs\Db\Controller;

use Olcs\Logging\Log\Logger;
use Laminas\Mvc\Controller\AbstractRestfulController as LaminasAbstractRestfulController;
use Laminas\Mvc\Exception;
use Laminas\Mvc\MvcEvent;
use Laminas\Http\Response;
use Olcs\Db\Exceptions\RestResponseException;
use Olcs\Db\Traits\RestResponseTrait;
use Dvsa\Olcs\Db\Exceptions\RestResponseException;
use Dvsa\Olcs\Db\Traits\RestResponseTrait;

/**
* Abstract Controller
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Olcs\Db\Controller;
namespace Dvsa\Olcs\Db\Controller;

use Olcs\Db\Exceptions\SearchDateFilterParseException;
use Dvsa\Olcs\Db\Exceptions\SearchDateFilterParseException;
use Laminas\Http\PhpEnvironment\Response;
use Olcs\Db\Service\Search\Search;
use Dvsa\Olcs\Db\Service\Search\Search;

/**
* Class SearchController
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Olcs\Db\Controller;
namespace Dvsa\Olcs\Db\Controller;

use Dvsa\Olcs\Api\Service\Permits\CandidatePermits\IrhpCandidatePermitsCreator;
use Psr\Container\ContainerInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Someone <[email protected]>
*/

namespace Olcs\Db\Exceptions;
namespace Dvsa\Olcs\Db\Exceptions;

/**
* RestResponseException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Olcs\Db\Exceptions;
namespace Dvsa\Olcs\Db\Exceptions;

use Throwable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Olcs\Db\Service\Search;
namespace Dvsa\Olcs\Db\Service\Search;

use Elastica\Client;
use Olcs\Logging\Log\Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace Olcs\Db\Service\Search\Indices;
namespace Dvsa\Olcs\Db\Service\Search\Indices;

use InvalidArgumentException;
use Olcs\Db\Service\Search\Indices\Terms\ComplexTermInterface;
use Olcs\Db\Service\Search\Indices\Terms\TransportManagerLicenceStatus;
use Dvsa\Olcs\Db\Service\Search\Indices\Terms\ComplexTermInterface;
use Dvsa\Olcs\Db\Service\Search\Indices\Terms\TransportManagerLicenceStatus;

abstract class AbstractIndex
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Olcs\Db\Service\Search\Indices;
namespace Dvsa\Olcs\Db\Service\Search\Indices;

use Olcs\Db\Service\Search\Indices\Terms\ComplexTermInterface;
use Olcs\Db\Service\Search\Indices\Terms\TransportManagerLicenceStatus;
use Dvsa\Olcs\Db\Service\Search\Indices\Terms\ComplexTermInterface;
use Dvsa\Olcs\Db\Service\Search\Indices\Terms\TransportManagerLicenceStatus;

class Person extends AbstractIndex
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Olcs\Db\Service\Search\Indices\Terms;
namespace Dvsa\Olcs\Db\Service\Search\Indices\Terms;

interface ComplexTermInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Olcs\Db\Service\Search\Indices\Terms;
namespace Dvsa\Olcs\Db\Service\Search\Indices\Terms;

class TransportManagerLicenceStatus implements ComplexTermInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace Olcs\Db\Service\Search;
namespace Dvsa\Olcs\Db\Service\Search;

use DomainException;
use Elastica\Query;
use InvalidArgumentException;
use Olcs\Db\Service\Search\Indices\AbstractIndex;
use Olcs\Db\Service\Search\Indices\Terms\ComplexTermInterface;
use Dvsa\Olcs\Db\Service\Search\Indices\AbstractIndex;
use Dvsa\Olcs\Db\Service\Search\Indices\Terms\ComplexTermInterface;
use RuntimeException;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Olcs\Db\Service\Search;
namespace Dvsa\Olcs\Db\Service\Search;

use Dvsa\Olcs\Api\Entity\TrafficArea\TrafficArea;
use Dvsa\Olcs\Api\Domain\Repository\SystemParameter as SysParamRepo;
Expand All @@ -11,13 +11,13 @@
use Elastica\Query\MatchQuery;
use Elastica\Query;
use Elastica\ResultSet;
use Olcs\Db\Exceptions\SearchDateFilterParseException;
use Dvsa\Olcs\Db\Exceptions\SearchDateFilterParseException;
use Laminas\Filter\Word\CamelCaseToUnderscore;
use Laminas\Filter\Word\UnderscoreToCamelCase;
use Dvsa\Olcs\Api\Domain\AuthAwareInterface;
use Dvsa\Olcs\Api\Domain\AuthAwareTrait;
use LmcRbacMvc\Service\AuthorizationService;
use Olcs\Db\Service\Search\Indices\AbstractIndex;
use Dvsa\Olcs\Db\Service\Search\Indices\AbstractIndex;

/**
* Class Search
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Olcs\Db\Service\Search;
namespace Dvsa\Olcs\Db\Service\Search;

use Elasticsearch\Client;
use Psr\Container\ContainerInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Someone <[email protected]>
*/

namespace Olcs\Db\Traits;
namespace Dvsa\Olcs\Db\Traits;

use Laminas\Http\Response;

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateAddressesStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateBusinessDetailsStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateBusinessTypeStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateCommunityLicencesStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateConditionsUndertakingsStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateConvictionsPenaltiesStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateFinancialEvidenceStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateFinancialHistoryStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateLicenceHistoryStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateOperatingCentresStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdatePeopleStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateSafetyStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateTaxiPhvStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateTransportManagersStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateTypeOfLicenceStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Rob Caiger <[email protected]>
*/

namespace Dvsa\OlcsTest\Api\Domain\Command\Application;
namespace Dvsa\OlcsTest\Api\Domain\Command\ApplicationCompletion;

use Dvsa\Olcs\Api\Domain\Command\ApplicationCompletion\UpdateUndertakingsStatus;

Expand Down
Loading

0 comments on commit 1dd525a

Please sign in to comment.