[configurationwebhooks] Code generation: update services and models - #920
[configurationwebhooks] Code generation: update services and models#920AdyenAutomationBot wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces several new PHP model classes for Configuration Webhooks, specifically handling top-up configurations and events. A review comment identifies an issue in WebhookTopUpTrigger.php where the optional schedule property can be null, but the setSchedule method validates it against enum values without a null check, potentially causing false-positive error logs. A code suggestion is provided to add a null check before validation.
| if (!in_array($schedule, $allowedValues, true)) { | ||
| error_log( | ||
| sprintf( | ||
| "schedule: unexpected enum value '%s' - Supported values are [%s]", | ||
| $schedule, | ||
| implode(', ', $allowedValues) | ||
| ) | ||
| ); | ||
| } |
There was a problem hiding this comment.
The schedule property is optional, meaning it can be null. However, the setSchedule method does not check if the value is null before validating it against the allowed enum values. This will trigger a false-positive error_log warning when null is passed to clear or initialize the field. Adding a null check prevents these unnecessary log warnings.
if (!is_null($schedule) && !in_array($schedule, $allowedValues, true)) {
error_log(
sprintf(
"schedule: unexpected enum value '%s' - Supported values are [%s]",
$schedule,
implode(', ', $allowedValues)
)
);
}2909dd5 to
d4a3b1a
Compare
a2283b1 to
ccadb66
Compare
0f20e97 to
ed92624
Compare
35ac5f4 to
5f72993
Compare
5f72993 to
dfb253c
Compare
|



This PR contains the automated changes for the
configurationwebhooksservice.The commit history of this PR reflects the
adyen-openapicommits that have been applied.