Skip to content

PHPC-1956: Remove disabled __wakeup function in non-serializable classes #1513

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 4 commits into from
Jan 26, 2024

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Jan 25, 2024

…methods

These have been obsolete since the PHONGO_DISABLED_CONSTRUCTOR and PHONGO_DISABLED_WAKEUP macros were introduced in 6887226.
This function was not necessary since PHP 7.0 allowed disabling serialization via object handlers.

The PHONGO_DISABLED_WAKEUP macro is no longer used and has been removed.
@jmikola jmikola requested a review from alcaeus January 25, 2024 20:22
This is superseded by the new manager-serialization_error tests.
@@ -56,27 +56,28 @@ zend_object_handlers* phongo_get_std_object_handlers(void)
/* }}} */

/* {{{ Memory allocation wrappers */
static void* php_phongo_malloc(size_t num_bytes) /* {{{ */
Copy link
Member

Choose a reason for hiding this comment

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

I thought I had removed all of these, but I guess I haven't. Thanks for cleaning this up!

Copy link
Member Author

Choose a reason for hiding this comment

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

Is "these" referring to the foldmarkers (i.e. {{{ and }}})? There are a bunch more, so I can go through and clean those up separately if we like. None of us are using vim to work on this project, so I don't have to worry about @bjori yelling at me.

}

/* Shared function entries for disabling constructors and unserialize() */
PHP_FUNCTION(MongoDB_disabled___construct);
Copy link
Member

Choose a reason for hiding this comment

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

Noted that I added the macros in 6887226 but forgot to remove the shared functions below. Thanks for cleaning up my mess!

@jmikola jmikola merged commit 3db1260 into mongodb:master Jan 26, 2024
@jmikola jmikola deleted the phpc-1956 branch January 26, 2024 14:14
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.

2 participants