Loading core/.phpstan-baseline.php +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ $ignoreErrors[] = [ 'message' => '#^Variable \\$sort in isset\\(\\) always exists and is not nullable\\.$#', 'count' => 1, 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElement.php', 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElementBase.php', ]; $ignoreErrors[] = [ 'message' => '#^Variable \\$output in empty\\(\\) always exists and is not falsy\\.$#', Loading core/core.api.php +1 −1 Original line number Diff line number Diff line Loading @@ -2465,7 +2465,7 @@ function hook_validation_constraint_alter(array &$definitions) { * @section sec_query Query parameters in Ajax requests * If a form uses an Ajax field, all the query parameters in the current request * will be also added to the Ajax POST requests along with an additional * 'ajax_form=1' parameter (See \Drupal\Core\Render\Element\RenderElement). * 'ajax_form=1' parameter (See \Drupal\Core\Render\Element\RenderElementBase). * @code * $settings['options']['query'] += \Drupal::request()->query->all(); * $settings['options']['query'][FormBuilderInterface::AJAX_FORM_REQUEST] = TRUE; Loading core/includes/form.inc +4 −4 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ use Drupal\Core\Batch\BatchStorageInterface; use Drupal\Core\Database\IntegrityConstraintViolationException; use Drupal\Core\Render\Element; use Drupal\Core\Render\Element\RenderElement; use Drupal\Core\Render\Element\RenderElementBase; use Drupal\Core\Template\Attribute; use Drupal\Core\Url; use Symfony\Component\HttpFoundation\RedirectResponse; Loading @@ -33,7 +33,7 @@ function template_preprocess_select(&$variables) { $element = $variables['element']; Element::setAttributes($element, ['id', 'name', 'size']); RenderElement::setAttributes($element, ['form-select']); RenderElementBase::setAttributes($element, ['form-select']); $variables['attributes'] = $element['#attributes']; $variables['options'] = form_select_options($element); Loading Loading @@ -194,7 +194,7 @@ function form_get_options($element, $key) { function template_preprocess_fieldset(&$variables) { $element = $variables['element']; Element::setAttributes($element, ['id']); RenderElement::setAttributes($element); RenderElementBase::setAttributes($element); $variables['attributes'] = $element['#attributes'] ?? []; $variables['prefix'] = $element['#field_prefix'] ?? NULL; $variables['suffix'] = $element['#field_suffix'] ?? NULL; Loading Loading @@ -388,7 +388,7 @@ function template_preprocess_textarea(&$variables) { $element = $variables['element']; $attributes = ['id', 'name', 'rows', 'cols', 'maxlength', 'placeholder']; Element::setAttributes($element, $attributes); RenderElement::setAttributes($element, ['form-textarea']); RenderElementBase::setAttributes($element, ['form-textarea']); $variables['wrapper_attributes'] = new Attribute(); $variables['attributes'] = new Attribute($element['#attributes']); $variables['value'] = $element['#value']; Loading core/lib/Drupal/Core/Datetime/Element/DateElementBase.php +2 −2 Original line number Diff line number Diff line Loading @@ -4,12 +4,12 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Datetime\DrupalDateTime; use Drupal\Core\Render\Element\FormElement; use Drupal\Core\Render\Element\FormElementBase; /** * Provides a base class for date elements. */ abstract class DateElementBase extends FormElement { abstract class DateElementBase extends FormElementBase { /** * Specifies the start and end year to use as a date range. Loading core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public function buildResponse(Request $request, array $form, FormStateInterface // At this point we know callback returned a render element. If the // element is part of the group (#group is set on it) it won't be rendered // unless we remove #group from it. This is caused by // \Drupal\Core\Render\Element\RenderElement::preRenderGroup(), which // \Drupal\Core\Render\Element\RenderElementBase::preRenderGroup(), which // prevents all members of groups from being rendered directly. if (!empty($result['#group'])) { unset($result['#group']); Loading Loading
core/.phpstan-baseline.php +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ $ignoreErrors[] = [ 'message' => '#^Variable \\$sort in isset\\(\\) always exists and is not nullable\\.$#', 'count' => 1, 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElement.php', 'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElementBase.php', ]; $ignoreErrors[] = [ 'message' => '#^Variable \\$output in empty\\(\\) always exists and is not falsy\\.$#', Loading
core/core.api.php +1 −1 Original line number Diff line number Diff line Loading @@ -2465,7 +2465,7 @@ function hook_validation_constraint_alter(array &$definitions) { * @section sec_query Query parameters in Ajax requests * If a form uses an Ajax field, all the query parameters in the current request * will be also added to the Ajax POST requests along with an additional * 'ajax_form=1' parameter (See \Drupal\Core\Render\Element\RenderElement). * 'ajax_form=1' parameter (See \Drupal\Core\Render\Element\RenderElementBase). * @code * $settings['options']['query'] += \Drupal::request()->query->all(); * $settings['options']['query'][FormBuilderInterface::AJAX_FORM_REQUEST] = TRUE; Loading
core/includes/form.inc +4 −4 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ use Drupal\Core\Batch\BatchStorageInterface; use Drupal\Core\Database\IntegrityConstraintViolationException; use Drupal\Core\Render\Element; use Drupal\Core\Render\Element\RenderElement; use Drupal\Core\Render\Element\RenderElementBase; use Drupal\Core\Template\Attribute; use Drupal\Core\Url; use Symfony\Component\HttpFoundation\RedirectResponse; Loading @@ -33,7 +33,7 @@ function template_preprocess_select(&$variables) { $element = $variables['element']; Element::setAttributes($element, ['id', 'name', 'size']); RenderElement::setAttributes($element, ['form-select']); RenderElementBase::setAttributes($element, ['form-select']); $variables['attributes'] = $element['#attributes']; $variables['options'] = form_select_options($element); Loading Loading @@ -194,7 +194,7 @@ function form_get_options($element, $key) { function template_preprocess_fieldset(&$variables) { $element = $variables['element']; Element::setAttributes($element, ['id']); RenderElement::setAttributes($element); RenderElementBase::setAttributes($element); $variables['attributes'] = $element['#attributes'] ?? []; $variables['prefix'] = $element['#field_prefix'] ?? NULL; $variables['suffix'] = $element['#field_suffix'] ?? NULL; Loading Loading @@ -388,7 +388,7 @@ function template_preprocess_textarea(&$variables) { $element = $variables['element']; $attributes = ['id', 'name', 'rows', 'cols', 'maxlength', 'placeholder']; Element::setAttributes($element, $attributes); RenderElement::setAttributes($element, ['form-textarea']); RenderElementBase::setAttributes($element, ['form-textarea']); $variables['wrapper_attributes'] = new Attribute(); $variables['attributes'] = new Attribute($element['#attributes']); $variables['value'] = $element['#value']; Loading
core/lib/Drupal/Core/Datetime/Element/DateElementBase.php +2 −2 Original line number Diff line number Diff line Loading @@ -4,12 +4,12 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Datetime\DrupalDateTime; use Drupal\Core\Render\Element\FormElement; use Drupal\Core\Render\Element\FormElementBase; /** * Provides a base class for date elements. */ abstract class DateElementBase extends FormElement { abstract class DateElementBase extends FormElementBase { /** * Specifies the start and end year to use as a date range. Loading
core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public function buildResponse(Request $request, array $form, FormStateInterface // At this point we know callback returned a render element. If the // element is part of the group (#group is set on it) it won't be rendered // unless we remove #group from it. This is caused by // \Drupal\Core\Render\Element\RenderElement::preRenderGroup(), which // \Drupal\Core\Render\Element\RenderElementBase::preRenderGroup(), which // prevents all members of groups from being rendered directly. if (!empty($result['#group'])) { unset($result['#group']); Loading