8000 OneToOne mappings broken after upgrading to symfony/doctrine-bridge 7.0.4 · Issue #54077 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

OneToOne mappings broken after upgrading to symfony/doctrine-bridge 7.0.4 #54077

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
weberdominik opened this issue Feb 27, 2024 · 6 comments
Closed

Comments

@weberdominik
Copy link
weberdominik commented Feb 27, 2024

Symfony version(s) affected

7.0.4

Description

After upgrading to symfony/doctrine-bridge 7.0.4 I am receiving warnings for all my OneToOne mappings:

Warning: Undefined property: Doctrine\ORM\Mapping\OneToOneInverseSideMapping::$joinColumns

How to reproduce

This warning occures for every OneToOne mapping in my project, even for most basic configurations. For example:

#[ORM\OneToOne(targetEntity: Order::class)]

Possible Solution

Downgrading back to symfony/doctrine-bridge 7.0.3 fixed my issue.

Additional Context

The warning is thrown in vendor/symfony/doctrine-bridge/PropertyInfo/DoctrineExtractor.php:282

@derrabus
Copy link
Member

The ORM version involved would be nice to know here.

@weberdominik
Copy link
Author

The ORM version involved would be nice to know here.

3.0.1 it is

@xabbuh
Copy link
Member
xabbuh commented Feb 27, 2024

Can you create a small example application that allows to reproduce your issue?

@derrabus
Copy link
Member

Before #53754 the access to array keys of the mapping metadata was safeguarded with a ?? null, but that's missing when dealing with the new metadata classes apparently.

@derrabus
Copy link
Member

Does #54081 fix the issue for you?

@weberdominik
Copy link
Author

Does #54081 fix the issue for you?

Yes, that fixes it. Thanks.

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

4 participants
0