Problem/Motivation

drupal-check .
 25/25 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ---------------------------------------------------------------------------------------------- 
  Line   src/Plugin/LanguageSelectionPageCondition/LanguageSelectionPageConditionBlacklistedPaths.php  
 ------ ---------------------------------------------------------------------------------------------- 
  76     Parameter $alias_manager of method                                                            
         Drupal\language_selection_page\Plugin\LanguageSelectionPageCondition\                         
         LanguageSelectionPageConditionBlacklistedPaths::__construct() has                             
         typehint with deprecated interface                                                            
         Drupal\Core\Path\AliasManagerInterface:                                                       
         in drupal:8.8.0 and is removed from drupal:9.0.0.                                             
         Use \Drupal\path_alias\AliasManagerInterface.                                                 
  131    Call to deprecated method strtolower() of class                                               
         Drupal\Component\Utility\Unicode:                                                             
         in drupal:8.6.0 and is removed from drupal:9.0.0. Use                                         
         mb_strtolower() instead.                                                                      
 ------ ---------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   src/Plugin/LanguageSelectionPageCondition/LanguageSelectionPageConditionPath.php  
 ------ ---------------------------------------------------------------------------------- 
  105    Parameter $alias_manager of method                                                
         Drupal\language_selection_page\Plugin\LanguageSelectionPageCondition\             
         LanguageSelectionPageConditionPath::__construct() has typehint with               
         deprecated interface Drupal\Core\Path\AliasManagerInterface:                      
         in drupal:8.8.0 and is removed from drupal:9.0.0.                                 
         Use \Drupal\path_alias\AliasManagerInterface.                                     
  162    Call to deprecated function drupal_set_message():                                 
         in drupal:8.5.0 and is removed from drupal:9.0.0.                                 
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.              
 ------ ---------------------------------------------------------------------------------- 

                                                                                
 [ERROR] Found 4 errors                                                         
                                                                                

Remaining tasks

  • Remove deprecations listed above.
  • Add core_version_requirement property to language_selection_page.info.yml
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Shruthi Shetty M created an issue. See original summary.

Shruthi Shetty M’s picture

Status: Active » Needs review
FileSize
2.35 KB
Pol’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hi,

I see you're now using mb_strtolower which requires the mbstring extension.
I also see that mbstring is a requirement for Drupal 8: https://www.drupal.org/docs/8/system-requirements/php-requirements

I guess that point is perfectly valid.

I also see that you replace drupal_set_message with $this->messenger->addMessage, is that property ($this->messenger) exists ?

Thanks.

JeroenT’s picture

Title: Remove the deprication function drupal_set_message() and method strtolower() » Drupal 9 Deprecated Code Report
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs work
Issue tags: +Drupal 9 compatibility, +Novice

Updated IS.

JeroenT’s picture

JeroenT’s picture

JeroenT’s picture

JeroenT’s picture

Well, at least the tests are running. The test that is currently failing is locally already failing without any changes.

JeroenT’s picture

  • Pol committed caf1641 on 8.x-2.x authored by JeroenT
    Issue #3124380 by JeroenT, Shruthi Shetty M: Drupal 9 Deprecated Code...
Pol’s picture

Status: Needs review » Fixed

Thanks fellow mate :)

JeroenT’s picture

Status: Fixed » Needs work

Hi Pol,

Thanks for committing this issue. But it seems something went wrong on commit: https://git.drupalcode.org/project/language_selection_page/-/commit/caf1...

\Traversable was updated to Traversable, which now breaks the functionality of the module. Can you revert that change?

Pol’s picture

Oops !! Fixed in 8.x-2.6 sorry about that.

JeroenT’s picture

Status: Needs work » Fixed

Great!

Status: Fixed » Closed (fixed)

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