-
-
Couldn't load subscription status.
- Fork 514
Symfony 8.0 support #2791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.15.x
Are you sure you want to change the base?
Symfony 8.0 support #2791
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,10 +35,10 @@ | |
| "jean85/pretty-package-versions": "^1.3.0 || ^2.0.1", | ||
| "mongodb/mongodb": "^1.21.2 || ^2.1.1", | ||
| "psr/cache": "^1.0 || ^2.0 || ^3.0", | ||
| "symfony/console": "^5.4 || ^6.0 || ^7.0", | ||
| "symfony/console": "^5.4 || ^6.4 || ^7.0", | ||
| "symfony/deprecation-contracts": "^2.2 || ^3.0", | ||
| "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0", | ||
| "symfony/var-exporter": "^6.2 || ^7.0" | ||
| "symfony/var-dumper": "^5.4 || ^6.4 || ^7.0", | ||
| "symfony/var-exporter": "^6.4 || ^7.0" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @doctrine/mongodb-odm-maintainers I think we need a meta package for the proxy implementation.
When using I propose to create a meta package with 2 versions:
So that, depending on the PHP and Symfony version, the correct dependencies are installed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively, Symfony 8 would be only supported by version 3. But we have a lot to do: #2762 |
||
| }, | ||
| "require-dev": { | ||
| "ext-bcmath": "*", | ||
|
|
@@ -52,8 +52,8 @@ | |
| "phpstan/phpstan-phpunit": "^2.0", | ||
| "phpunit/phpunit": "^10.5.58", | ||
| "squizlabs/php_codesniffer": "^4", | ||
| "symfony/cache": "^5.4 || ^6.0 || ^7.0", | ||
| "symfony/uid": "^5.4 || ^6.0 || ^7.0" | ||
| "symfony/cache": "^5.4 || ^6.0 || ^7.0 || ^8.0", | ||
| "symfony/uid": "^5.4 || ^6.0 || ^7.0 || ^8.0" | ||
| }, | ||
| "conflict": { | ||
| "doctrine/annotations": "<1.12 || >=3.0" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,10 +9,32 @@ | |
| use Symfony\Component\Console\Input\InputInterface; | ||
| use Symfony\Component\Console\Output\OutputInterface; | ||
|
|
||
| if ((new ReflectionMethod(Command::class, 'execute'))->hasReturnType()) { | ||
| // Symfony 8 | ||
| if ((new ReflectionMethod(Command::class, 'configure'))->hasReturnType()) { | ||
| /** @internal */ | ||
| trait CommandCompatibility | ||
| { | ||
| protected function configure(): void | ||
| { | ||
| $this->doConfigure(); | ||
| } | ||
|
Comment on lines
+17
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps I'm missing something but I don't think we need this trait here. I did something similar in https://github.com/IonBazan/composer-diff/blob/8907711f0bf74677041f7b356da2367afea44a53/src/Command/BaseTypedCommand.php#L9-L14 but that's only needed to support different PHP versions.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can remove it in 2.13.x just to be sure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue is with older versions of the bundle that don't have the |
||
|
|
||
| protected function execute(InputInterface $input, OutputInterface $output): int | ||
| { | ||
| return $this->doExecute($input, $output); | ||
| } | ||
| } | ||
| // Symfony 7 | ||
| } elseif ((new ReflectionMethod(Command::class, 'execute'))->hasReturnType()) { | ||
| /** @internal */ | ||
| trait CommandCompatibility | ||
| { | ||
| /** @return void */ | ||
| protected function configure() | ||
| { | ||
| $this->doConfigure(); | ||
| } | ||
|
|
||
| protected function execute(InputInterface $input, OutputInterface $output): int | ||
| { | ||
| return $this->doExecute($input, $output); | ||
|
|
@@ -22,6 +44,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
| /** @internal */ | ||
| trait CommandCompatibility | ||
| { | ||
| /** @return void */ | ||
| protected function configure() | ||
| { | ||
| $this->doConfigure(); | ||
| } | ||
|
|
||
| /** | ||
| * {@inheritDoc} | ||
| * | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Doctrine\ODM\MongoDB\Tools\Console\Command\Schema; | ||
|
|
||
| use ReflectionMethod; | ||
| use Symfony\Component\Console\Command\Command; | ||
|
|
||
| // Symfony 8 | ||
| if ((new ReflectionMethod(Command::class, 'configure'))->hasReturnType()) { | ||
| /** @internal */ | ||
| trait AbstractCommandCompatibility | ||
| { | ||
| protected function configure(): void | ||
| { | ||
| $this->configureCommonOptions(); | ||
| } | ||
| } | ||
| } else { | ||
| /** @internal */ | ||
| trait AbstractCommandCompatibility | ||
| { | ||
| /** @return void */ | ||
| protected function configure() | ||
| { | ||
| $this->configureCommonOptions(); | ||
| } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.