➜  drupal8 git:(8.7.x) ✗ drupal-check modules/contrib/flysystem
 58/58 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ---------------------------------------------------------
  Line   src/Asset/AssetDumper.php
 ------ ---------------------------------------------------------
  29     Call to deprecated function file_prepare_directory().
  30     Call to deprecated function file_unmanaged_save_data().
  42     Call to deprecated function file_unmanaged_save_data().
 ------ ---------------------------------------------------------

 ------ ------------------------------------------------------
  Line   src/Asset/CssCollectionOptimizer.php
 ------ ------------------------------------------------------
  27     Call to deprecated function file_unmanaged_delete().
 ------ ------------------------------------------------------

 ------ ------------------------------------------------------
  Line   src/Asset/JsCollectionOptimizer.php
 ------ ------------------------------------------------------
  26     Call to deprecated function file_unmanaged_delete().
 ------ ------------------------------------------------------

 ------ -------------------------------------------------------------------------
  Line   tests/src/Unit/Asset/JsCollectionOptimizerTest.php
 ------ -------------------------------------------------------------------------
  67     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.
 ------ -------------------------------------------------------------------------

 ------ -------------------------------------------------------------------------
  Line   tests/src/Unit/EventSubscriber/EnsureSubscriberTest.php
 ------ -------------------------------------------------------------------------
  25     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.
 ------ -------------------------------------------------------------------------

 ------ -------------------------------------------------------------------------
  Line   tests/src/Unit/FlysystemFactoryTest.php
 ------ -------------------------------------------------------------------------
  59     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.
 ------ -------------------------------------------------------------------------

 ------ -------------------------------------------------------------------------
  Line   tests/src/Unit/Plugin/FlysystemPluginManagerTest.php
 ------ -------------------------------------------------------------------------
  22     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.
 ------ -------------------------------------------------------------------------

 ------ ---------------------------------------------------------
  Line   tests/src/Unit/Plugin/ImageStyleGenerationTraitTest.php
 ------ ---------------------------------------------------------
  43     Fetching class constant class of deprecated class
         Drupal\Core\Entity\EntityManagerInterface.
 ------ ---------------------------------------------------------


 [ERROR] Found 10 errors


Comments

vijaycs85 created an issue. See original summary.

sergiu stici’s picture

Status: Active » Needs review
StatusFileSize
new7.04 KB

Here is the patch, please review.

dieterholvoet’s picture

StatusFileSize
new6.97 KB

You can use use the injected filesystem service of the parent classes.

vijaycs85’s picture

Status: Needs review » Needs work

Thanks @DieterHolvoet. Looks like we still have 5 more issues to fix:

58/58 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ---------------------------------------------------------------------
  Line   src/Asset/CssCollectionOptimizer.php
 ------ ---------------------------------------------------------------------
  30     Call to deprecated function file_scan_directory():
         in drupal:8.8.0 and is removed from drupal:9.0.0.
         Use \Drupal\Core\File\FileSystemInterface::scanDirectory() instead.
 ------ ---------------------------------------------------------------------

 ------ ---------------------------------------------------------------------
  Line   src/Asset/JsCollectionOptimizer.php
 ------ ---------------------------------------------------------------------
  29     Call to deprecated function file_scan_directory():
         in drupal:8.8.0 and is removed from drupal:9.0.0.
         Use \Drupal\Core\File\FileSystemInterface::scanDirectory() instead.
 ------ ---------------------------------------------------------------------

 ------ ---------------------------------------------------------------------------------------------
  Line   src/Flysystem/Local.php
 ------ ---------------------------------------------------------------------------------------------
  182    Call to deprecated method htaccessLines() of class Drupal\Component\PhpStorage\FileStorage:
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead use
         \Drupal\Component\FileSecurity\FileSecurity.
 ------ ---------------------------------------------------------------------------------------------

 ------ ----------------------------------------------------------------------------------------
  Line   src/FlysystemFactory.php
 ------ ----------------------------------------------------------------------------------------
  101    Call to deprecated method validScheme() of class Drupal\Core\File\FileSystemInterface:
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidScheme()
         instead.
 ------ ----------------------------------------------------------------------------------------

 ------ --------------------------------------------------------------------------------------------------------------------
  Line   src/Tests/ModuleInstallUninstallWebTest.php
 ------ --------------------------------------------------------------------------------------------------------------------
  12     Class Drupal\flysystem\Tests\ModuleInstallUninstallWebTest extends deprecated class Drupal\simpletest\WebTestBase:
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
 ------ --------------------------------------------------------------------------------------------------------------------


 [ERROR] Found 5 errors

dieterholvoet’s picture

StatusFileSize
new10.47 KB

I fixed all other issues except for the test, since I'm not really familiar with Drupal testing.

jungle’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Needs work » Fixed

I am marking this as fixed and giving credit to everyone as this was fixed by other issues already. Thanks!

Status: Fixed » Closed (fixed)

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