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

Bugfix: ProxyGenerator incompatible with public typed properties and lazy loading #882

Merged
merged 7 commits into from
Jan 10, 2020

Conversation

a-menshchikov
Copy link
Contributor

Added separate methods to get the list of public properties that will be lazy loaded, and to get default values these properties. Typed not nullable properties in php 7.4 have no default value.

Issue: #881

… be lazy loaded, and to get default values these properties (typed not nullable properties in php 7.4 have no default value)
@NikoGrano
Copy link

@Ocramius Would you mind to take a look into this?

Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

Can’t merge this: the new interface methods constitute a BC break. We need to be able to fix this in a minor release.

@a-menshchikov
Copy link
Contributor Author

@alcaeus thank you for comment.
Could you give me some more details about why these new methods constitute a BC break?

@alcaeus
Copy link
Member

alcaeus commented Dec 23, 2019

Adding new methods to an interface is always a BC break, as existing implementations will no longer satisfy the interface and thus cause a fatal error.

@NikoGrano
Copy link

@alcaeus Requesting your review.

Copy link

@NikoGrano NikoGrano left a comment

Choose a reason for hiding this comment

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

LGTM

@a-menshchikov
Copy link
Contributor Author

Added duplicate of ProxyLogicTest that works with class with typed properties. If I have to leave only some specific tests, tell me which ones.

@greg0ire greg0ire requested a review from alcaeus December 31, 2019 16:00
NikoGrano added a commit to HouseHold/HouseHold that referenced this pull request Jan 2, 2020
NikoGrano added a commit to HouseHold/HouseHold that referenced this pull request Jan 8, 2020
@a-menshchikov
Copy link
Contributor Author

@alcaeus what's news on this PR? Maybe I should change something in duplicated tests?

NikoGrano added a commit to HouseHold/HouseHold that referenced this pull request Jan 8, 2020
NikoGrano added a commit to HouseHold/HouseHold that referenced this pull request Jan 8, 2020
NikoGrano added a commit to HouseHold/HouseHold that referenced this pull request Jan 8, 2020
NikoGrano added a commit to HouseHold/HouseHold that referenced this pull request Jan 9, 2020
NikoGrano added a commit to HouseHold/HouseHold that referenced this pull request Jan 9, 2020
NikoGrano added a commit to HouseHold/HouseHold that referenced this pull request Jan 9, 2020
@NikoGrano
Copy link

Ping @Ocramius as it's beem 17 days since @alcaeus have commented this.

@alcaeus
Copy link
Member

alcaeus commented Jan 9, 2020

it's beem 17 days since @alcaeus have commented this.

My apologies for spending time with my family over Christmas break. I'm currently working through my notification backlog and have to prioritise things. As this is all done in my free (meaning unpaid) time, sometimes patience is all that's needed.

@NikoGrano
Copy link

Thank you. Just making sure you did not die during x-mass 😆.

Anyways, I understand that you use your free time for this. Just fyi, my current project work done on my free time and not getting paid for it either.

This issue is currently major blocker for anybody using PHP 7.4 in any project and causing everybody to make stypid bypasses or drop version to 7.3. That is the reason why I keep pining. If I can help you in anything, let me know. As I'm private invidual doing this, I'm unfortunately not able sponsor to get this issue resolved any faster.

Ocramius added a commit to Ocramius/common that referenced this pull request Jan 10, 2020
…ray()` lookups

`in_array()` is expensive, and looking for it on every
property access will cripple performance even without I/O
Ocramius added a commit to Ocramius/common that referenced this pull request Jan 10, 2020
Ocramius added a commit to Ocramius/common that referenced this pull request Jan 10, 2020
Ocramius added a commit to Ocramius/common that referenced this pull request Jan 10, 2020
…RSION_ID` comparison

This allows us to use more powerful reflectors (if available).
Ocramius added a commit to Ocramius/common that referenced this pull request Jan 10, 2020
Ocramius added a commit to Ocramius/common that referenced this pull request Jan 10, 2020
Ocramius added a commit to Ocramius/common that referenced this pull request Jan 10, 2020
…rty#getType()` (always defined on PHP 7.4)
@Ocramius Ocramius self-assigned this Jan 10, 2020
@Ocramius Ocramius added this to the 2.12.0 milestone Jan 10, 2020
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

LGTM! Applying some local diffs (nitpicks, mostly) and merging manually, thanks @a-menshchikov!

@Ocramius Ocramius merged commit ac7e7f4 into doctrine:master Jan 10, 2020
NikoGrano added a commit to HouseHold/HouseHold that referenced this pull request Jan 10, 2020
@NikoGrano
Copy link

Thanks!

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.

4 participants