------ ----------------------------------------------------------------------
Line src/Element/MobileNumber.php
------ ----------------------------------------------------------------------
401 Call to deprecated function drupal_get_messages():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::all() or
\Drupal\Core\Messenger\MessengerInterface::messagesByType() instead.
406 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------------------------------
Line src/Feeds/Target/MobileNumber.php
------ ----------------------------------------------------------------------------------------------
Class Drupal\feeds\Plugin\Type\Target\FieldTargetBase not found and could not be autoloaded.
------ ----------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
Line src/Plugin/TfaValidation/MobileNumberTfa.php
-------------------------------------------------------------------------------------------------------------------
Class MobileNumberTfa was not found while trying to analyse it - autoloading is probably not configured properly.
-------------------------------------------------------------------------------------------------------------------

------ -----------------------------------------------------------------------------------
Line src/Plugin/Validation/Constraint/MobileNumberValidator.php
------ -----------------------------------------------------------------------------------
54 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_strtolower() instead.
64 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_strtolower() instead.
70 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_strtolower() instead.
77 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_strtolower() instead.
84 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_strtolower() instead.
93 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_strtolower() instead.
------ -----------------------------------------------------------------------------------

------ ---------------------------------------------------------------------------------------
Line src/Plugin/WebformElement/MobileNumber.php
------ ---------------------------------------------------------------------------------------
Class Drupal\webform\Plugin\WebformElementBase not found and could not be autoloaded.
------ ---------------------------------------------------------------------------------------

------ --------------------------------------------------------------------------
Line src/Tests/MobileNumberFieldTest.php
------ --------------------------------------------------------------------------
397 Call to deprecated method entityManager() of class Drupal:
in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
Use \Drupal::entityTypeManager() instead in most cases. If the needed
method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the
deprecated \Drupal\Core\Entity\EntityManager to find the
correct interface or service.
------ --------------------------------------------------------------------------

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

karan_mudi created an issue. See original summary.

karan_mudi’s picture

Issue summary: View changes
karan_mudi’s picture

Attached patch for above issues.

karan_mudi’s picture

amitgoyal’s picture

Status: Active » Needs work

Before applying the patch, I was getting 20 deprecation errors. The patch has fixed around 10 deprecation errors but still seeing following deprecations,

➜  d9 git:(8.8.x) ✗ ./vendor/bin/drupal-check -d modules/contrib/mobile_number


 23/23 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------------------------------
  Line   src/Feeds/Target/MobileNumber.php
 ------ ----------------------------------------------------------------------------------------------
         Class Drupal\feeds\Plugin\Type\Target\FieldTargetBase not found and could not be autoloaded.
 ------ ----------------------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------------------------
  Line   src/Plugin/Field/FieldType/MobileNumberItem.php
 ------ ------------------------------------------------------------------------------------------------
  431    Call to deprecated method getLowercaseLabel() of class Drupal\Core\Entity\EntityTypeInterface:
         deprecated in drupal:8.8.0 and is removed from drupal:9.0.0.
         Instead, you should call getSingularLabel().
         See https://www.drupal.org/node/3075567
 ------ ------------------------------------------------------------------------------------------------

 ------ -------------------------------------------------------------------------------------------------------------------
  Line   src/Plugin/TfaValidation/MobileNumberTfa.php
 ------ -------------------------------------------------------------------------------------------------------------------
         Class MobileNumberTfa was not found while trying to analyse it - autoloading is probably not configured properly.
 ------ -------------------------------------------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------------------------
  Line   src/Plugin/Validation/Constraint/MobileNumberValidator.php
 ------ ------------------------------------------------------------------------------------------------
  39     Call to deprecated method getLowercaseLabel() of class Drupal\Core\Entity\EntityTypeInterface:
         deprecated in drupal:8.8.0 and is removed from drupal:9.0.0.
         Instead, you should call getSingularLabel().
         See https://www.drupal.org/node/3075567
 ------ ------------------------------------------------------------------------------------------------

 ------ ---------------------------------------------------------------------------------------
  Line   src/Plugin/WebformElement/MobileNumber.php
 ------ ---------------------------------------------------------------------------------------
         Class Drupal\webform\Plugin\WebformElementBase not found and could not be autoloaded.
 ------ ---------------------------------------------------------------------------------------

 ------ ----------------------------------------------------------------------------------------------------------------
  Line   src/Tests/MobileNumberClassTest.php
 ------ ----------------------------------------------------------------------------------------------------------------
  13     Class Drupal\mobile_number\Tests\MobileNumberClassTest extends deprecated class Drupal\simpletest\WebTestBase:
         in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
  35     Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:
         in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
 ------ ----------------------------------------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------------------------------------------
  Line   src/Tests/MobileNumberElementTest.php
 ------ ------------------------------------------------------------------------------------------------------------------
  13     Class Drupal\mobile_number\Tests\MobileNumberElementTest extends deprecated class Drupal\simpletest\WebTestBase:
         in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
  35     Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:
         in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
 ------ ------------------------------------------------------------------------------------------------------------------

 ------ ----------------------------------------------------------------------------------------------------------------
  Line   src/Tests/MobileNumberFieldTest.php
 ------ ----------------------------------------------------------------------------------------------------------------
  17     Class Drupal\mobile_number\Tests\MobileNumberFieldTest extends deprecated class Drupal\simpletest\WebTestBase:
         in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
  39     Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:
         in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
 ------ ----------------------------------------------------------------------------------------------------------------


 [ERROR] Found 11 errors
