../vendor/bin/drupal-check content_sync/
 53/53 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------- 
  Line   content_sync.module                                                    
 ------ ----------------------------------------------------------------------- 
  132    Call to deprecated function file_uri_scheme():                         
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                  
         Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme()   
         instead.                                                               
  133    Call to deprecated function file_uri_target():                         
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                  
         \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getTarget()  
         instead.                                                               
  196    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.   
 ------ ----------------------------------------------------------------------- 

 ------ --------------------------------------------------------------- 
  Line   src/Commands/ContentSyncCommands.php                           
 ------ --------------------------------------------------------------- 
         Class Drush\Commands\DrushCommands not found and could not be  
         autoloaded.                                                    
         💡 Learn more at https://phpstan.org/user-guide/autoloading     
  44     Class Drush\Commands\DrushCommands not found and could not be  
         autoloaded.                                                    
         💡 Learn more at https://phpstan.org/user-guide/autoloading     
 ------ --------------------------------------------------------------- 

 ------ ------------------------------------------------------------------- 
  Line   src/Content/ContentFileStorageFactory.php                          
 ------ ------------------------------------------------------------------- 
  32     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in   
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                 
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.  
 ------ ------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Controller/ContentController.php                                
 ------ -------------------------------------------------------------------- 
  97     Call to deprecated function file_directory_temp():                  
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use               
         \Drupal\Core\File\FileSystemInterface::getTempDirectory() instead.  
 ------ -------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   src/Controller/ContentLogController.php                              
 ------ --------------------------------------------------------------------- 
  87     Call to deprecated method entityManager() of class                   
         Drupal\Core\Controller\ControllerBase:                               
         in drupal:8.0.0 and is removed from drupal:9.0.0.                    
         Most of the time static::entityTypeManager() is supposed to be used  
         instead.                                                             
  262    Call to deprecated method l() of class                               
         Drupal\Core\Controller\ControllerBase:                               
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use                
         \Drupal\Core\Link::fromTextAndUrl() instead.                         
  266    Call to deprecated method l() of class                               
         Drupal\Core\Controller\ControllerBase:                               
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use                
         \Drupal\Core\Link::fromTextAndUrl() instead.                         
 ------ --------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------- 
  Line   src/DependencyResolver/ImportQueueResolver.php                     
 ------ ------------------------------------------------------------------- 
  83     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in   
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                 
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.  
 ------ ------------------------------------------------------------------- 

 ------ ------------------------------------------------------ 
  Line   src/Form/ContentExportForm.php                        
 ------ ------------------------------------------------------ 
  76     Call to deprecated function file_unmanaged_delete():  
         in drupal:8.7.0 and is removed from drupal:9.0.0.     
         Use \Drupal\Core\File\FileSystemInterface::delete().  
 ------ ------------------------------------------------------ 

 ------ --------------------------------------------------------------------- 
  Line   src/Form/ContentExportMultiple.php                                   
 ------ --------------------------------------------------------------------- 
  62     Parameter $temp_store_factory of method                              
         Drupal\content_sync\Form\ContentExportMultiple::__construct() has    
         typehint with deprecated class Drupal\user\PrivateTempStoreFactory:  
         in drupal:8.5.0 and is removed from drupal:9.0.0.                    
         Use \Drupal\Core\TempStore\PrivateTempStoreFactory instead.          
  150    Call to deprecated function file_unmanaged_delete():                 
         in drupal:8.7.0 and is removed from drupal:9.0.0.                    
         Use \Drupal\Core\File\FileSystemInterface::delete().                 
 ------ --------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------------- 
  Line   src/Form/ContentExportTrait.php (in context of class Drupal\content_sync\Form\ContentExportForm)  
 ------ -------------------------------------------------------------------------------------------------- 
  43     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                                  
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                                 
  46     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                                  
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                                 
  166    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in                                  
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.                                          
  166    Call to deprecated function file_prepare_directory():                                             
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                 
         Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().                                    
  167    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in                                    
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                                            
  167    Call to deprecated function file_unmanaged_save_data():                                           
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                 
         Use \Drupal\Core\File\FileSystemInterface::saveData().                                            
  230    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in                                  
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.                                          
  230    Call to deprecated function file_prepare_directory():                                             
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                 
         Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().                                    
  231    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in                                    
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                                            
  231    Call to deprecated function file_unmanaged_save_data():                                           
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                 
         Use \Drupal\Core\File\FileSystemInterface::saveData().                                            
  270    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.                              
  270    Call to deprecated method url() of class Drupal:                                                  
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                                 
         Instead create a \Drupal\Core\Url object directly, for example using                              
         Url::fromRoute().                                                                                 
  276    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.                              
  276    Call to deprecated method url() of class Drupal:                                                  
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                                 
         Instead create a \Drupal\Core\Url object directly, for example using                              
         Url::fromRoute().                                                                                 
  279    Call to deprecated method url() of class Drupal:                                                  
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                                 
         Instead create a \Drupal\Core\Url object directly, for example using                              
         Url::fromRoute().                                                                                 
  286    Call to deprecated method url() of class Drupal:                                                  
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                                 
         Instead create a \Drupal\Core\Url object directly, for example using                              
         Url::fromRoute().                                                                                 
  287    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.                              
  301    Call to deprecated function file_directory_temp():                                                
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                                             
         \Drupal\Core\File\FileSystemInterface::getTempDirectory() instead.                                
 ------ -------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------ 
  Line   src/Form/ContentExportTrait.php (in context of class Drupal\content_sync\Form\ContentExportMultiple)  
 ------ ------------------------------------------------------------------------------------------------------ 
  43     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                                      
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                                     
  46     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                                      
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                                     
  166    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in                                      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.                                              
  166    Call to deprecated function file_prepare_directory():                                                 
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                     
         Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().                                        
  167    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in                                        
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                                                
  167    Call to deprecated function file_unmanaged_save_data():                                               
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                     
         Use \Drupal\Core\File\FileSystemInterface::saveData().                                                
  230    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in                                      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.                                              
  230    Call to deprecated function file_prepare_directory():                                                 
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                     
         Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().                                        
  231    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in                                        
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                                                
  231    Call to deprecated function file_unmanaged_save_data():                                               
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                     
         Use \Drupal\Core\File\FileSystemInterface::saveData().                                                
  270    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.                                  
  270    Call to deprecated method url() of class Drupal:                                                      
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                                     
         Instead create a \Drupal\Core\Url object directly, for example using                                  
         Url::fromRoute().                                                                                     
  276    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.                                  
  276    Call to deprecated method url() of class Drupal:                                                      
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                                     
         Instead create a \Drupal\Core\Url object directly, for example using                                  
         Url::fromRoute().                                                                                     
  279    Call to deprecated method url() of class Drupal:                                                      
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                                     
         Instead create a \Drupal\Core\Url object directly, for example using                                  
         Url::fromRoute().                                                                                     
  286    Call to deprecated method url() of class Drupal:                                                      
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                                     
         Instead create a \Drupal\Core\Url object directly, for example using                                  
         Url::fromRoute().                                                                                     
  287    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.                                  
  301    Call to deprecated function file_directory_temp():                                                    
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                 
         \Drupal\Core\File\FileSystemInterface::getTempDirectory() instead.                                    
 ------ ------------------------------------------------------------------------------------------------------ 

 ------ ---------------------------------------------------------------------- 
  Line   src/Form/ContentImportForm.php                                        
 ------ ---------------------------------------------------------------------- 
  28     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.  
  74     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.  
  79     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.  
 ------ ---------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------- 
  Line   src/Form/ContentImportTrait.php (in context of class Drupal\content_sync\Form\ContentSync)  
 ------ -------------------------------------------------------------------------------------------- 
  33     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                            
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                          
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                           
  34     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                            
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                          
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                           
  98     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.                        
  161    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.                        
  198    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.                        
  201    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.                        
  205    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.                        
  218    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.                        
 ------ -------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   src/Form/ContentSingleExportForm.php                                   
 ------ ----------------------------------------------------------------------- 
  122    Call to deprecated method entityManager() of class Drupal:             
         in drupal:8.0.0 and is removed from 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.                                          
 ------ ----------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   src/Form/ContentSingleImportForm.php                                  
 ------ ---------------------------------------------------------------------- 
  98     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.  
  105    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.  
 ------ ---------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   src/Form/ContentSync.php                                              
 ------ ---------------------------------------------------------------------- 
  100    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.  
 ------ ---------------------------------------------------------------------- 

 ------ ------------------------------------------------------- 
  Line   src/Logger/ContentSyncLog.php                          
 ------ ------------------------------------------------------- 
  64     Call to deprecated method substr() of class            
         Drupal\Component\Utility\Unicode:                      
         in drupal:8.6.0 and is removed from drupal:9.0.0. Use  
         mb_substr() instead.                                   
  70     Call to deprecated method substr() of class            
         Drupal\Component\Utility\Unicode:                      
         in drupal:8.6.0 and is removed from drupal:9.0.0. Use  
         mb_substr() instead.                                   
  77     Call to deprecated method substr() of class            
         Drupal\Component\Utility\Unicode:                      
         in drupal:8.6.0 and is removed from drupal:9.0.0. Use  
         mb_substr() instead.                                   
 ------ ------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   src/Normalizer/FileEntityNormalizer.php                               
 ------ ---------------------------------------------------------------------- 
  37     Parameter $entity_manager of method                                   
         Drupal\content_sync\Normalizer\FileEntityNormalizer::__construct()    
         has typehint with deprecated interface                                
         Drupal\Core\Entity\EntityManagerInterface:                            
         in drupal:8.0.0 and is removed from drupal:9.0.0.                     
  58     Call to deprecated method uriScheme() of class                        
         Drupal\Core\File\FileSystemInterface:                                 
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                 
         Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme()  
         instead.                                                              
  66     Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.              
  66     Call to deprecated function file_prepare_directory():                 
         in drupal:8.7.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().        
  67     Call to deprecated function file_unmanaged_copy():                    
         in drupal:8.7.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\File\FileSystemInterface::copy().                    
  89     Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.              
  89     Call to deprecated function file_prepare_directory():                 
         in drupal:8.7.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().        
  90     Call to deprecated function file_unmanaged_save_data():               
         in drupal:8.7.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\File\FileSystemInterface::saveData().                
  124    Call to deprecated method uriScheme() of class                        
         Drupal\Core\File\FileSystemInterface:                                 
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                 
         Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme()  
         instead.                                                              
  127    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.              
  127    Call to deprecated function file_prepare_directory():                 
         in drupal:8.7.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().        
  128    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in        
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                    
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                
  128    Call to deprecated function file_unmanaged_copy():                    
         in drupal:8.7.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\File\FileSystemInterface::copy().                    
 ------ ---------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   src/Plugin/Action/ExportNodes.php                                    
 ------ --------------------------------------------------------------------- 
  51     Parameter $temp_store_factory of method                              
         Drupal\content_sync\Plugin\Action\ExportNodes::__construct() has     
         typehint with deprecated class Drupal\user\PrivateTempStoreFactory:  
         in drupal:8.5.0 and is removed from drupal:9.0.0.                    
         Use \Drupal\Core\TempStore\PrivateTempStoreFactory instead.          
 ------ --------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   src/Plugin/SyncNormalizerDecorator/Alias.php                           
 ------ ----------------------------------------------------------------------- 
  27     Parameter $alias_manager of method                                     
         Drupal\content_sync\Plugin\SyncNormalizerDecorator\Alias::__construct  
         () has typehint with deprecated class Drupal\Core\Path\AliasManager:   
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                  
         \Drupal\path_alias\AliasManager instead.                               
 ------ ----------------------------------------------------------------------- 

 [ERROR] Found 83 errors
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

