Skip to content

Commit bcf2e59

Browse files
committed
feat: Symfony 7 support
1 parent f637de0 commit bcf2e59

20 files changed

+58
-93
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ jobs:
2525
- "8.1"
2626
- "8.2"
2727
- "8.3"
28-
stability:
29-
- "stable"
3028
symfony-version:
3129
- "5.4.*"
32-
- "6.2.*"
3330
- "6.3.*"
31+
- "6.4.*"
32+
- "7.0.*"
3433
driver-version:
3534
- "stable"
3635
dependencies:
@@ -40,8 +39,10 @@ jobs:
4039
os: "ubuntu-20.04"
4140
php-version: "8.1"
4241
driver-version: "1.5.0"
43-
stability: "stable"
4442
symfony-version: "5.4.*"
43+
exclude:
44+
- php-version: "8.1"
45+
symfony-version: "7.0.*"
4546

4647
services:
4748
mongodb:
@@ -79,9 +80,6 @@ jobs:
7980
coverage: "pcov"
8081
ini-values: "zend.assertions=1"
8182

82-
- name: "Set minimum-stability to stable in Composer"
83-
run: "composer config minimum-stability ${{ matrix.stability }}"
84-
8583
- name: "Install dependencies with Composer"
8684
uses: "ramsey/composer-install@v2"
8785
with:

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)
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)
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)
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: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
*/
1515
class ClearMetadataCacheDoctrineODMCommand extends MetadataCommand
1616
{
17-
/** @return void */
18-
protected function configure()
17+
protected function configure(): void
1918
{
2019
parent::configure();
2120

@@ -35,8 +34,7 @@ protected function configure()
3534
);
3635
}
3736

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

Command/CreateSchemaDoctrineODMCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
*/
1616
class CreateSchemaDoctrineODMCommand extends CreateCommand
1717
{
18-
/** @return void */
19-
protected function configure()
18+
protected function configure(): void
2019
{
2120
parent::configure();
2221

@@ -35,8 +34,7 @@ protected function configure()
3534
);
3635
}
3736

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

Command/DropSchemaDoctrineODMCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
*/
1616
class DropSchemaDoctrineODMCommand extends DropCommand
1717
{
18-
/** @return void */
19-
protected function configure()
18+
protected function configure(): void
2019
{
2120
parent::configure();
2221

@@ -35,8 +34,7 @@ protected function configure()
3534
);
3635
}
3736

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

Command/GenerateHydratorsDoctrineODMCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
*/
1515
class GenerateHydratorsDoctrineODMCommand extends GenerateHydratorsCommand
1616
{
17-
/** @return void */
18-
protected function configure()
17+
protected function configure(): void
1918
{
2019
parent::configure();
2120

@@ -34,8 +33,7 @@ protected function configure()
3433
);
3534
}
3635

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

Command/GenerateProxiesDoctrineODMCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
*/
1515
class GenerateProxiesDoctrineODMCommand extends GenerateProxiesCommand
1616
{
17-
/** @return void */
18-
protected function configure()
17+
protected function configure(): void
1918
{
2019
parent::configure();
2120

@@ -34,8 +33,7 @@ protected function configure()
3433
);
3534
}
3635

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

Command/InfoDoctrineODMCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
*/
2121
class InfoDoctrineODMCommand extends DoctrineODMCommand
2222
{
23-
/** @return void */
24-
protected function configure()
23+
protected function configure(): void
2524
{
2625
$this
2726
->setName('doctrine:mongodb:mapping:info')
@@ -40,8 +39,7 @@ protected function configure()
4039
);
4140
}
4241

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

0 commit comments

Comments
 (0)