Skip to content

Reflection classes should have a __clone method #1572

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
stof opened this issue Jan 15, 2014 · 2 comments
Closed

Reflection classes should have a __clone method #1572

stof opened this issue Jan 15, 2014 · 2 comments
Assignees

Comments

@stof
Copy link
Contributor

stof commented Jan 15, 2014

The __clone method is undocumented, but it exists, preventing cloning: http://3v4l.org/0qc1t

It is also the case for other classes from Reflection: http://3v4l.org/ah7om

@scannell
Copy link
Contributor

Thanks for reporting this. Feel free to submit a PR if you (or someone else reading this) get to this before we do.

stof added a commit to stof/prophecy that referenced this issue Jan 15, 2014
HHVM does not yet define the private __clone method on ReflectionClass, so
the spec was failing. The HHVM incompatibility has been reported as
facebook/hhvm#1572
thekid added a commit to thekid/hhvm that referenced this issue Jan 19, 2014
Fixes facebook#1572
Note: Behaves differently than PHP which fatals, using BadMethodCallException
here in alignment with "fatal error: call to a method of a non-object"
@LiraNuna
Copy link
Contributor

Oops, seems like this wasn't merged. Reopening.

@LiraNuna LiraNuna reopened this May 16, 2014
@LiraNuna LiraNuna added this to the Lockdown milestone May 16, 2014
@LiraNuna LiraNuna self-assigned this May 16, 2014
@LiraNuna LiraNuna removed the mid-pri label May 17, 2014
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

3 participants