-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Allow data-fixtures v2 #457
Conversation
d78551a
to
d7ec426
Compare
The CI failure makes me think that |
This should help: symfony/symfony#58861 |
…v2 (greg0ire) This PR was merged into the 5.4 branch. Discussion ---------- Dynamically fix compatibility with doctrine/data-fixtures v2 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | see explanation below | License | MIT While working on [allowing v2 of doctrine/data-fixtures in the bundle](doctrine/DoctrineFixturesBundle#457), I stumbled upon an issue that only affects some versions of Symfony that still have a `ContainerAwareLoader` class. The signature of `ContainerAwareLoader::addFixture()` is not compatible with the v2 signature of the `Loader` interface from `doctrine/data-fixtures`, as per this fatal error: ``` Declaration of Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader::addFixture(Doctrine\Common\DataFixtures\FixtureInterface $fixture) must be compatible with Doctrine\Common\DataFixtures\Loader::addFixture(Doctrine\Common\DataFixtures\FixtureInterface $fixture): void ``` Classes that extend ContainerAwareLoader have to also extend Loader, meaning this is no breaking change because it can be argued that the incompatibility of the extending class would be with the Loader interface. Closes #58861, Closes #58863 Commits ------- 1812aaf Dynamically fix compatibility with doctrine/data-fixtures v2
…v2 (greg0ire) This PR was merged into the 5.4 branch. Discussion ---------- Dynamically fix compatibility with doctrine/data-fixtures v2 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | see explanation below | License | MIT While working on [allowing v2 of doctrine/data-fixtures in the bundle](doctrine/DoctrineFixturesBundle#457), I stumbled upon an issue that only affects some versions of Symfony that still have a `ContainerAwareLoader` class. The signature of `ContainerAwareLoader::addFixture()` is not compatible with the v2 signature of the `Loader` interface from `doctrine/data-fixtures`, as per this fatal error: ``` Declaration of Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader::addFixture(Doctrine\Common\DataFixtures\FixtureInterface $fixture) must be compatible with Doctrine\Common\DataFixtures\Loader::addFixture(Doctrine\Common\DataFixtures\FixtureInterface $fixture): void ``` Classes that extend ContainerAwareLoader have to also extend Loader, meaning this is no breaking change because it can be argued that the incompatibility of the extending class would be with the Loader interface. Closes #58861, Closes #58863 Commits ------- 1812aafe065 Dynamically fix compatibility with doctrine/data-fixtures v2
The interfaces introduced in 1.5.0 allow to test without mocking a final class.
d7ec426
to
4eb7e37
Compare
"doctrine/doctrine-bundle": "^2.2", | ||
"doctrine/orm": "^2.14.0 || ^3.0", | ||
"doctrine/persistence": "^2.4|^3.0", | ||
"symfony/config": "^5.4|^6.0|^7.0", | ||
"symfony/console": "^5.4|^6.0|^7.0", | ||
"symfony/dependency-injection": "^5.4|^6.0|^7.0", | ||
"symfony/deprecation-contracts": "^2.1|^3", | ||
"symfony/doctrine-bridge": "^5.4|^6.0|^7.0", | ||
"symfony/doctrine-bridge": "^5.4.48|^6.4.16|^7.1.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to obtain symfony/symfony#58865
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That explains the chosen minor versions.
The interfaces introduced in 1.5.0 allow to test without mocking a final class.
Closes #456