drupal-check against backup_migrate-8.x-4.x-dev (23 Aug 2019)

[..]

CommentFileSizeAuthor
#48 backup_migrate-n3051092-48.interdiff.txt3.04 KBdamienmckenna
#48 backup_migrate-n3051092-48.patch223.83 KBdamienmckenna
#47 backup_migrate-n3051092-46.patch223.8 KBdamienmckenna
#44 backup_migrate-n3051092-44.patch223.82 KBdamienmckenna
#44 backup_migrate-n3051092-44.interdiff.txt4.03 KBdamienmckenna
#41 backup_migrate-n3051092-41.patch221.84 KBdamienmckenna
#41 backup_migrate-n3051092-41.interdiff.txt2.01 KBdamienmckenna
#40 backup_migrate-n3051092-40.patch220.41 KBdamienmckenna
#40 backup_migrate-n3051092-40.interdiff.txt2.14 KBdamienmckenna
#39 backup_migrate-n3051092-39.interdiff.txt835 bytesdamienmckenna
#39 backup_migrate-n3051092-39.patch218.4 KBdamienmckenna
#38 backup_migrate-n3051092-38.patch217.58 KBdamienmckenna
#38 backup_migrate-n3051092-38.interdiff.txt1.35 KBdamienmckenna
#36 backup_migrate-n3051092-36.patch217.43 KBdamienmckenna
#36 backup_migrate-n3051092-36.interdiff.txt559.51 KBdamienmckenna
#30 backup_migrate-n3051092-30.patch65.38 KBdamienmckenna
#30 backup_migrate-n3051092-30.interdiff.txt803 bytesdamienmckenna
#27 backup_migrate-n3051092-27.patch65.21 KBdamienmckenna
#27 backup_migrate-n3051092-27.interdiff.txt7.96 KBdamienmckenna
#25 backup_migrate-n3051092-25.patch64.06 KBdamienmckenna
#25 backup_migrate-n3051092-25.interdiff.txt4.54 KBdamienmckenna
#22 backup_migrate-n3051092-22.patch60.34 KBdamienmckenna
#22 backup_migrate-n3051092-22.interdiff.txt47.78 KBdamienmckenna
#16 3051092-16.patch18.44 KBrpayanm
#16 3051092-interdiff-12-16.txt1.27 KBrpayanm
#12 diff-3051092-11-12.txt1.83 KBvuil
#12 3051092-12.patch18.81 KBvuil
#11 diff-3051092-9-11.txt5.44 KBvuil
#11 3051092-11.patch17.07 KBvuil
#9 interdiff-3051092-7-9.txt2.76 KBvuil
#9 3051092-9.patch13.64 KBvuil
#8 interdiff-5-7.txt3.87 KBvuil
#7 3051092-7.patch11 KBvuil
#5 3051092-5.patch7.38 KBvuil
#2 d9_depreciation-3051092-2.patch10.99 KBwaverate

Comments

waverate created an issue. See original summary.

waverate’s picture

Status: Active » Needs review
StatusFileSize
new10.99 KB

Patch attached.

waverate’s picture

drupal-check after patch at #2.


 ------ ------------------------------------------------ 
  Line   backup_migrate.module                           
 ------ ------------------------------------------------ 
  25     Instantiation of deprecated class               
         Symfony\Component\ClassLoader\Psr4ClassLoader.  
 ------ ------------------------------------------------ 

 ------ --------------------------------------------------------------------- 
  Line   lib/backup_migrate_core/src/Service/HTTPClientInterface.php          
 ------ --------------------------------------------------------------------- 
         Class BackupMigrate\Core\Service\HttpClientInterface was not found   
         while trying to analyse it - autoloading is probably not configured  
         properly.                                                            
 ------ --------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   lib/backup_migrate_core/src/Service/PhpCurlHttpClient.php           
 ------ -------------------------------------------------------------------- 
  13     Class BackupMigrate\Core\Service\HttpClientInterface not found and  
         could not be autoloaded.                                            
 ------ -------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Environment/DrupalEnvironment.php                               
 ------ -------------------------------------------------------------------- 
         Class BackupMigrate\Core\Environment\EnvironmentBase not found and  
         could not be autoloaded.                                            
 ------ -------------------------------------------------------------------- 

                                                                                
 [ERROR] Found 4 errors                                                         
                                                                                
