Closed (fixed)
Project:
Backup and Migrate
Version:
5.1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2025 at 08:39 UTC
Updated:
9 Jul 2026 at 13:30 UTC
Jump to comment: Most recent
A TOTAL OF 565 ERRORS AND 10 WARNINGS WERE FOUND IN 151 FILES
https://git.drupalcode.org/project/backup_migrate/-/jobs/7752320
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:
Comments
Comment #3
danrodJust following on this one.
Comment #4
danrodComment #6
kieran.cottI've taken a pass at resolving these in MR 62, the vast majority of these were fixed by PHPCBF - the remainder is nearly all docblocks and removing commented out lines, the exception being the removal of strict config schema opt-outs from functional tests.
There is a little bit of overlap with #3357391 for things such as dependency injections, because PHPCS is run using
DrupalPracticewhich is reportingDrupalPractice.Objects.GlobalDrupal.GlobalDrupalandDrupalPractice.Objects.GlobalFunction.GlobalFunctionas warnings - but only changes necessary to get PHPCS to pass have been made here.Comment #7
ivnishComment #8
ivnish@kieran.cott thanks! MR introducing some new cspell issues https://git.drupalcode.org/issue/backup_migrate-3564661/-/jobs/10483641
Comment #9
kieran.cottThanks for pointing out @ivnish, I've now fixed those cspell issues.
Comment #10
schillerm commentedHi, when I run phpcs on MR!62 I am currently getting 3 errors .. see below..
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml web/modules/contrib/backup_migrate
FILE: /home/m/Documents/Issues/backup-migrate-11-3564661/web/modules/contrib/backup_migrate/src/Core/Config/README.md
---------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
---------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | WARNING | [ ] Line exceeds 80 characters; contains 591 characters
5 | WARNING | [ ] Line exceeds 80 characters; contains 388 characters
8 | WARNING | [ ] Line exceeds 80 characters; contains 171 characters
36 | WARNING | [ ] Line exceeds 80 characters; contains 96 characters
56 | ERROR | [x] Concat operator must be surrounded by a single space
58 | ERROR | [x] list(...) is forbidden, use [...] instead.
---------------------------------------------------------------------------------------------------------------------
Comment #11
kieran.cottHi @schillerm - PHPCS on the CI pipeline passes successfully: https://git.drupalcode.org/issue/backup_migrate-3564661/-/jobs/10497128 - this job uses the
drupal-contrib-projectstandard from the Drupal GitLab Template's defaultphpcs.xml.dist.The reason you're seeing failures locally appears to be that you are using a different standard and running PHPCS against the
README.mdfile.Comment #12
nitinkumar_7 commentedI have reviewed MR and the latest CI pipeline run. The phpcs job now passes successfully with zero coding standards errors or warnings, meaning the primary objective of this issue is resolved.
The overall pipeline failure appears to be caused by other jobs (such as the recent cspell changes or unrelated test failures). Since the PHPCS issues themselves are fully addressed here, those remaining pipeline errors can be broken out and resolved in a separate issue. Ready for RTBC , keeping status needs review for maintainer approval.
Comment #13
ivnishNeeds check why schema fails with error:
All tests failed with this error. Only the last test was previously failed
Comment #14
kieran.cottThanks @ivnish, looks like
daily_schedule.ymlsetskeep: ''as a string, while the schema treatskeepas an integer.I've had a look into this and it's not an issue that has been introduced here. It looks like removing
strictConfigSchema = FALSE(which was skipping the config schema validation test) has exposed an existing issue:386dceeon 2016-03-11 added the schedule schema withkeepastype: integer.e65d7a4on 2020-09-01 introducedAdminFunctionalityTestwith strict schema disabled.fbd2f1bon 2022-12-10 added the installed daily schedule config withkeep: ''.and then in this branch, strict schema has been enabled again to get PHPCS to pass, exposing the mismatch.
Would you like me to take a pass at making the schedule config/form save
keepas an integer on this branch, or would you prefer to treat this as a separate issue?Comment #15
kieran.cottComment #16
ivnishdel
Comment #17
ivnishComment #18
kieran.cottI believe that's because on that branch
AdminFunctionalityTest.phpstill has the test bypass:protected $strictConfigSchema = FALSE;So the issue is obfuscated on the PHPStan branch.
It's only been removed on this branch (to get PHPCS to pass) - thus exposing the issue.
Comment #19
schillerm commentedHi kieran.cott, yes you are right I was missing phpcs.xml. Re ran locally with that phpcs.xml file and no phpcs errors now. Sorry about that.
Comment #20
danrod@kieran.cott could we fix the schedule config/form issue in this MR? please let us know, I can look on it as well.
Comment #21
kieran.cottThanks @danrod.
I've stored schedule retention as
integer 0for “keep all backups”, completed source config schemas for saved name values, and extended settings profile schema for notification settings.Form submissions have also been normalised before save: schedule retention and settings profile checkbox values have been cast to the expected scalar types. The related functional test data has been corrected so timestamp format is submitted to
timestamp_format.I've also updated the the Drupal MySQL source to call the up-to-date
getConnection()andreadSqlCommand()methods.PHPUnit CI pipeline output now exactly matches that of the 5.1.x branch:
Comment #22
danrodThank you @kieran.cott
I ran the tests locally and got no failures, I will do some manual tests before merging this.
Comment #23
danrodI did some manual testing and the functionality works as expected, I'm setting this to RTBC, but I'm not merging yet, just in case anyone wants to test this MR as well.
Comment #24
danrodComment #25
schillerm commentedHi, I just pulled the latest commits and ran phpcs again, no errors showing up. Seems fine to me.
Comment #26
danrodThanks @schillerm , merging this now.
Comment #28
danrodMerged, thanks a lot to everyone involved.
Comment #29
danrod