pavnish created an issue. See original summary.

neelam_wadhwani’s picture

Assigned: pavnish » Unassigned
Status: Active » Needs review
FileSize
29.58 KB

Kindly review patch

ashishdalvi’s picture

Issue tags: +Drupal 9 compatibility
Blanca.Esqueda’s picture

Thank you @neelam_wadhwani,
The patch is not fully applying to the latest dev version, but it is a great start for updating deprecated code.

Kristen Pol’s picture

Issue tags: -Drupal 9 readiness
saidatom’s picture

Review patch

nitesh624’s picture

Assigned: Unassigned » nitesh624
nitesh624’s picture

patch #6 applied successfull and resolves most of deprication but still there are many deprication warning coming when running "drupal-check" please refer below

../vendor/bin/drupal-check content_sync/
 53/53 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------- 
  Line   content_sync.module                                                    
 ------ ----------------------------------------------------------------------- 
  131    Call to deprecated function file_uri_scheme():                         
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                  
         Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme()   
         instead.                                                               
  132    Call to deprecated function file_uri_target():                         
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                  
         \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getTarget()  
         instead.                                                               
 ------ ----------------------------------------------------------------------- 

 ------ --------------------------------------------------------------- 
  Line   src/Commands/ContentSyncCommands.php                           
 ------ --------------------------------------------------------------- 
         Class Drush\Commands\DrushCommands not found and could not be  
         autoloaded.                                                    
         💡 Learn more at https://phpstan.org/user-guide/autoloading     
  39     Class Drush\Commands\DrushCommands not found and could not be  
         autoloaded.                                                    
         💡 Learn more at https://phpstan.org/user-guide/autoloading     
 ------ --------------------------------------------------------------- 

 ------ ------------------------------------------------------------------- 
  Line   src/Content/ContentFileStorageFactory.php                          
 ------ ------------------------------------------------------------------- 
  32     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in   
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                 
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.  
 ------ ------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Controller/ContentController.php                                
 ------ -------------------------------------------------------------------- 
  102    Call to deprecated function file_directory_temp():                  
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use               
         \Drupal\Core\File\FileSystemInterface::getTempDirectory() instead.  
 ------ -------------------------------------------------------------------- 

 ------ ------------------------------------------------------- 
  Line   src/Controller/ContentLogController.php                
 ------ ------------------------------------------------------- 
  264    Call to deprecated method l() of class                 
         Drupal\Core\Controller\ControllerBase:                 
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use  
         \Drupal\Core\Link::fromTextAndUrl() instead.           
  268    Call to deprecated method l() of class                 
         Drupal\Core\Controller\ControllerBase:                 
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use  
         \Drupal\Core\Link::fromTextAndUrl() instead.           
 ------ ------------------------------------------------------- 

 ------ ------------------------------------------------------------------- 
  Line   src/DependencyResolver/ImportQueueResolver.php                     
 ------ ------------------------------------------------------------------- 
  84     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in   
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                 
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.  
 ------ ------------------------------------------------------------------- 

 ------ ------------------------------------------------------ 
  Line   src/Form/ContentExportForm.php                        
 ------ ------------------------------------------------------ 
  78     Call to deprecated function file_unmanaged_delete():  
         in drupal:8.7.0 and is removed from drupal:9.0.0.     
         Use \Drupal\Core\File\FileSystemInterface::delete().  
 ------ ------------------------------------------------------ 

 ------ --------------------------------------------------------------------- 
  Line   src/Form/ContentExportMultiple.php                                   
 ------ --------------------------------------------------------------------- 
  62     Parameter $temp_store_factory of method                              
         Drupal\content_sync\Form\ContentExportMultiple::__construct() has    
         typehint with deprecated class Drupal\user\PrivateTempStoreFactory:  
         in drupal:8.5.0 and is removed from drupal:9.0.0.                    
         Use \Drupal\Core\TempStore\PrivateTempStoreFactory instead.          
  149    Call to deprecated function file_unmanaged_delete():                 
         in drupal:8.7.0 and is removed from drupal:9.0.0.                    
         Use \Drupal\Core\File\FileSystemInterface::delete().                 
 ------ --------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------------- 
  Line   src/Form/ContentExportTrait.php (in context of class Drupal\content_sync\Form\ContentExportForm)  
 ------ -------------------------------------------------------------------------------------------------- 
  41     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                                  
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                                 
  44     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                                  
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                                 
  167    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in                                  
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.                                          
  168    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in                                    
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                                            
  168    Call to deprecated function file_unmanaged_save_data():                                           
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                 
         Use \Drupal\Core\File\FileSystemInterface::saveData().                                            
  233    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in                                  
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.                                          
  234    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in                                    
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                                            
  234    Call to deprecated function file_unmanaged_save_data():                                           
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                 
         Use \Drupal\Core\File\FileSystemInterface::saveData().                                            
  310    Call to deprecated function file_directory_temp():                                                
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                                             
         \Drupal\Core\File\FileSystemInterface::getTempDirectory() instead.                                
 ------ -------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------ 
  Line   src/Form/ContentExportTrait.php (in context of class Drupal\content_sync\Form\ContentExportMultiple)  
 ------ ------------------------------------------------------------------------------------------------------ 
  41     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                                      
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                                     
  44     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                                      
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                                     
  167    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in                                      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.                                              
  168    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in                                        
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                                                
  168    Call to deprecated function file_unmanaged_save_data():                                               
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                     
         Use \Drupal\Core\File\FileSystemInterface::saveData().                                                
  233    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in                                      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.                                              
  234    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in                                        
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                                                    
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                                                
  234    Call to deprecated function file_unmanaged_save_data():                                               
         in drupal:8.7.0 and is removed from drupal:9.0.0.                                                     
         Use \Drupal\Core\File\FileSystemInterface::saveData().                                                
  310    Call to deprecated function file_directory_temp():                                                    
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                 
         \Drupal\Core\File\FileSystemInterface::getTempDirectory() instead.                                    
 ------ ------------------------------------------------------------------------------------------------------ 

 ------ -------------------------------------------------------------------------------------------- 
  Line   src/Form/ContentImportTrait.php (in context of class Drupal\content_sync\Form\ContentSync)  
 ------ -------------------------------------------------------------------------------------------- 
  25     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                            
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                          
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                           
  26     Call to deprecated constant CONFIG_SYNC_DIRECTORY: Deprecated in                            
         drupal:8.8.0 and is removed from drupal:9.0.0. Use                                          
         \Drupal\Core\Site\Settings::get('config_sync_directory') instead.                           
 ------ -------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------- 
  Line   src/Logger/ContentSyncLog.php                          
 ------ ------------------------------------------------------- 
  65     Call to deprecated method substr() of class            
         Drupal\Component\Utility\Unicode:                      
         in drupal:8.6.0 and is removed from drupal:9.0.0. Use  
         mb_substr() instead.                                   
  71     Call to deprecated method substr() of class            
         Drupal\Component\Utility\Unicode:                      
         in drupal:8.6.0 and is removed from drupal:9.0.0. Use  
         mb_substr() instead.                                   
  78     Call to deprecated method substr() of class            
         Drupal\Component\Utility\Unicode:                      
         in drupal:8.6.0 and is removed from drupal:9.0.0. Use  
         mb_substr() instead.                                   
 ------ ------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   src/Normalizer/FileEntityNormalizer.php                               
 ------ ---------------------------------------------------------------------- 
  37     Parameter $entity_manager of method                                   
         Drupal\content_sync\Normalizer\FileEntityNormalizer::__construct()    
         has typehint with deprecated interface                                
         Drupal\Core\Entity\EntityManagerInterface:                            
         in drupal:8.0.0 and is removed from drupal:9.0.0.                     
  58     Call to deprecated method uriScheme() of class                        
         Drupal\Core\File\FileSystemInterface:                                 
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                 
         Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme()  
         instead.                                                              
  66     Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.              
  67     Call to deprecated function file_unmanaged_copy():                    
         in drupal:8.7.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\File\FileSystemInterface::copy().                    
  89     Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.              
  90     Call to deprecated function file_unmanaged_save_data():               
         in drupal:8.7.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\File\FileSystemInterface::saveData().                
  124    Call to deprecated method uriScheme() of class                        
         Drupal\Core\File\FileSystemInterface:                                 
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                 
         Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme()  
         instead.                                                              
  127    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in      
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                    
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.              
  128    Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in        
         drupal:8.7.0 and is removed from drupal:9.0.0. Use                    
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.                
  128    Call to deprecated function file_unmanaged_copy():                    
         in drupal:8.7.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\File\FileSystemInterface::copy().                    
 ------ ---------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   src/Plugin/Action/ExportNodes.php                                    
 ------ --------------------------------------------------------------------- 
  51     Parameter $temp_store_factory of method                              
         Drupal\content_sync\Plugin\Action\ExportNodes::__construct() has     
         typehint with deprecated class Drupal\user\PrivateTempStoreFactory:  
         in drupal:8.5.0 and is removed from drupal:9.0.0.                    
         Use \Drupal\Core\TempStore\PrivateTempStoreFactory instead.          
 ------ --------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   src/Plugin/SyncNormalizerDecorator/Alias.php                           
 ------ ----------------------------------------------------------------------- 
  29     Parameter $alias_manager of method                                     
         Drupal\content_sync\Plugin\SyncNormalizerDecorator\Alias::__construct  
         () has typehint with deprecated class Drupal\Core\Path\AliasManager:   
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                  
         \Drupal\path_alias\AliasManager instead.                               
 ------ ----------------------------------------------------------------------- 

 [ERROR] Found 47 errors 
nitesh624’s picture

Issue summary: View changes

Updating the description of issue to target latest result by "drupal-check"

nitesh624’s picture

Status: Needs review » Needs work
nitesh624’s picture

FileSize
46.79 KB
nitesh624’s picture

Assigned: nitesh624 » Unassigned
Status: Needs work » Needs review
pavnish’s picture

Assigned: Unassigned » pavnish
nitesh624’s picture

FileSize
110.3 KB

Interdiff of #6 and #11

pavnish’s picture

FileSize
2.95 KB
49.83 KB

@nitesh624 Thanks for the patch #11 your patch looks good .
found one deprecation after the applied the patch .

------ ---------------------------------------------------------------------------------------------------------------------------------
Line src/Commands/ContentSyncCommands.php
------ ---------------------------------------------------------------------------------------------------------------------------------
161 Parameter $entityManager of method Drupal\content_sync\Commands\ContentSyncCommands::__construct() has typehint with deprecated
interface Drupal\Core\Entity\EntityManagerInterface:
in drupal:8.0.0 and is removed from drupal:9.0.0.
------ ---------------------------------------------------------------------------------------------------------------------------------

The deprecation has been fixed in #15 patch

Please review this patch.

Deepak Goyal’s picture

Status: Needs review » Reviewed & tested by the community

