Skip to content
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

Adding int return type in command #398

Closed
wants to merge 1 commit into from

Conversation

javiereguiluz
Copy link
Contributor

@javiereguiluz javiereguiluz commented Oct 23, 2023

Seen while trying to upgrade a Symfony app to Symfony 7.0.

PHP Fatal error: 
Declaration of Doctrine\Bundle\FixturesBundle\Command\LoadDataFixturesDoctrineCommand::execute
(InputInterface $input, OutputInterface $output)
must be compatible with Symfony\Component\Console\Command\Command::execute
(InputInterface $input, OutputInterface $output): int
in vendor/doctrine/doctrine-fixtures-bundle/Command/LoadDataFixturesDoctrineCommand.php on line 99

@derrabus
Copy link
Member

Thank you. We probably need a solution for lower branches as well because we don't have plans to release v4 just yet. A conditional trait like I used in DBAL and ORM might do the trick there.

@javiereguiluz
Copy link
Contributor Author

Thanks for the insights. I guess you refer to doing something like this: https://github.com/doctrine/dbal/pull/6136/files

I don't know the Doctrine project code well enough, so I'm closing this PR and I will let you (or any other volunteer contributor) to do the proper fix based on the trait. Thanks a lot!

@derrabus
Copy link
Member

Exactly, that's the PR I'm referring to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants