Verified Commit 74dba219 authored by godotislate's avatar godotislate
Browse files

fix: #3599189 Some deprecation messages are missing E_USER_DEPRECATED

By: ptmkenny
By: godotislate
(cherry picked from commit 843061a2)
parent 04417afe
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ public function getBundles() {
    // get the bundle value from the parent 'Bundle' key.
    $bundle = $this->definition['constraints']['Bundle']['bundle'] ?? NULL;
    if (($bundle === NULL) && isset($this->definition['constraints']['Bundle'])) {
      @trigger_error('Adding the "Bundle" constraint with options missing the "bundle" key is deprecated in drupal:11.4.0 and will not be supported in drupal:12.0.0. See https://www.drupal.org/node/3554746');
      @trigger_error('Adding the "Bundle" constraint with options missing the "bundle" key is deprecated in drupal:11.4.0 and will not be supported in drupal:12.0.0. See https://www.drupal.org/node/3554746', E_USER_DEPRECATED);
      $bundle = $this->definition['constraints']['Bundle'];
    }
    return is_string($bundle) ? [$bundle] : $bundle;
+3 −1
Original line number Diff line number Diff line
@@ -346,7 +346,9 @@ public function addPropertyConstraints($name, array $constraints) {
    $complex_data_constraint = $this->getItemDefinition()->getConstraint('ComplexData') ?: [];
    $item_constraints = $complex_data_constraint['properties'] ?? NULL;
    if ($item_constraints === NULL) {
      @trigger_error('Adding the "ComplexData" constraint with options missing the "properties" key is deprecated in drupal:11.4.0 and will not be supported in drupal:12.0.0. See https://www.drupal.org/node/3554746');
      if ($complex_data_constraint !== []) {
        @trigger_error('Adding the "ComplexData" constraint with options missing the "properties" key is deprecated in drupal:11.4.0 and will not be supported in drupal:12.0.0. See https://www.drupal.org/node/3554746', E_USER_DEPRECATED);
      }
      $item_constraints = $complex_data_constraint;
    }
    if (isset($item_constraints[$name])) {
+3 −1
Original line number Diff line number Diff line
@@ -560,7 +560,9 @@ public function getItemDefinition() {
      $complex_data_constraint = $this->getItemDefinition()->getConstraint('ComplexData') ?: [];
      $item_constraints = $complex_data_constraint['properties'] ?? NULL;
      if ($item_constraints === NULL) {
        @trigger_error('Adding the "ComplexData" constraint with options missing the "properties" key is deprecated in drupal:11.4.0 and will not be supported in drupal:12.0.0. See https://www.drupal.org/node/3554746');
        if ($complex_data_constraint !== []) {
          @trigger_error('Adding the "ComplexData" constraint with options missing the "properties" key is deprecated in drupal:11.4.0 and will not be supported in drupal:12.0.0. See https://www.drupal.org/node/3554746', E_USER_DEPRECATED);
        }
        $item_constraints = $complex_data_constraint;
      }
      foreach ($this->propertyConstraints as $name => $constraints) {