LGTM.

pavnish’s picture

Assigned: pavnish » Unassigned

forgot to un-assign

saidatom’s picture

Status: Reviewed & tested by the community » Needs review

Please update composer.json

- drupal/content_sync 2.x-dev requires drupal/core ^8.6.10 -> satisfiable by drupal/core[8.6.10, 8.6.11, 8.6.12, 8.6.13, 8.6.14, 8.6.15, 8.6.16, 8.6.17, 8.6.18, 8.7.0, 8.7.0-alpha1, 8.7.0-alpha2, 8.7.0-beta1, 8.7.0-beta2, 8.7.0-rc1, 8.7.1, 8.7.10, 8.7.11, 8.7.12, 8.7.13, 8.7.14, 8.7.2, 8.7.3, 8.7.4, 8.7.5, 8.7.6, 8.7.7, 8.7.8, 8.7.9, 8.7.x-dev, 8.8.0, 8.8.0-alpha1, 8.8.0-beta1, 8.8.0-rc1, 8.8.1, 8.8.2, 8.8.3, 8.8.4, 8.8.5, 8.8.6, 8.8.7, 8.8.8, 8.8.x-dev, 8.9.0, 8.9.0-beta1, 8.9.0-beta2, 8.9.0-beta3, 8.9.0-rc1, 8.9.1, 8.9.2, 8.9.x-dev].

Deepak Goyal’s picture

Assigned: Unassigned » Deepak Goyal
Deepak Goyal’s picture

Assigned: Deepak Goyal » Unassigned
FileSize
50.19 KB
325 bytes

Hi @saidatom
Updated composer.json file please review.

saidatom’s picture

Hi @Deepak,

Work thanks

saidatom’s picture

Status: Needs review » Reviewed & tested by the community
smustgrave’s picture

Question when will this patch be incorporated into the module?

ThirstySix’s picture

FileSize
91.86 KB

Thanks @Deepak,

After patch, it shows a Missing "entity.manager" error
drush en content_sync: The service "serializer" has a dependency on a non-existent service "entity.manager".
drush pmu content_sync: You have requested a non-existent service "cache.content". Did you mean this: "cache.config"?

beerendlauwers’s picture

#20 works if you also update the drush.services.yml, @entity.manager was accidentally left in instead of being replaced by @entity_type.manager.

Correct code:

services:
  content_sync.commands:
    class: \Drupal\content_sync\Commands\ContentSyncCommands
    arguments: ['@config.manager', '@content.storage', '@content.storage.sync', '@content_sync.manager', '@entity_type.manager', '@content_sync.exporter', '@module_handler', '@event_dispatcher', '@lock', '@config.typed', '@module_installer', '@theme_handler', '@string_translation']
    tags:
      - { name: drush.command }

