-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Dynamically fix compatibility with doctrine/data-fixtures v2 #58865
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
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
Dynamically fix compatibility with doctrine/data-fixtures v2 #58865
Conversation
How should I deal with the Psalm failures? |
Ignore them. |
I'll assume you mean that literally because I couldn't find a baseline or |
Yes. 😎 |
src/Symfony/Bridge/Doctrine/DataFixtures/AddFixtureImplementation.php
Outdated
Show resolved
Hide resolved
fcfd7ac
to
f23ae10
Compare
Not sure if the failing test is related? |
The Windows test? It's about http-foundation 🤔 If you're talking about Psalm, the failure is definitely related, but I was told above to ignore it. |
Sorry, I mean this one on the high-deps build: https://github.com/symfony/symfony/actions/runs/11836984636/job/32983037386?pr=58865. |
Oh right, that one does look like it could be related. I'll take a look. I introduced the failing assert in The object that does not pass the instanceof check is instanciated by a container that itself is created in a very fishy way. This line in particular is interesting:
I suspect the feature it leverages is not implemented when using the deps of the 8.2 job. I don't quite understand why it would break only now though. Maybe allowing |
@MatTheCat maybe you can help with this? |
Just noticed the DI tag present in the line I mentioned is missing on 5.4 and was introduced in 6a4d229 , hence my last commit, which sadly doesn't seem very successful. |
10ff8aa
to
928bf70
Compare
Ah this might be what I need to backport: #57489 |
Err I don’t think I can help 😅 ; I recently committed to the DoctrineBridge but it doesn’t look like it was related. |
Yes, sorry! |
928bf70
to
0abc40d
Compare
f23ae10
to
e20459a
Compare
This only happens in |
@greg0ire you can ignore the high deps failures |
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.
e20459a
to
1812aaf
Compare
Thank you @greg0ire. |
While working on allowing v2 of doctrine/data-fixtures in the bundle, 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 theLoader
interface fromdoctrine/data-fixtures
, as per this fatal error: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