vuil’s picture

Status: Needs review » Active
vuil’s picture

StatusFileSize
new7.38 KB

Better decision for drupal_set_message() replacement.

vuil’s picture

Issue summary: View changes
vuil’s picture

StatusFileSize
new11 KB

Add the replace of deprecated drupal_realpath().

vuil’s picture

StatusFileSize
new3.87 KB
vuil’s picture

StatusFileSize
new13.64 KB
new2.76 KB
vuil’s picture

Issue summary: View changes
vuil’s picture

StatusFileSize
new17.07 KB
new5.44 KB
vuil’s picture

StatusFileSize
new18.81 KB
new1.83 KB

Waw, the patch is ready! :)

vuil’s picture

Status: Active » Needs review
damienmckenna’s picture

vuil’s picture

rpayanm’s picture

StatusFileSize
new1.27 KB
new18.44 KB
error: patch failed: src/Filter/DrupalUtils.php:98
error: src/Filter/DrupalUtils.php: patch does not apply

I re-rolled it.

I fixed:

------ ---------------------------------------------------------------------------------------- 
  Line   lib/backup_migrate_core/src/Destination/DirectoryDestination.php                        
 ------ ---------------------------------------------------------------------------------------- 
  248    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.                                                                                
  251    Call to deprecated method validScheme() of class Drupal\Core\File\FileSystemInterface:  
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use                                   
         Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidScheme()                
         instead.                                                                                
 ------ ---------------------------------------------------------------------------------------- 

We still need to work on:

------ ---------------------------------------------------------------------------------- 
  Line   backup_migrate.module                                                             
 ------ ---------------------------------------------------------------------------------- 
  25     Instantiation of deprecated class Symfony\Component\ClassLoader\Psr4ClassLoader:  
         since version 3.3, to be removed in 4.0.                                          
 ------ ---------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   lib/backup_migrate_core/src/Service/HTTPClientInterface.php                                                                                       
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------- 
         Class BackupMigrate\Core\Service\HttpClientInterface was not found while trying to analyse it - autoloading is probably not configured properly.  
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------- 
  Line   lib/backup_migrate_core/src/Service/PhpCurlHttpClient.php                                    
 ------ --------------------------------------------------------------------------------------------- 
  13     Class BackupMigrate\Core\Service\HttpClientInterface not found and could not be autoloaded.  
 ------ --------------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------- 
  Line   src/Environment/DrupalEnvironment.php                                                        
 ------ --------------------------------------------------------------------------------------------- 
         Class BackupMigrate\Core\Environment\EnvironmentBase not found and could not be autoloaded.  
 ------ --------------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------- 
  Line   tests/src/Functional/BackupMigrateEnablingTest.php                         
 ------ --------------------------------------------------------------------------- 
         Class Drupal\Tests\BrowserTestBase not found and could not be autoloaded.  
 ------ --------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------- 
  Line   tests/src/Functional/BackupMigratePageLoadTest.php                         
 ------ --------------------------------------------------------------------------- 
         Class Drupal\Tests\BrowserTestBase not found and could not be autoloaded.  
 ------ --------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------- 
  Line   tests/src/Functional/BackupMigratePermissionsTest.php                      
 ------ --------------------------------------------------------------------------- 
         Class Drupal\Tests\BrowserTestBase not found and could not be autoloaded.  
 ------ --------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------- 
  Line   tests/src/Functional/BackupMigrateQuickBackupTest.php                      
 ------ --------------------------------------------------------------------------- 
         Class Drupal\Tests\BrowserTestBase not found and could not be autoloaded.  
 ------ --------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 8 errors  
rpayanm’s picture

salah1’s picture

I'm little confused on how to help out on the "deprecated issues of B&M".
The following D9 Plan for B&M indicates that:

Start fixing 9.x compatibility bugs in sub-issues, not in this one.

https://www.drupal.org/project/backup_migrate/issues/3092547

Which i think means: one child issue per deprecation OR per-file-to-be-fixed.
However, it looks like from this thread that one BIG patch is being updated.

