Skip to content

Commit 7183f33

Browse files
committed
Move the commands to the Encryption namespace
1 parent 93ddd8a commit 7183f33

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

config/command.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use Doctrine\Bundle\MongoDBBundle\Command\ClearMetadataCacheDoctrineODMCommand;
66
use Doctrine\Bundle\MongoDBBundle\Command\CreateSchemaDoctrineODMCommand;
77
use Doctrine\Bundle\MongoDBBundle\Command\DropSchemaDoctrineODMCommand;
8-
use Doctrine\Bundle\MongoDBBundle\Command\EncryptionDiagnosticCommand;
9-
use Doctrine\Bundle\MongoDBBundle\Command\EncryptionDumpFieldsMapCommand;
8+
use Doctrine\Bundle\MongoDBBundle\Command\Encryption\DiagnosticCommand;
9+
use Doctrine\Bundle\MongoDBBundle\Command\Encryption\DumpFieldsMapCommand;
1010
use Doctrine\Bundle\MongoDBBundle\Command\GenerateHydratorsDoctrineODMCommand;
1111
use Doctrine\Bundle\MongoDBBundle\Command\GenerateProxiesDoctrineODMCommand;
1212
use Doctrine\Bundle\MongoDBBundle\Command\InfoDoctrineODMCommand;
@@ -24,11 +24,11 @@
2424
->set('doctrine_mongodb.odm.command.clear_metadata_cache', ClearMetadataCacheDoctrineODMCommand::class)
2525
->tag('console.command', ['command' => 'doctrine:mongodb:cache:clear-metadata'])
2626

27-
->set('doctrine_mongodb.odm.command.connection_diagnostic', EncryptionDiagnosticCommand::class)
27+
->set('doctrine_mongodb.odm.command.encryption_diagnostic', DiagnosticCommand::class)
2828
->tag('console.command', ['command' => 'doctrine:mongodb:encryption:diagnostic'])
2929
->args([tagged_locator('doctrine_mongodb.connection_diagnostic', 'name')])
3030

31-
->set('doctrine_mongodb.odm.command.dump_encrypted_fields_map', EncryptionDumpFieldsMapCommand::class)
31+
->set('doctrine_mongodb.odm.command.encryption_dump_fields_map', DumpFieldsMapCommand::class)
3232
->tag('console.command', ['command' => 'doctrine:mongodb:encryption:dump-fields-map'])
3333
->args([tagged_locator('doctrine_mongodb.odm.document_manager', 'name')])
3434

src/Command/EncryptionDiagnosticCommand.php renamed to src/Command/Encryption/DiagnosticCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Doctrine\Bundle\MongoDBBundle\Command;
5+
namespace Doctrine\Bundle\MongoDBBundle\Command\Encryption;
66

77
use Doctrine\Bundle\MongoDBBundle\DataCollector\ConnectionDiagnostic;
88
use Doctrine\Bundle\MongoDBBundle\DataCollector\EncryptionDiagnostic;
@@ -25,7 +25,7 @@
2525
name: 'doctrine:mongodb:encryption:diagnostic',
2626
description: 'Diagnose MongoDB configuration and server capabilities for each connection.',
2727
)]
28-
final class EncryptionDiagnosticCommand extends Command
28+
final class DiagnosticCommand extends Command
2929
{
3030
/** @param ServiceProviderInterface<ConnectionDiagnostic> $diagnostics */
3131
public function __construct(

src/Command/EncryptionDumpFieldsMapCommand.php renamed to src/Command/Encryption/DumpFieldsMapCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Doctrine\Bundle\MongoDBBundle\Command;
5+
namespace Doctrine\Bundle\MongoDBBundle\Command\Encryption;
66

77
use Doctrine\ODM\MongoDB\DocumentManager;
88
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
@@ -32,7 +32,7 @@
3232
name: 'doctrine:mongodb:encryption:dump-fields-map',
3333
description: 'Dumps the encrypted fields map for all documents in the configured connections.',
3434
)]
35-
final class EncryptionDumpFieldsMapCommand extends Command
35+
final class DumpFieldsMapCommand extends Command
3636
{
3737
/** @param ServiceCollectionInterface<DocumentManager> $documentManagers */
3838
public function __construct(private readonly ServiceCollectionInterface $documentManagers)

tests/Command/ConnectionDiagnosticCommandTest.php renamed to tests/Command/Encryption/DiagnosticCommandTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
declare(strict_types=1);
44

5-
namespace Doctrine\Bundle\MongoDBBundle\Tests\Command;
5+
namespace Doctrine\Bundle\MongoDBBundle\Tests\Command\Encryption;
66

7+
use Doctrine\Bundle\MongoDBBundle\Tests\Command\CommandTestKernel;
78
use Symfony\Bundle\FrameworkBundle\Console\Application;
89
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
910
use Symfony\Component\Console\Tester\CommandTester;
1011

11-
final class ConnectionDiagnosticCommandTest extends KernelTestCase
12+
final class DiagnosticCommandTest extends KernelTestCase
1213
{
1314
public function testExecute(): void
1415
{

0 commit comments

Comments
 (0)