-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-1716 Allow configuring server API version in manager #1204
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
Changes from all commits
6c0dbfe
e8652f2
58ef8f6
8266bc0
2c8de0c
a88f3c3
bc14872
62b5bfd
d1b2a7a
5b25a60
579712b
b8b4e34
d7a33d2
3258ec7
7beb720
349e8c6
8eb4a30
5606fd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,6 +169,55 @@ | |
} while (0) | ||
#endif /* PHP_VERSION_ID < 70300 */ | ||
|
||
/* Compatibility macros to override error handling logic */ | ||
#define PHONGO_PARSE_PARAMETERS_START(min_num_args, max_num_args) \ | ||
do { \ | ||
zend_error_handling error_handling; \ | ||
zend_replace_error_handling( \ | ||
EH_THROW, \ | ||
phongo_exception_from_phongo_domain(PHONGO_ERROR_INVALID_ARGUMENT), \ | ||
&error_handling); \ | ||
ZEND_PARSE_PARAMETERS_START(min_num_args, max_num_args) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be indented consistently with the lines above since it falls within There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, totally missed that. Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah...I was wondering about this: it seems like clang-format immediately wants to undo my changes and restore this broken formatting, so I'm afraid we're stuck with this for the time being :( |
||
|
||
#define PHONGO_PARSE_PARAMETERS_END() \ | ||
ZEND_PARSE_PARAMETERS_END_EX( \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question about indentation here. |
||
zend_restore_error_handling(&error_handling); \ | ||
return ); \ | ||
zend_restore_error_handling(&error_handling); \ | ||
} \ | ||
while (0) | ||
|
||
#ifndef ZEND_PARSE_PARAMETERS_NONE | ||
#define PHONGO_PARSE_PARAMETERS_NONE() \ | ||
do { \ | ||
zend_error_handling error_handling; \ | ||
zend_replace_error_handling( \ | ||
EH_THROW, \ | ||
phongo_exception_from_phongo_domain(PHONGO_ERROR_INVALID_ARGUMENT), \ | ||
&error_handling); \ | ||
if (zend_parse_parameters_none() == FAILURE) { \ | ||
zend_restore_error_handling(&error_handling); \ | ||
return; \ | ||
} \ | ||
zend_restore_error_handling(&error_handling); \ | ||
} while (0) | ||
#else | ||
#define PHONGO_PARSE_PARAMETERS_NONE() \ | ||
do { \ | ||
zend_error_handling error_handling; \ | ||
zend_replace_error_handling( \ | ||
EH_THROW, \ | ||
phongo_exception_from_phongo_domain(PHONGO_ERROR_INVALID_ARGUMENT), \ | ||
&error_handling); \ | ||
if (UNEXPECTED(ZEND_NUM_ARGS() != 0)) { \ | ||
zend_wrong_parameters_none_error(); \ | ||
zend_restore_error_handling(&error_handling); \ | ||
return; \ | ||
} \ | ||
zend_restore_error_handling(&error_handling); \ | ||
} while (0) | ||
#endif | ||
|
||
void phongo_add_exception_prop(const char* prop, int prop_len, zval* value); | ||
zend_bool php_phongo_zend_hash_apply_protection_begin(HashTable* ht); | ||
zend_bool php_phongo_zend_hash_apply_protection_end(HashTable* ht); | ||
|
Uh oh!
There was an error while loading. Please reload this page.