Skip to content

PHPC-310: Exceptions aren't final; BSON types are and can't be serialized #126

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

Merged
merged 3 commits into from
Oct 20, 2015

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Oct 19, 2015

@bjori
Copy link
Contributor

bjori commented Oct 19, 2015

lgtm.

There are no tests to confirm the __wakeUp() is correct. Thats only a problem if in the future we forget and remove it without giving it a second thought.

PHONGO_CE_INIT() is used to both make the classes final and disable serialization. Additionally, we provide __wakeUp() to ensure deserialization is also disabled (per PHPC-190).

Eventually, BSON types will allow serialization (see PHPC-460) and the included error tests may be revised.
@jmikola
Copy link
Member Author

jmikola commented Oct 19, 2015

Added unserialize() tests, although none of those actually trigger Manager::__wakeUp() and the "MongoDB\Driver objects cannot be serialized" message.

@derickr
Copy link
Contributor

derickr commented Oct 20, 2015

The preventing serialization was not in the Jira ticket. That caused me a surprise when I saw the PR. PR LGTM though.

@jmikola jmikola merged commit b63c10f into mongodb:master Oct 20, 2015
jmikola added a commit that referenced this pull request Oct 20, 2015
@jmikola jmikola deleted the phpc-310 branch October 20, 2015 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants