Skip to content

Commit c969393

Browse files
committed
feat: Symfony 7 support
1 parent 8a31e71 commit c969393

20 files changed

+77
-83
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
symfony-version:
3131
- "5.4.*"
3232
- "6.4.*"
33+
- "7.0.x"
3334
driver-version:
3435
- "stable"
3536
dependencies:
@@ -41,6 +42,9 @@ jobs:
4142
driver-version: "1.5.0"
4243
stability: "stable"
4344
symfony-version: "5.4.*"
45+
exclude:
46+
- php-version: "8.1"
47+
symfony-version: "7.0.x"
4448

4549
services:
4650
mongodb:

CacheWarmer/HydratorCacheWarmer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ public function __construct(private ContainerInterface $container)
4040
*
4141
* @return false
4242
*/
43-
public function isOptional()
43+
public function isOptional(): bool
4444
{
4545
return false;
4646
}
4747

4848
/** @return string[] */
49-
public function warmUp(string $cacheDir, ?string $buildDir = null)
49+
public function warmUp(string $cacheDir, ?string $buildDir = null): array
5050
{
5151
// we need the directory no matter the hydrator cache generation strategy.
5252
$hydratorCacheDir = (string) $this->container->getParameter('doctrine_mongodb.odm.hydrator_dir');

CacheWarmer/PersistentCollectionCacheWarmer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ public function __construct(private ContainerInterface $container)
4141
*
4242
* @return false
4343
*/
44-
public function isOptional()
44+
public function isOptional(): bool
4545
{
4646
return false;
4747
}
4848

4949
/** @return string[] */
50-
public function warmUp(string $cacheDir, ?string $buildDir = null)
50+
public function warmUp(string $cacheDir, ?string $buildDir = null): array
5151
{
5252
// we need the directory no matter the hydrator cache generation strategy.
5353
$collCacheDir = (string) $this->container->getParameter('doctrine_mongodb.odm.persistent_collection_dir');

CacheWarmer/ProxyCacheWarmer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ public function __construct(private ContainerInterface $container)
4242
*
4343
* @return false
4444
*/
45-
public function isOptional()
45+
public function isOptional(): bool
4646
{
4747
return false;
4848
}
4949

5050
/** @return string[] */
51-
public function warmUp(string $cacheDir, ?string $buildDir = null)
51+
public function warmUp(string $cacheDir, ?string $buildDir = null): array
5252
{
5353
// we need the directory no matter the proxy cache generation strategy.
5454
$proxyCacheDir = (string) $this->container->getParameter('doctrine_mongodb.odm.proxy_dir');

Command/ClearMetadataCacheDoctrineODMCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
/**
1313
* Command to clear the metadata cache of the various cache drivers.
14+
*
15+
* @internal since 4.7
1416
*/
1517
class ClearMetadataCacheDoctrineODMCommand extends MetadataCommand
1618
{
17-
/** @return void */
18-
protected function configure()
19+
protected function configure(): void
1920
{
2021
parent::configure();
2122

@@ -35,8 +36,7 @@ protected function configure()
3536
);
3637
}
3738

38-
/** @return int */
39-
protected function execute(InputInterface $input, OutputInterface $output)
39+
protected function execute(InputInterface $input, OutputInterface $output): int
4040
{
4141
DoctrineODMCommand::setApplicationDocumentManager($this->getApplication(), $input->getOption('dm'));
4242

Command/CreateSchemaDoctrineODMCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
/**
1313
* Command to create the database schema for a set of classes based on their
1414
* mappings.
15+
*
16+
* @internal since 4.7
1517
*/
1618
class CreateSchemaDoctrineODMCommand extends CreateCommand
1719
{
18-
/** @return void */
19-
protected function configure()
20+
protected function configure(): void
2021
{
2122
parent::configure();
2223

@@ -35,8 +36,7 @@ protected function configure()
3536
);
3637
}
3738

38-
/** @return int */
39-
protected function execute(InputInterface $input, OutputInterface $output)
39+
protected function execute(InputInterface $input, OutputInterface $output): int
4040
{
4141
DoctrineODMCommand::setApplicationDocumentManager($this->getApplication(), $input->getOption('dm'));
4242

Command/DropSchemaDoctrineODMCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
/**
1313
* Command to drop the database schema for a set of classes based on their
1414
* mappings.
15+
*
16+
* @internal since 4.7
1517
*/
1618
class DropSchemaDoctrineODMCommand extends DropCommand
1719
{
18-
/** @return void */
19-
protected function configure()
20+
protected function configure(): void
2021
{
2122
parent::configure();
2223

@@ -35,8 +36,7 @@ protected function configure()
3536
);
3637
}
3738

38-
/** @return int */
39-
protected function execute(InputInterface $input, OutputInterface $output)
39+
protected function execute(InputInterface $input, OutputInterface $output): int
4040
{
4141
DoctrineODMCommand::setApplicationDocumentManager($this->getApplication(), $input->getOption('dm'));
4242

Command/GenerateHydratorsDoctrineODMCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
/**
1313
* Generate the Doctrine ORM document hydrators to your cache directory.
14+
*
15+
* @internal since 4.7
1416
*/
1517
class GenerateHydratorsDoctrineODMCommand extends GenerateHydratorsCommand
1618
{
17-
/** @return void */
18-
protected function configure()
19+
protected function configure(): void
1920
{
2021
parent::configure();
2122

@@ -34,8 +35,7 @@ protected function configure()
3435
);
3536
}
3637

37-
/** @return int */
38-
protected function execute(InputInterface $input, OutputInterface $output)
38+
protected function execute(InputInterface $input, OutputInterface $output): int
3939
{
4040
DoctrineODMCommand::setApplicationDocumentManager($this->getApplication(), $input->getOption('dm'));
4141

Command/GenerateProxiesDoctrineODMCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
/**
1313
* Generate the Doctrine ORM document proxies to your cache directory.
14+
*
15+
* @internal since 4.7
1416
*/
1517
class GenerateProxiesDoctrineODMCommand extends GenerateProxiesCommand
1618
{
17-
/** @return void */
18-
protected function configure()
19+
protected function configure(): void
1920
{
2021
parent::configure();
2122

@@ -34,8 +35,7 @@ protected function configure()
3435
);
3536
}
3637

37-
/** @return int */
38-
protected function execute(InputInterface $input, OutputInterface $output)
38+
protected function execute(InputInterface $input, OutputInterface $output): int
3939
{
4040
DoctrineODMCommand::setApplicationDocumentManager($this->getApplication(), $input->getOption('dm'));
4141

Command/InfoDoctrineODMCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717

1818
/**
1919
* Show information about mapped documents
20+
*
21+
* @internal since 4.7
2022
*/
2123
class InfoDoctrineODMCommand extends DoctrineODMCommand
2224
{
23-
/** @return void */
24-
protected function configure()
25+
protected function configure(): void
2526
{
2627
$this
2728
->setName('doctrine:mongodb:mapping:info')
@@ -40,8 +41,7 @@ protected function configure()
4041
);
4142
}
4243

43-
/** @return int */
44-
protected function execute(InputInterface $input, OutputInterface $output)
44+
protected function execute(InputInterface $input, OutputInterface $output): int
4545
{
4646
$documentManagerName = $input->hasOption('dm') ? $input->getOption('dm') : $this->getManagerRegistry()->getDefaultManagerName();
4747

0 commit comments

Comments
 (0)