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

Fix #344 - lazy loading value holder magic method support #345

Merged

Conversation

Ocramius
Copy link
Owner

@Ocramius Ocramius commented Oct 22, 2016

Fixes #344

TODO:

  • ~~~wrap new conditional logic in private methods, if possible~~~ skipped - shall come with 3.1.0 in PHP 7.1 support #327
  • check (and write, if missing) functional/unit tests for the lazy loading ghost proxy:
    • __get
    • __set
    • __unset
    • __isset
  • check (and write, if missing) functional/unit tests for the remote object proxy:
    • __get
    • __set
    • __unset
    • __isset
  • check (and write, if missing) functional/unit tests for the access interceptor value holder proxy:
    • __get
    • __set
    • __unset
    • __isset
  • check (and write, if missing) functional/unit tests for the access interceptor scope localizer proxy:
    • __get
    • __set
    • __unset
    • __isset

if ($hasParent) {
$parameter = $originalClass->getMethod('__get')->getParameters()[0];

$parameterType = $parameter->hasType() ? $parameter->getType() : null;
Copy link
Owner Author

Choose a reason for hiding this comment

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

This is a fix for #346, no? Can you please revert it, and we move it to something else? We'd have to check it for all scenarios anyway...

* @author Jefersson Nathan <malukenho@phpse.net>
* @license MIT
*/
class ClassWithMagicMethodsWeirdlyTypeHinted
Copy link
Owner Author

Choose a reason for hiding this comment

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

Not weirdly :D Also - possibly to be delayed until #346

@Ocramius
Copy link
Owner Author

Ocramius commented Nov 5, 2016

@malukenho you said that you can't push 2.0.x or master? Did you already merge this change into those branches?

@Ocramius
Copy link
Owner Author

Ocramius commented Nov 5, 2016

@malukenho I un-protected 2.0.x to allow you to push, and also push to master (or press merge here)

@Ocramius Ocramius changed the title Fix/#344 lazy loading value holder magic method support Fix #344 - lazy loading value holder magic method support Nov 5, 2016
@malukenho malukenho merged commit 96bc2cf into master Nov 5, 2016
@malukenho malukenho deleted the fix/#344-lazy-loading-value-holder-magic-method-support branch November 5, 2016 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants