Commit df48f29d authored by Keegan Rankin's avatar Keegan Rankin Committed by David Suissa
Browse files

Issue #3528007 by megakeegman, dydave: Reverted change from DO-3518123, since...

Issue #3528007 by megakeegman, dydave: Reverted change from DO-3518123, since 'DeprecationHelper' class is not available before Drupal 10.2, thus breaking compatibility with older core versions.
parent cad39ffe
Loading
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@

namespace Drupal\admin_toolbar_tools\Controller;

use Drupal\Component\Utility\DeprecationHelper;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -194,8 +193,13 @@ class ToolbarController extends ControllerBase {
    $this->jsCollectionOptimizer->deleteAll();

    // @todo Remove deprecated code when support for core:10.2 is dropped.
    if (floatval(\Drupal::VERSION) < 10.2) {
      // @phpstan-ignore function.notFound
    DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '10.2.0', fn() => $this->assetQueryString->reset(), fn() => _drupal_flush_css_js());
      _drupal_flush_css_js();
    }
    else {
      $this->assetQueryString->reset();
    }
    $this->messenger()->addMessage($this->t('CSS and JavaScript cache cleared.'));
    return new RedirectResponse($this->reloadPage());
  }
+0 −5
Original line number Diff line number Diff line
@@ -20,8 +20,3 @@ parameters:
      message: '#Function admin_toolbar_[a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with no value type specified in iterable type [a-zA-Z0-9\\_]+\.#'
      paths:
        - admin_toolbar_links_access_filter/admin_toolbar_links_access_filter.module
    -
      message: "#^Unable to resolve the template type Deprecated in call to method static method Drupal\\\\Component\\\\Utility\\\\DeprecationHelper\\:\\:backwardsCompatibleCall\\(\\)#"
      # count: 1
      paths:
        - admin_toolbar_tools/src/Controller/ToolbarController.php