php drupal-check.phar modules/contrib/rate/
 35/35 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------------------------------------- 
  Line   src/Plugin/VoteResultFunction/CountUp.php                                             
 ------ -------------------------------------------------------------------------------------- 
         Class Drupal\votingapi\VoteResultFunctionBase not found and could not be autoloaded.  
 ------ -------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/RateBotDetector.php                            
 ------ --------------------------------------------------- 
  170    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   tests/src/Functional/RateWidgetTest.php            
 ------ --------------------------------------------------- 
  51     Call to deprecated function entity_get_display().  
 ------ --------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 3 errors  
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sergiu Stici created an issue. See original summary.

Sergiu Stici’s picture

Here's the patch, please review.

Status: Needs review » Needs work

The last submitted patch, 2: deprecated-3073450-2.patch, failed testing. View results

Krzysztof Domański’s picture

Title: Deprecated Code Report » Replace deprecated drupal_set_message() with \Drupal::messenger()

I split this task into two issues.

#3074633: Replace deprecated entity_get_display()

Krzysztof Domański’s picture

Status: Needs work » Needs review
FileSize
2.7 KB
883 bytes
echo15’s picture

Status: Needs review » Reviewed & tested by the community

Patch #5 Looks good. reviewed and tested.

Krzysztof Domański’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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

Krzysztof Domański’s picture

Status: Closed (fixed) » Needs work

I realized that last changes may break BC. We can use here MessengerTrait instead of changing the constructor.

+   * @param \Drupal\Core\Messenger\MessengerInterface $messenger
+   *   The messenger.
    */
-  public function __construct(ConfigFactoryInterface $config_factory, Connection $database, Client $http_client, RequestStack $request_stack) {
+  public function __construct(ConfigFactoryInterface $config_factory, Connection $database, Client $http_client, RequestStack $request_stack, MessengerInterface $messenger) {
     $this->config = $config_factory->get('rate.settings');
Krzysztof Domański’s picture

Status: Needs work » Needs review
FileSize
983 bytes

Krzysztof Domański’s picture

Status: Needs review » Fixed

Krzysztof Domański’s picture

Status: Fixed » Closed (fixed)

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