EDIT: Another overlooked issue in Drupal\content_sync\Plugin\SyncNormalizerDecorator\Alias:

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static(
      $configuration,
      $plugin_id,
      $plugin_definition,
      $container->get('path.alias_manager')
    );
  }

path.alias_manager is deprecated (and another class!) and should be path_alias.manager.

Jaber ME’s picture

/**
   * Finish batch.
   *
   * This function is a static function to avoid serializing the ContentSync
   * object unnecessarily.
   */
  public static function finishImportBatch($success, $results, $operations) {
    if ($success) {
      if (!empty($results['errors'])) {
        foreach ($results['errors'] as $error) {
          \Drupal::messenger()->addError($error);
          \Drupal::logger('config_sync')->error($error);
        }
        \Drupal::messenger()->addWarning(\Drupal::translation()
          ->translate('The content was imported with errors.'));
      }
      else {
        \Drupal::messenger()->addStatus(\Drupal::translation()
          ->translate('The content was imported successfully.'));
      }
    }
    else {
      // An error occurred.
      // $operations contains the operations that remained unprocessed.
      $error_operation = reset($operations);
        ->translate('An error occurred while processing %error_operation with arguments: @arguments', [
          '%error_operation' => $error_operation[0],
          '@arguments' => print_r($error_operation[1], TRUE),
        ]);
      \Drupal::messenger()->addError($message, 'error');
    }
}

