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

Make reflections uncloneable #150

Merged
merged 2 commits into from
Nov 19, 2015
Merged

Conversation

asgrim
Copy link
Member

@asgrim asgrim commented Nov 14, 2015

As identified in #61, the Reflections should be uncloneable...

@asgrim asgrim self-assigned this Nov 14, 2015
@asgrim asgrim added this to the 1.0.0 milestone Nov 14, 2015
@asgrim asgrim assigned Ocramius and unassigned asgrim Nov 14, 2015
*/
public function __clone()
{
throw new Exception\Uncloneable('Trying to clone an uncloneable object of class ' . __CLASS__);
Copy link
Member

Choose a reason for hiding this comment

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

Each of these strings are duplicate: instead, create a public static constructor on Uncloneable and call it from all around the various __clone methods

Copy link
Member Author

Choose a reason for hiding this comment

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

@Ocramius sorted

Ocramius added a commit that referenced this pull request Nov 19, 2015
@Ocramius Ocramius merged commit fee3f36 into master Nov 19, 2015
@Ocramius Ocramius deleted the make-reflection-classes-uncloneable branch November 19, 2015 00:20
@Ocramius
Copy link
Member

👍

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.

2 participants