Commit dcf7796a authored by catch's avatar catch
Browse files

Issue #3351004 by Natallia: Deprecations for PHP 8.1 get_class() and...

Issue #3351004 by Natallia: Deprecations for PHP 8.1 get_class() and get_called_class() without argument

(cherry picked from commit decf4529)
parent 4e51c9b5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public function register(ContainerBuilder $container) {
    $container->getDefinition('extension.list.theme_engine')->setClass(InstallerThemeEngineExtensionList::class);

    // Don't register the lazy route provider in the super early installer.
    if (get_called_class() === NormalInstallerServiceProvider::class) {
    if (static::class === NormalInstallerServiceProvider::class) {
      $lazy_route_provider = $container->register('router.route_provider.installer');
      $lazy_route_provider
        ->setClass(InstallerRouteProviderLazyBuilder::class)
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ public function getInfo() {
      // of that specific type.
      '#display' => NULL,
      '#pre_render' => [
        get_class() . '::generatePlaceholder',
        self::class . '::generatePlaceholder',
      ],
      '#include_fallback' => FALSE,
    ];
@@ -47,7 +47,7 @@ public function getInfo() {
   */
  public static function generatePlaceholder(array $element) {
    $build = [
      '#lazy_builder' => [get_class() . '::renderMessages', [$element['#display']]],
      '#lazy_builder' => [self::class . '::renderMessages', [$element['#display']]],
      '#create_placeholder' => TRUE,
    ];

+1 −1
Original line number Diff line number Diff line
@@ -777,7 +777,7 @@ public function toRenderArray() {
      '#options' => $this->getOptions(),
    ];
    if (!$this->unrouted) {
      $render_array['#access_callback'] = [get_class(), 'renderAccess'];
      $render_array['#access_callback'] = [self::class, 'renderAccess'];
    }
    return $render_array;
  }
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ public function blockForm($form, FormStateInterface $form_state) {
      '#title' => $this->t('Menu levels'),
      // Open if not set to defaults.
      '#open' => $defaults['level'] !== $config['level'] || $defaults['depth'] !== $config['depth'],
      '#process' => [[get_class(), 'processMenuLevelParents']],
      '#process' => [[self::class, 'processMenuLevelParents']],
    ];

    $options = range(0, $this->menuTree->maxDepth());