Correction Line Number 212 ::

\Drupal::messenger()->addError(\Drupal::translation()->translate(
    'An error occurred while processing %error_operation with arguments: @arguments',
      [
      '%error_operation' => $error_operation[0],
       '@arguments' => print_r($error_operation[1], true),
       ]
     ), 'error'
);
Jaber ME’s picture

#25 Other update :

drush cr :: In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:

The service "serializer" has a dependency on a non-existent service "entity.manager".

==> entity.manager is deprecated should be entity_type.manager.

Correct code : content_sync/content_sync.services.yml :

   content_sync.importer:
      class: Drupal\content_sync\Importer\ContentImporter
      arguments: ['@serializer', '@entity_type.manager']
  content_sync.manager:
      class: Drupal\content_sync\ContentSyncManager
      arguments: ['@serializer', '@entity_type.manager','@content_sync.exporter', '@content_sync.importer']
  content_sync.normalizer.content_entity:
    class: Drupal\content_sync\Normalizer\ContentEntityNormalizer
    arguments: ['@entity_type.manager', '@plugin.manager.sync_normalizer_decorator']
    tags:
      - { name: normalizer, priority: 6 }
  content_sync.normalizer.file_entity:
    class: Drupal\content_sync\Normalizer\FileEntityNormalizer
    arguments: ['@entity_type.manager', '@plugin.manager.sync_normalizer_decorator', '@file_system']
    tags:
      - { name: normalizer, priority: 7 }
florin_yonescat’s picture

After applying the patch and changing the files according to #25, #26 and #27 I get this error:

ArgumentCountError: Too few arguments to function Drupal\serialization\Normalizer\EntityNormalizer::__construct(), 1 passed in /path/web/modules/content_sync/src/Normalizer/ContentEntityNormalizer.php on line 35 and exactly 3 expected in Drupal\serialization\Normalizer\EntityNormalizer->__construct() (line 34 of core/modules/serialization/src/Normalizer/EntityNormalizer.php).

Seonic’s picture

FileSize
52.23 KB

Drupal 9 support for the last 2.x dev build
Tested on Drupal 8.8 (Drush 9) and Drupal 9.1 (Drush 10)

Increased minimal drupal version to 8.8
CONFIG_SYNC_DIRECTORY was changed to 'sync' string, because it was removed in d9, but maybe better to add module constant.

Seonic’s picture

Status: Reviewed & tested by the community » Needs review

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

mkalkbrenner’s picture

Status: Needs review » Reviewed & tested by the community

I tested the basic module functionalities using Drupal 9.1.0 and the patch in #29. It works like I know it from Drupal. Therefore I suggest to commit the patch ASAP to have (experimental) Drupal 9 support in 8.x-2.x-dev.

For those who need it until the patch gets committed:
I created an issue fork having the patch in #29 applied. This fork could be used as repository for composer. To do so you need to set the minimum stability to dev in your composer and add the repository:

composer config minimum-stability dev
composer config repositories.config_sync vcs https://git.drupalcode.org/issue/content_sync-3114499.git
composer require drupal/content_sync
geoffreyr’s picture