karan_mudi’s picture

Redone the patch with all the deprecation fixes, Please review.

karan_mudi’s picture

Status: Needs work » Needs review
amitgoyal’s picture

Status: Needs review » Needs work

I am getting following error with #7,

➜ d9 git:(8.8.x) ✗ ./vendor/bin/drupal-check -d modules/contrib/mobile_number


 23/23 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------------------------------------------------------------------
  Line   src/Plugin/TfaValidation/MobileNumberTfa.php
 ------ -------------------------------------------------------------------------------------------------------------------
         Class MobileNumberTfa was not found while trying to analyse it - autoloading is probably not configured properly.
 ------ -------------------------------------------------------------------------------------------------------------------


 [ERROR] Found 1 error

Looks like we need to add following in src/Plugin/TfaValidation/MobileNumberTfa.php,

namespace Drupal\mobile_number\Plugin\TfaValidation;
karan_mudi’s picture

Redone the patch with all the deprecation fixes, Please review.

The issue which has mentioned in https://www.drupal.org/project/mobile_number/issues/3075958#comment-1326... is showing because tfa module was installed, Once we installed this module related classes will be available.

karan_mudi’s picture

Redone the patch with all the deprecation fixes, Please review.

amitgoyal’s picture

Status: Needs work » Needs review

Earlier I was getting 20 errors but applying the #10 patch, most of the errors have gone.

➜  d9 git:(8.8.x) ✗ ./vendor/bin/drupal-check -d modules/contrib/mobile_number


 23/23 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------------------------------
  Line   src/Feeds/Target/MobileNumber.php
 ------ ----------------------------------------------------------------------------------------------
         Class Drupal\feeds\Plugin\Type\Target\FieldTargetBase not found and could not be autoloaded.
 ------ ----------------------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------
  Line   src/Plugin/TfaValidation/MobileNumberTfa.php
 ------ ------------------------------------------------------------------------------
         Class Drupal\tfa\Plugin\TfaBasePlugin not found and could not be autoloaded.
 ------ ------------------------------------------------------------------------------

 ------ ---------------------------------------------------------------------------------------
  Line   src/Plugin/WebformElement/MobileNumber.php
 ------ ---------------------------------------------------------------------------------------
         Class Drupal\webform\Plugin\WebformElementBase not found and could not be autoloaded.
 ------ ---------------------------------------------------------------------------------------


 [ERROR] Found 3 errors

We believe those are related to third party dependencies.

maxilein’s picture

Any updates on this?

dwkitchen made their first commit to this issue’s fork.

karan_mudi’s picture

New patch to support 8.x-1.0-alpha5 module.

  • nyariv committed fd6a2f6 on 8.x-1.x authored by dwkitchen
    Issue #3075958: D9 compability fixes (Deprecated Code Report)
    
nyariv’s picture

Status: Needs review » Fixed

@dwkitchen, thanks for the patch, it has been merged. Closing issue.

Status: Fixed » Closed (fixed)

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