Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Hardik_Patel_12 created an issue. See original summary.

Hardik_Patel_12’s picture

Kindly apply a new patch.

Hardik_Patel_12’s picture

Assigned: Hardik_Patel_12 » Unassigned
Status: Needs work » Needs review
swatichouhan012’s picture

Status: Needs review » Needs work
FileSize
126.1 KB

@Hardik_Patel_12 Can you please add screenshot before and after patch, I checked without patch apply here is no issue in asset.

hash6’s picture

Assigned: Unassigned » hash6
hash6’s picture

Assigned: hash6 » Unassigned
Status: Needs work » Reviewed & tested by the community

Thanks @Hardik_Patel_12, for the patch.
@swatichouhan012 FileSystemInterface before Drupal 9.x was optional and is required now
drupal-check somehow did not detect it.

longwave’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/lib/Drupal/Core/Asset/AssetDumper.php
@@ -80,10 +80,6 @@ public function dump($data, $file_extension) {
   private function getFileSystem() {
-    if (!$this->fileSystem) {
-      @trigger_error('\Drupal\Core\File\FileSystemInterface is a dependency of this class in Drupal 8.7.0 and will be required before Drupal 9.0.0. See https://www.drupal.org/node/3006851.', E_USER_DEPRECATED);
-      $this->fileSystem = \Drupal::service('file_system');
-    }
     return $this->fileSystem;
   }

This whole method can be refactored away now.

hash6’s picture

Assigned: Unassigned » hash6
hash6’s picture

Status: Needs work » Needs review
FileSize
7.52 KB
1.58 KB
longwave’s picture

This does duplicate some work done in #3104307: Remove BC layers in various Drupal\Core components

There is a remaining @todo in AssetResolver::getCssAssets() - not sure how or when this was deprecated:

    // Allow themes to remove CSS files by CSS files full path and file name.
    // @todo Remove in Drupal 9.0.x.
    if ($stylesheet_remove = $theme_info->getStyleSheetsRemove()) {
      foreach ($css as $key => $options) {
        if (isset($stylesheet_remove[$key])) {
          unset($css[$key]);
        }
      }
    }
prabha1997’s picture

Assigned: hash6 » prabha1997
Status: Needs review » Needs work

I am working on this issue

prabha1997’s picture

Assigned: prabha1997 » Unassigned
Status: Needs work » Needs review
FileSize
9.1 KB
1.35 KB

Status: Needs review » Needs work

The last submitted patch, 12: 3112367-12.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

longwave’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
7.52 KB

I was wrong about #10 as this needs properly deprecating in #3069052: Properly deprecate the stylesheets-remove key from theme info.yml files. first, so we can't remove it yet.

Reuploading #9 and marking it RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php
@@ -67,19 +67,11 @@ class LibraryDiscoveryParser {
-  public function __construct($root, ModuleHandlerInterface $module_handler, ThemeManagerInterface $theme_manager, StreamWrapperManagerInterface $stream_wrapper_manager = NULL, LibrariesDirectoryFileFinder $libraries_directory_file_finder = NULL) {
+  public function __construct($root, ModuleHandlerInterface $module_handler, ThemeManagerInterface $theme_manager, StreamWrapperManagerInterface $stream_wrapper_manager, LibrariesDirectoryFileFinder $libraries_directory_file_finder) {
...
-    if (!$libraries_directory_file_finder) {
-      @trigger_error('Calling LibraryDiscoveryParser::__construct() without the $libraries_directory_file_finder argument is deprecated in drupal:8.9.0. The $libraries_directory_file_finder argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3099614', E_USER_DEPRECATED);
-      $libraries_directory_file_finder = \Drupal::service('library.libraries_directory_file_finder');
-    }

The $libraries_directory_file_finder deprecation stuff shouldn't be removed. This is an 8.9.x deprecation for Drupal 10.

Hardik_Patel_12’s picture

FileSize
7.34 KB
1.72 KB

Kindly review a new patch.

Hardik_Patel_12’s picture

Status: Needs work » Needs review
andypost’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 617441c and pushed to 9.0.x. Thanks!

FILE: ...dev/drupal/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 434 | ERROR | [x] Expected 1 blank line after function; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Fixed on coding standard on commit.

  • alexpott committed 617441c on 9.0.x
    Issue #3112367 by Hardik_Patel_12, hash6, prabha1997, longwave,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.