Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PropertyInfo] Version 7.1 conflicts with symfony/doctrine-bridge 7.0 #57360

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

Closed
llupa opened this issue Jun 10, 2024 · 7 comments
Closed

[PropertyInfo] Version 7.1 conflicts with symfony/doctrine-bridge 7.0 #57360

llupa opened this issue Jun 10, 2024 · 7 comments

Comments

@llupa
Copy link
Contributor

llupa commented Jun 10, 2024

Symfony version(s) affected

7.1.1

Description

I had a generic PR from dependabot to update from bump symfony/property-info from 7.0.8 to 7.1.1 and it immediately fails to dump the container because:

!!  
!!  In PropertyInfoExtractor.php line 93:
!!  
!!    Attempted to call an undefined method named "getType" of class "Symfony\Bri  
!!    dge\Doctrine\PropertyInfo\DoctrineExtractor".                                
!!    Did you mean to call "getTypes"?                                             

getType was added in 7.1 with this PR. Is a conflict PR enough or is there another way the team would like to handle this? (like checking for method exists).

How to reproduce

If you pin symfony/doctrine-bridge at 7.0.* and then require for symfony/property-info at ^7.1 packages will comply with each other, but then the container cannot be built.

Possible Solution

No response

Additional Context

No response

@stof
Copy link
Member

stof commented Jun 10, 2024

This is a bug in the implementation of PropertyInfoExtractor.

The getType method expects all registered extractors to have a getType method. However, this method is not part of the interface (as it is new). Not implementing the method will trigger a deprecation warning. But it must still work (otherwise, that's a BC break).
The PropertyInfoExtractor needs to be fixed (adding a conflict to forbid symfony/doctrine-bridge 7.0 would prevent the issue for the extractor shipped in doctrine-bridge, but would not fix the BC break for all other packages shipping custom extractors, so that's not a solution).

@Dino-Kupinic
Copy link

Same issue for me, had to downgrade

@xabbuh
Copy link
Member

xabbuh commented Jun 10, 2024

@hantsy also mentioned this recently on Slack. I have a WIP patch locally which I will hopefully be able to finish soon.

@xabbuh
Copy link
Member

xabbuh commented Jun 19, 2024

see #57459

@carsonbot
Copy link

Hey, thanks for your report!
There has not been a lot of activity here for a while. Is this bug still relevant? Have you managed to find a workaround?

@carsonbot
Copy link

Friendly reminder that this issue exists. If I don't hear anything I'll close this.

@carsonbot
Copy link

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

@xabbuh xabbuh reopened this Jan 17, 2025
xabbuh added a commit that referenced this issue Jan 18, 2025
…etType() is not implemented (xabbuh)

This PR was merged into the 7.1 branch.

Discussion
----------

[PropertyInfo] convert legacy types to TypeInfo types if getType() is not implemented

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #57360
| License       | MIT

Commits
-------

98550a9 convert legacy types to TypeInfo types if getType() is not implemented
@xabbuh xabbuh closed this as completed Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants