php drupal-check.phar modules/contrib/brightcove/
 90/90 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------------------------------------------------------------- 
  Line   brightcove.install                                                                                            
 ------ -------------------------------------------------------------------------------------------------------------- 
  226    Call to deprecated method applyUpdates() of class Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface.  
 ------ -------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------- 
  Line   brightcove.module                                                                    
 ------ ------------------------------------------------------------------------------------- 
  325    Call to deprecated method getVocabularyId() of class Drupal\taxonomy\TermInterface.  
 ------ ------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------- 
  Line   modules/media_entity_brightcove/src/Plugin/MediaEntity/Type/BrightcoveVideo.php  
 ------ --------------------------------------------------------------------------------- 
         Class Drupal\media_entity\MediaTypeBase not found and could not be autoloaded.   
 ------ --------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------------------------------------- 
  Line   src/BrightcovePlaylistListBuilder.php                                                                                       
 ------ ---------------------------------------------------------------------------------------------------------------------------- 
  21     Usage of deprecated trait Drupal\Core\Routing\LinkGeneratorTrait in class Drupal\brightcove\BrightcovePlaylistListBuilder.  
  106    Call to deprecated method l() of class Drupal\brightcove\BrightcovePlaylistListBuilder.                                     
 ------ ---------------------------------------------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/BrightcoveUtil.php                             
 ------ --------------------------------------------------- 
  198    Call to deprecated function drupal_set_message().  
  208    Call to deprecated function drupal_set_message().  
  214    Call to deprecated function drupal_set_message().  
  219    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------------- 
  Line   src/BrightcoveVideoListBuilder.php                                                                                       
 ------ ------------------------------------------------------------------------------------------------------------------------- 
  23     Usage of deprecated trait Drupal\Core\Routing\LinkGeneratorTrait in class Drupal\brightcove\BrightcoveVideoListBuilder.  
  111    Call to deprecated method l() of class Drupal\brightcove\BrightcoveVideoListBuilder.                                     
 ------ ------------------------------------------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------- 
  Line   src/Commands/BrightcoveCommands.php                                        
 ------ --------------------------------------------------------------------------- 
         Class Drush\Commands\DrushCommands not found and could not be autoloaded.  
 ------ --------------------------------------------------------------------------- 

 ------ ----------------------------------------------------- 
  Line   src/Controller/BrightcoveSubscriptionController.php  
 ------ ----------------------------------------------------- 
  192    Call to deprecated function drupal_set_message().    
  235    Call to deprecated function drupal_set_message().    
  267    Call to deprecated function drupal_set_message().    
  287    Call to deprecated function drupal_set_message().    
  290    Call to deprecated function drupal_set_message().    
  309    Call to deprecated function drupal_set_message().    
  312    Call to deprecated function drupal_set_message().    
  379    Call to deprecated function drupal_set_message().    
  382    Call to deprecated function drupal_set_message().    
 ------ ----------------------------------------------------- 

 ------ ------------------------------------------------------- 
  Line   src/Entity/BrightcoveVideo.php                         
 ------ ------------------------------------------------------- 
  172    Call to deprecated function file_prepare_directory().  
  924    Call to deprecated function drupal_set_message().      
  928    Call to deprecated function drupal_set_message().      
 ------ ------------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/BrightcoveAPIClientDeleteForm.php         
 ------ --------------------------------------------------- 
  253    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   src/Form/BrightcoveAPIClientForm.php                                              
 ------ ---------------------------------------------------------------------------------- 
  320    Call to deprecated function drupal_set_message().                                 
  344    Call to deprecated function drupal_set_message().                                 
  353    Call to deprecated method urlInfo() of class Drupal\Core\Entity\EntityInterface.  
 ------ ---------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------- 
  Line   src/Form/BrightcoveInlineForm.php                                                             
 ------ ---------------------------------------------------------------------------------------------- 
         Class Drupal\inline_entity_form\Form\EntityInlineForm not found and could not be autoloaded.  
 ------ ---------------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/BrightcovePlaylistForm.php                
 ------ --------------------------------------------------- 
  108    Call to deprecated function drupal_set_message().  
  114    Call to deprecated function drupal_set_message().  
  121    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/BrightcoveSubscriptionDeleteForm.php      
 ------ --------------------------------------------------- 
  64     Call to deprecated function drupal_set_message().  
  79     Call to deprecated function drupal_set_message().  
  82     Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/BrightcoveSubscriptionForm.php            
 ------ --------------------------------------------------- 
  98     Call to deprecated function drupal_set_message().  
  105    Call to deprecated function drupal_set_message().  
  108    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/BrightcoveTextTrackForm.php               
 ------ --------------------------------------------------- 
  33     Call to deprecated function drupal_set_message().  
  39     Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/BrightcoveVideoForm.php                   
 ------ --------------------------------------------------- 
  265    Call to deprecated function drupal_set_message().  
  271    Call to deprecated function drupal_set_message().  
  278    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   src/Playlist.php                                                       
 ------ ----------------------------------------------------------------------- 
         Class Brightcove\Item\Playlist not found and could not be autoloaded.  
 ------ ----------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/Field/FieldWidget/BrightcoveInlineEntityFormComplex.php                                                       
 ------ ------------------------------------------------------------------------------------------------------------------------- 
         Class Drupal\inline_entity_form\Plugin\Field\FieldWidget\InlineEntityFormComplex not found and could not be autoloaded.  
 ------ ------------------------------------------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------- 
  Line   src/Video.php                                                             
 ------ -------------------------------------------------------------------------- 
         Class Brightcove\Item\Video\Video not found and could not be autoloaded.  
 ------ -------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 46 errors

