Commit 6433401c authored by catch's avatar catch
Browse files

Issue #3375477 by longwave: Add BC for asset.query_string service to...

Issue #3375477 by longwave: Add BC for asset.query_string service to DbUpdateController::__construct
parent b3e943e9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ class DbUpdateController extends ControllerBase {
   * @param \Drupal\Core\Asset\AssetQueryStringInterface $assetQueryString
   *   The asset query string.
   */
  public function __construct($root, KeyValueExpirableFactoryInterface $key_value_expirable_factory, CacheBackendInterface $cache, StateInterface $state, ModuleHandlerInterface $module_handler, AccountInterface $account, BareHtmlPageRendererInterface $bare_html_page_renderer, UpdateRegistry $post_update_registry, protected AssetQueryStringInterface $assetQueryString) {
  public function __construct($root, KeyValueExpirableFactoryInterface $key_value_expirable_factory, CacheBackendInterface $cache, StateInterface $state, ModuleHandlerInterface $module_handler, AccountInterface $account, BareHtmlPageRendererInterface $bare_html_page_renderer, UpdateRegistry $post_update_registry, protected ?AssetQueryStringInterface $assetQueryString = NULL) {
    $this->root = $root;
    $this->keyValueExpirableFactory = $key_value_expirable_factory;
    $this->cache = $cache;
@@ -110,6 +110,11 @@ public function __construct($root, KeyValueExpirableFactoryInterface $key_value_
    $this->account = $account;
    $this->bareHtmlPageRenderer = $bare_html_page_renderer;
    $this->postUpdateRegistry = $post_update_registry;
    if ($this->assetQueryString === NULL) {
      $this->assetQueryString = \Drupal::service('asset.query_string');
      @trigger_error('Calling' . __METHOD__ . '() without the $assetQueryString argument is deprecated in drupal:10.2.0 and is required in drupal:11.0.0. See https://www.drupal.org/node/3358337', E_USER_DEPRECATED);
    }

  }

  /**