Verified Commit 9884cfbd authored by Dave Long's avatar Dave Long
Browse files

Issue #3224941 by andypost, Akram Khan, ravi.shankar, SandeepSingh199, Spokje,...

Issue #3224941 by andypost, Akram Khan, ravi.shankar, SandeepSingh199, Spokje, catch, xjm, alexpott: Remove usage of setAccessible() when core requires PHP 8.1

(cherry picked from commit 69333763)
parent 2dacc539
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -859,7 +859,6 @@ protected static function createEphemeralPairedEditor(EditorInterface $editor, F
    $paired_editor->enforceIsNew(TRUE);
    $reflector = new \ReflectionObject($paired_editor);
    $property = $reflector->getProperty('filterFormat');
    $property->setAccessible(TRUE);
    $property->setValue($paired_editor, clone $filter_format);
    return $paired_editor;
  }
+0 −1
Original line number Diff line number Diff line
@@ -125,7 +125,6 @@ public function computeSmartDefaultSettings(?EditorInterface $text_editor, Filte
      // @todo Remove in https://www.drupal.org/project/drupal/issues/3231347.
      $reflector = new \ReflectionObject($text_editor);
      $property = $reflector->getProperty('filterFormat');
      $property->setAccessible(TRUE);
      $property->setValue($text_editor, $text_format);
    }

+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ trait PrivateMethodUnitTestTrait {
  protected static function getMethod(string $fqcn, string $name): \ReflectionMethod {
    $class = new \ReflectionClass($fqcn);
    $method = $class->getMethod($name);
    $method->setAccessible(TRUE);
    return $method;
  }

+0 −1
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@ public function testConstructor() {
    $comment_bulk_form->init($executable, $display, $options);

    $reflected_actions = (new \ReflectionObject($comment_bulk_form))->getProperty('actions');
    $reflected_actions->setAccessible(TRUE);
    $this->assertEquals(array_slice($actions, 0, -1, TRUE), $reflected_actions->getValue($comment_bulk_form));
  }

+0 −1
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ protected function setupEntityTypes() {
    ];

    $reflector = new \ReflectionProperty($this->routeSubscriber, 'moderatedEntityTypes');
    $reflector->setAccessible(TRUE);
    $reflector->setValue($this->routeSubscriber, $entity_types);
  }

Loading