Comments

Sergiu Stici created an issue. See original summary.

sergiu stici’s picture

Status: Active » Needs review
StatusFileSize
new20.92 KB

Here is the patch, please review.

sahana _n’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. And patch applied successfully.

yce’s picture

Status: Reviewed & tested by the community » Needs work

Hi, I've reviewed your changes, it still needs some work. Please also make sure that in a method you call a specific method only once, for example $this->messenger() should be stored in a variable in some places to avoid multiple method call for the same thing within the same scope.

  1. +++ b/brightcove.install
    @@ -221,9 +221,6 @@ function brightcove_update_8105() {
    -  \Drupal::entityDefinitionUpdateManager()->applyUpdates();
    

    Please provide the alternative solution suggested by core.

  2. +++ b/src/BrightcovePlaylistListBuilder.php
    @@ -103,7 +102,7 @@ class BrightcovePlaylistListBuilder extends EntityListBuilder {
    +      $name = Link::fromTextAndUrl(
    

    Please use the link_generator service instead of calling the link generator in a procedural way.

  3. +++ b/src/BrightcoveUtil.php
    @@ -195,30 +195,30 @@ class BrightcoveUtil {
    +            \Drupal::messenger()->addWarning(t("There is a newer version of this :type on Brightcove, you may want to <a href=':url'>update the local version</a> before editing it.", [
    

    The messenger is used here in multiple places, please get the messenger once and put it into a variable then used that.

    The best would be to use DI, not sure if it would be ok to pass the messenger as the method's argument.

  4. +++ b/src/BrightcoveVideoListBuilder.php
    @@ -108,7 +107,7 @@ class BrightcoveVideoListBuilder extends EntityListBuilder {
    +      $name = Link::fromTextAndUrl(
    

    Please use the link_generator service instead of calling the link generator in a procedural way.

sahana _n’s picture

Status: Needs work » Needs review
StatusFileSize
new23.2 KB

Updated the patch please review.

gobinathm’s picture

Issue #3146320 pretty much fixes everything. Maybe we close this in favor of that?

yce’s picture

Status: Needs review » Fixed

Yes, thanks! Closing the ticket now.

Status: Fixed » Closed (fixed)

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