The advantage of "one child issue per deprecation-error OR per file-to-be-fixed " is:

-its easier to see what's left from the deprecation errors.
-easier to commit/maintain since its one item/one file etc.

Please let me know if I'm wrong. I will wait a little and then work as indicated above.

damienmckenna’s picture

damienmckenna’s picture

damienmckenna’s picture

Status: Needs review » Needs work
damienmckenna’s picture

StatusFileSize
new47.78 KB
new60.34 KB

This includes some additional cleanup.

damienmckenna’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 22: backup_migrate-n3051092-22.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new4.54 KB
new64.06 KB

Working on fixing the errors.

Status: Needs review » Needs work

The last submitted patch, 25: backup_migrate-n3051092-25.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new7.96 KB
new65.21 KB

WIP.

Status: Needs review » Needs work

The last submitted patch, 27: backup_migrate-n3051092-27.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

damienmckenna’s picture

Status: Needs work » Needs review

I've come to realize that a) we can merge the 3rd party library into the main codebase, b) doing so would be a massive API change and so would require a new branch.

So we'll fix the smaller issues here but will then have to do a new branch to finish the D9 compatibility changes. At that point we should also consider refactoring much of the API to get rid of the unnecessary layers.

damienmckenna’s picture

This should fix one of the last bugs.

Status: Needs review » Needs work

The last submitted patch, 30: backup_migrate-n3051092-30.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

damienmckenna’s picture

The last bug seems to be because the backup tries to happen before the private storage system is configured and the APIs aren't detecting the problem.

damienmckenna’s picture

Also need to roll back some of the unnecessary code changes, those should be done separately.

damienmckenna’s picture

Assigned: Unassigned » damienmckenna
damienmckenna’s picture

Issue summary: View changes
damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new559.51 KB
new217.43 KB

This moves the custom library into the main src/Core directory, moves some things from src into src/Drupal and updates things to suit; it worked locally, so we'll see if the tests are ok.

Status: Needs review » Needs work

The last submitted patch, 36: backup_migrate-n3051092-36.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new1.35 KB
new217.58 KB

Solved! There was a line in src/Core/Destination/DirectoryDestination.php that needed to use getSchema() instead of isValidSchema().

damienmckenna’s picture

StatusFileSize
new218.4 KB
new835 bytes

Updated composer.json file.

damienmckenna’s picture

Some improvements to README.txt and composer.json, so I'm not going to rerun the tests.

damienmckenna’s picture

Trying to fix the D9 test failures.

damienmckenna’s picture

Ok, manually testing it on D9.0 runs into problems, so it isn't going to be committed today :-\

damienmckenna’s picture

Assigned: damienmckenna » Unassigned
Status: Needs review » Needs work

The D9 errors are mostly related to a missing "config_export" item in the annotations.

Also, drupal-check reported this:

 ------ ----------------------------------------------------------------------------------------------------- 
  Line   src/Drupal/Environment/DrupalEnvironment.php                                                         
 ------ ----------------------------------------------------------------------------------------------------- 
         Class Drupal\backup_migrate\Core\Environment\EnvironmentBase not found and could not be autoloaded.  
  12     Class Drupal\backup_migrate\Core\Environment\EnvironmentBase not found and could not be autoloaded.  
 ------ ----------------------------------------------------------------------------------------------------- 
damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new4.03 KB
new223.82 KB

The DrupalEnvironment class seemed to part of something that was planned but never finished, so let's just get rid of it.

This also adds the missing "config_export" items.

damienmckenna’s picture

Status: Needs review » Needs work

One bug left..

damienmckenna’s picture

Assigned: Unassigned » damienmckenna
damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new223.8 KB

Let's see if this solves the last problem.

damienmckenna’s picture

This appears to fix the @dataProvider syntax, let's hope it works correctly now.

damienmckenna’s picture

Status: Needs review » Fixed

THE TESTS ARE GREEN ON D9! WOOHOO!!

Committed.

Further work will be done in other tickets.

2dareis2do’s picture

damienmckenna’s picture

Assigned: damienmckenna » Unassigned

Status: Fixed » Closed (fixed)

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