Skip to content
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

Use Rector to migrate to the object API of FieldMapping #10617

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Apr 11, 2023

This makes the array access implementation of FieldMapping useful only to consumers, it is no longer useful internally, and should be deprecated as of Doctrine 3.1.0

Comment on lines 507 to 508
self::assertNotNull($class->fieldMappings['id']->type);
self::assertNotNull($class->fieldMappings['name']->type);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need those at this point? It's not an array anymore and if type isn't initialized, we would get a "must not be accessed before initialization" (but afaik the props are initialized by default). Nevertheless, the actual value is checked in the next lines. Same with the other assertNotNull methods below.

This makes the array access implementation of FieldMapping useful only
to consumers, it is no longer useful internally, and should be
deprecated as of Doctrine 3.1.0
@greg0ire greg0ire added this to the 3.0.0 milestone Apr 14, 2023
@greg0ire greg0ire merged commit c49bba7 into doctrine:3.0.x Apr 14, 2023
@greg0ire greg0ire deleted the field-mapping-object-api branch April 14, 2023 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants