Drupal 9 Deprecated code report for Hacked module.

Created on 3 November 2021, about 3 years ago
Updated 5 September 2023, about 1 year ago

$ drupal-check -d modules/contrib/hacked
17/17 [============================] 100%

------ ------------------------------------------------------------------------------------
Line hacked.drush.inc
------ ------------------------------------------------------------------------------------
110 Call to deprecated function drush_print().
115 Call to deprecated function drush_print().
151 Call to deprecated function drush_get_option().
200 Call to deprecated function drush_get_context().
222 Call to deprecated function drush_print().
225 Call to deprecated function drush_print().
242 Call to deprecated function drush_get_option().
243 Call to deprecated function drush_print().
245 Call to deprecated function drush_print().
302 Call to deprecated function drush_print().
303 Call to deprecated function drush_print().
308 Call to deprecated function drush_print().
310 Call to deprecated function drush_print().
318 Call to deprecated function drush_get_option().
387 Call to deprecated function drush_get_option().
388 Call to deprecated function drush_shell_exec():
See Drush::process().
390 Call to deprecated function drush_shell_exec_output():
Use Drush:process() and Drush::drush. Output is retried via $process->getOutput().
405 Call to deprecated function drush_print().
------ ------------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------------
Line src\Commands\HackedCommands.php
------ ------------------------------------------------------------------------------------
288 Call to deprecated function drush_shell_exec():
See Drush::process().
290 Call to deprecated function drush_shell_exec_output():
Use Drush:process() and Drush::drush. Output is retried via $process->getOutput().
------ ------------------------------------------------------------------------------------

[ERROR] Found 20 errors

Due to these, getting the below error in latest drush version Drush 10.6.1.

Error: Call to undefined function Drupal\hacked\Commands\drush_shell_exec() in Drupal\hacked\Commands\HackedCommands->diff() (line 288 of C:\xampp\htdocs\oscar\modules\contrib\hacked\src\Commands\HackedCommands.php).

📌 Task
Status

Fixed

Component

Code

Created by

🇮🇳India gopal6988

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India bharath-kondeti Hyderabad

    Rerolled the MR. Please review.

  • First commit to issue fork.
  • Status changed to Needs work over 1 year ago
  • 🇧🇷Brazil lucienchalom

    I removed the changes aplied with phpcbf, please keep the issue scope.
    i checked again with drupal check and there is still, or new, deprecations.
    I fixed a couple, but don't know how to fix the rest:

     ------ --------------------------------------------------------------------- 
      Line   hacked.drush.inc                                                     
     ------ --------------------------------------------------------------------- 
      :151   Function update_calculate_project_data not found.                    
             💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
      :192   Function drush_print_table not found.                                
             💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
      :206   Function update_calculate_project_data not found.                    
             💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
      :280   Result of method Psr\Log\LoggerInterface::error() (void) is used.    
      :286   Result of method Psr\Log\LoggerInterface::error() (void) is used.    
      :351   Function drush_print_table not found.                                
             💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
     ------ --------------------------------------------------------------------- 
    
     ------ --------------------------------------------------------------------- 
      Line   src/Commands/HackedCommands.php                                      
     ------ --------------------------------------------------------------------- 
      :99    Function update_calculate_project_data not found.                    
             💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
     ------ --------------------------------------------------------------------- 
    
     ------ --------------------------------------------------------------------- 
      Line   src/Controller/HackedController.php                                  
     ------ --------------------------------------------------------------------- 
      :40    Function update_calculate_project_data not found.                    
             💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
      :56    Function update_calculate_project_data not found.                    
             💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
     ------ --------------------------------------------------------------------- 
    
     ------ ------------------------------------------------------------------ 
      Line   src/Controller/HackedDiffController.php                           
     ------ ------------------------------------------------------------------ 
      :32    Parameter $entity_comparison of method                            
             Drupal\hacked\Controller\HackedDiffController::__construct() has  
             invalid type Drupal\diff\DiffEntityComparison.                    
      :32    Parameter $entity_comparison of method                            
             Drupal\hacked\Controller\HackedDiffController::__construct() has  
             invalid type Drupal\diff\DiffEntityComparison.                    
     ------ ------------------------------------------------------------------ 
    
     ------ --------------------------------------------------------------------- 
      Line   src/hackedProject.php                                                
     ------ --------------------------------------------------------------------- 
      :84    Function update_calculate_project_data not found.                    
             💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
     ------ --------------------------------------------------------------------- 
    
     ------ -------------------------------------------------------------------------- 
      Line   src/hackedProjectWebFilesDownloader.php                                   
     ------ -------------------------------------------------------------------------- 
      :15    Access to an undefined property object::$existing_version.                
             💡 Learn more:                                                            
                https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
      :109   Method                                                                    
             Drupal\hacked\hackedProjectWebFilesDownloader::archive_extract() has      
             invalid return type Drupal\hacked\Archiver.                               
     ------ -------------------------------------------------------------------------- 
    
     [ERROR] Found 14 errors                                                        
    
  • Status changed to Fixed about 1 year ago
  • ivnish Kazakhstan

    Thanks everyone! Already fixed.

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

Production build 0.71.5 2024