Problem/Motivation

drupal-check results on commit hash:
source : [git] https://git.drupal.org/project/flexslider cfe2d30ce9477fea0ec21cfdeda92b17deeddb56
source : http://cgit.drupalcode.org/flexslider


 ------ --------------------------------------------------- 
  Line   flexslider.module                                  
 ------ --------------------------------------------------- 
  83     Call to deprecated function libraries_get_path().  
 ------ --------------------------------------------------- 

 ------ -------------------------------------------------- 
  Line   src/Controller/FlexsliderOptionsetController.php  
 ------ -------------------------------------------------- 
  25     Call to deprecated method url() of class          
         Drupal\Core\Config\Entity\ConfigEntityBase.       
  39     Call to deprecated method url() of class          
         Drupal\Core\Config\Entity\ConfigEntityBase.       
 ------ -------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/FlexsliderDeleteForm.php                  
 ------ --------------------------------------------------- 
  41     Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/FlexsliderForm.php                        
 ------ --------------------------------------------------- 
  421    Call to deprecated function drupal_set_message().  
  427    Call to deprecated function drupal_set_message().  
  485    Call to deprecated function libraries_detect().    
  487    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ ------------------------------------------------------------------- 
  Line   src/Tests/Update/FlexsliderSettingsUpdateTest.php                  
 ------ ------------------------------------------------------------------- 
  12     Class Drupallexslider\Tests\Update\FlexsliderSettingsUpdateTest  
         extends deprecated class                                           
         Drupal\system\Tests\Update\UpdatePathTestBase.                     
 ------ ------------------------------------------------------------------- 

 [ERROR] Found 9 errors                                                     

 

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mcdwayne created an issue. See original summary.

daiwik.addweb’s picture

@mcdwayne, Kindly review the attached patch on the same hope this will helps you.

Thanks!

daiwik.addweb’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: flexslider-3042778-2.patch, failed testing. View results

Tolyan4ik’s picture

jenlampton’s picture

I believe that if you add drupal 9 as an option to the composer.json file in this project you can get a nice little Compatible with Drupal 9 badge in the Project information section on the module page.

Screenshot of the Project information section with Compatible with Drupal 9 highlighted

Below is a code sample from a module that has the badge.

"require": {
        "php": "^7.1",
       "drupal/core": "^8 || ^9"
  },

It also looks like it may possible to get the badge by adding the 'core_version_requirement' key in the modules info.yml file, which, in turn, will add the version to the require section of composer.json. Example follows.

core_version_requirement: ^8 || ^9

Do you want to include the change in this Patch or open a separate issue?

Tolyan4ik’s picture

andralex’s picture

Figured out that the last commit is now changed to 3daf2116a523a7a6816bb0f22ce495dae0e4fb61 and there are some extra deprecations exists now.
Here is a new patch with fixes of extra deprecations. Skipped libraries_detect(), libraries_get_path() and tests. Going to move them into separate issues to not overweight here.

Steven Brown’s picture

Status: Needs review » Active

Ran drupal-check against 3daf211. Here are some new errors that are not in the list above.

 ------ ---------------------------------------------------------------------
  Line   flexslider.install
 ------ ---------------------------------------------------------------------
  16     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.
  31     Call to deprecated function libraries_detect():
         Will be removed before a stable Drupal 8 release. Please use the
         new library load and managment concepts described at:
         https://www.drupal.org/node/2170763
 ------ ---------------------------------------------------------------------

 ------ ---------------------------------------------------------------------------------
  Line   flexslider_example/flexslider_example.install
 ------ ---------------------------------------------------------------------------------
  36     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.
  50     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.
  57     Call to deprecated constant FILE_EXISTS_RENAME: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::EXISTS_RENAME.
  63     Call to deprecated constant NODE_NOT_PROMOTED: Deprecated in drupal:8.?.? and is removed from drupal:9.0.0. Use
         \Drupal\node\NodeInterface::NOT_PROMOTED instead.
  64     Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
  65     Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
 ------ ----------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------------------------------
  Line   src/Tests/FlexsliderTest.php
 ------ ------------------------------------------------------------------------------------------------------
  14     Class Drupal\flexslider\Tests\FlexsliderTest 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.
  45     Call to method setUp() of 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.
 ------ ------------------------------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------------------
  Line   tests/modules/flexslider_library_test/flexslider_library_test.install
 ------ ------------------------------------------------------------------------------------------
  20     Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.
  20     Call to deprecated constant FILE_MODIFY_PERMISSIONS: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::MODIFY_PERMISSIONS.
  20     Call to deprecated function file_prepare_directory():
         in drupal:8.7.0 and is removed from drupal:9.0.0.
         Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().
 ------ ------------------------------------------------------------------------------------------
Tolyan4ik’s picture

Sudeepthi Peteti’s picture

Hi,
After applying patch#10, there is still some deprecated code. Changed them.
Also added core_version_requirement as well in info.yml file.

Sudeepthi Peteti’s picture

FileSize
17.35 KB
amaria’s picture

I will review these patches and change accordingly since some of the changes are taken care of in other tickets.

  • amaria authored 2eab7ec on 8.x-2.x
    Issue #3042778 by Tolyan4ik, Sudeepthi Peteti, andralex, RoshniPatel....
amaria’s picture

Status: Needs review » Fixed

This has been committed. I made a few minor changes to fix the messenger calls and removed the library api and test code changes that was done in other tickets. Thanks to all who participated. Note that it will still complain about a couple of library api calls that I left in for backward compatibility until 8.9 becomes the minimum supported version of Drupal.

Status: Fixed » Closed (fixed)

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