Commit dd2930d7 authored by Mateu Aguiló Bosch's avatar Mateu Aguiló Bosch Committed by Mateu Aguiló Bosch
Browse files

Issue #3268927 by e0ipso: Allow XDEBUG_TRIGGER in render endpoint

parent d06cb229
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -126,9 +126,10 @@ class ComponentRenderer {
   */
  private function validateProps(array $props, Component $component): void {
    $validator = new Validator();
    $schema = Validator::arrayToObjectRecursive(
      $component->getMetadata()->getSchemas()['props']
    );
    $prop_schema = $component->getMetadata()->getSchemas()['props'];
    // Add an exception for XDEBUG_TRIGGER, so we can debug more comfortably.
    $prop_schema['properties']['XDEBUG_TRIGGER'] = ['type' => 'string'];
    $schema = Validator::arrayToObjectRecursive($prop_schema);
    if (!is_object($schema)) {
      throw new InvalidComponentException('Unable to find schema for component props.');
    }