doctrine / DoctrineFixturesBundle

Symfony integration for the doctrine/data-fixtures library
MIT License
2.44k stars 201 forks source link

Add a return type in LoadDataFixturesDoctrineCommand #401

Closed javiereguiluz closed 8 months ago

javiereguiluz commented 8 months ago

Without this change, you see the following error when using this in a Symfony 7 app:

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 commented 8 months ago

Duplicate of #398? 🙃

javiereguiluz commented 8 months ago

🤦 I'm sorry! I really want to test some app with Symfony 7 and this bundle is the one that prevents me to do that. That's why I'm so anxious. Sorry 🙏

greg0ire commented 8 months ago

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!

I think this does not have much to do with Doctrine, you were talking to a Symfony Core contributor, applying well known Symfony forward-compatibility hacks to a Symfony integration repository. Please give it a shot, and I will support you if you're stuck. That way you can test your app.