I've just done a scan of the patched version of 2.x-dev in Upgrade Status, and the only thing left is a dependency on jQuery UI Accordion, which has been removed from Drupal Core in D9.

Should we require the jQuery UI Accordion module as a dependency, or is the functionality required small and contained enough to replace with vanilla JS?

geoffreyr’s picture

FileSize
54.41 KB
2.07 KB

Attaching a new version of the patch from #29. I've also attached an interdiff to show what's changed.

I noticed that when you're using an entity type that only provides getParentId, such as menu_link_content, that it doesn't provide a bundle ID to the entity dependencies, thereby stuffing up the parent dependencies of the exported entity when it comes time to import. I fixed this by loading the parent entity by UUID, and then using its bundle type in the entity dependencies list.

mkalkbrenner’s picture

I integrated #34 in the merge request.

liquidcms’s picture

Installed with hints from #32 and tested deployment with a 9.0.11 site. Worked great.

Not sure if maintenance of this has fallen by the way side.. but would be good to get this merged.

phjou’s picture

I agree it would be good to be merged in order to be able to use it on D9. We cannot download it through composer.

Spudley’s picture

*Bump*

This is one of the last modules our site needs updating in order to complete the move to Drupal 9. Please can it be merged in.

bkudrle’s picture

Yes, another vote for creation of a Drupal 9 compatible version from these patches.

VladimirAus’s picture

Created task #3229340: Offering to co-maintain Content Synchronization and emailed maintainers.

fallenturtle’s picture

This patch isn't working for me. I've done a virgin Drupal (v8.9.18) install adding just this module (dev branch) and the latest patch. At first all seems fine, but there seems to be an issue when you update a node that references a file attachment.

I get:

> [notice]
> Segmentation fault

In ProcessBase.php line 172:

Output is empty.

Steps to reproduce:
Create an article (I choose this content type since it has an image field)
Add an image to this article and save
Content sync export
Open yml file for newly exported node and modify a string (I changed the body content).
Content sync import

and then the error happens.

If you edit the yml file for the attached image and remove the reference back to the parent node, it doesn't throw the error, so I think its getting stuck in some sort of loop.

  • geoffreyr authored 6596a0d on 8.x-2.x
    Issue #3114499 by mkalkbrenner, nitesh624, pavnish, Deepak Goyal,...

Blanca.Esqueda’s picture

Version: 8.x-2.x-dev » 3.0.0-beta1
Status: Reviewed & tested by the community » Fixed

A new release including the patches here for D9 Readiness have been created: 3.0.0-beta1
And the correspondent dev branch: 3.0.x-dev

Updating the status of this issue as Fixed.

@fallenturtle could you open a new issue for "the error when updating a node that references a file attachment"?

Blanca.Esqueda’s picture

Status: Fixed » Closed (fixed)

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

Summit’s picture

Hi, Latest contact sync 3.0.x-dev@dev breaks on my Drupal core 9.2.7 website.

Made new issue, while I saw this was closed. Sorry for adding here. https://www.drupal.org/project/content_sync/issues/3247036

Error

TypeError: Argument 4 passed to Drupal\content_sync\Normalizer\FileEntityNormalizer::__construct() must be an instance of Drupal\content_sync\Plugin\SyncNormalizerDecoratorManager, instance of Drupal\Core\Entity\EntityTypeBundleInfo given, called in /Applications/MAMP/htdocs/[site]/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 in /Applications/MAMP/htdocs/[site]/web/modules/contrib/content_sync/src/Normalizer/FileEntityNormalizer.php on line 45 #0 /Applications/MAMP/htdocs/[site]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drupal\content_sync\Normalizer\FileEntityNormalizer->__construct(Object(Drupal\Core\Entity\EntityTypeManager), Object(Drupal\Core\Entity\EntityTypeRepository), Object(Drupal\Core\Entity\EntityFieldManager), Object(Drupal\Core\Entity\EntityTypeBundleInfo), Object(Drupal\Core\Entity\EntityRepository), Object(Drupal\content_sync\Plugin\SyncNormalizerDecoratorManager), Object(Drupal\Core\File\FileSystem))
#

I saw this issue, and hopefully this is the right place to report a bug.
Thanks for going into this.

Greetings, Martijn