Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there a way to run the scan from command line, or just via the admin?
Comment | File | Size | Author |
---|---|---|---|
#27 | 3067415-27.patch | 9.31 KB | Gábor Hojtsy |
#26 | interdiff-25-26.txt | 454 bytes | tim-diels |
#26 | upgrade_status-add-drush-command-3067415-26.patch | 10.09 KB | tim-diels |
#25 | interdiff-16-25.txt | 494 bytes | tim-diels |
#25 | upgrade_status-add-drush-command-3067415-25.patch | 10.09 KB | tim-diels |
Comments
Comment #2
Gábor HojtsyFirst of all, the module is based on the components of https://github.com/mglaman/drupal-check and that is a perfectly fine command line tool. I understand installing both could look superfluous, but that one can be installed without interfering with your site in any way, so that is more versatile in that sense. It is true that Upgrade Status has some useful addon features (eg. categorizing found issues), but I hope those will land back in drupal-check as well.
That said, it is not impossible to make Upgrade Status expose a drush command. I think that would be possible after #3053090: Add an ASCII export option since that would be basically the output formatter. I welcome help in starting the drush command code in the meantime though and/or help with that issue. (I think @tsegat is looking at that one, but not sure).
Comment #3
nrackleff CreditAttribution: nrackleff at ThinkShout commentedThank you Gábor. We will try the drupal-check command line tool as well.
Comment #4
tsega CreditAttribution: tsega at Axelerant commentedComment #5
Gábor HojtsyComment #6
Gábor Hojtsy#3053090: Add an ASCII export option now landed.
Comment #7
rpsuHere is a start, analyse is executed but the output handling is not yet very nice table format.
Comment #8
rpsuDrush\Drupal\Commands\core\DrupalCommands has a better solution, maybe.
Comment #9
Gábor Hojtsy@rpsu: I think you mixed this up, and did not want to upload the readme patch?
Comment #10
rpsuYou are absolutely right.
Perhaps this patch is better suited for this issue? The table is not printing out nicely for some reason (
drush us-a upgrade_status
as an example, results table breaks). We are here also re-using the asciiFormat -build, but that may be the cause of the misalignments.Comment #11
rpsuthe patch contains also some changes in composer.json - nette/neon was not present even if used, commit 667446f0 in April.
I also tagged
drupal/git_deploy
with a recent release in favor of using a tag instead of HEAD.Comment #12
rpsuNow the output is handled better, and re-using the ascii output is dropped. Output is kind of verbose, but I think it is better this way compared to making it very concise.
Comment #14
rpsuRefactoring linter issues away (I hope), but I have no clue why UI tests started to fail with this. Fingers crosses with this one - locally tests are green and linter happy.
Comment #16
rpsuOne more small linter issue, but tests will be still failing. I'm a bit puzzled why, since looks like tests are not able to find upgrade_status -module itself in tests -section.
Comment #17
rpsuComment #18
rpsutrigger the tests again
Comment #20
rpsuSo all tests pass when I run them locally, but failed with CI - alas tests and all code that is tested are untouched.
Comment #21
rpsuThis is the output on my local:
Comment #22
Gábor HojtsyComment #23
jefuri CreditAttribution: jefuri as a volunteer and at Synetic commentedI got an error from the last patch in #16, but fixed it in this patch. InvalidArgumentException use statement was not correct.
Also added the possibility to scan everything if no projects are given as an argument.
Comment #24
jefuri CreditAttribution: jefuri as a volunteer and at Synetic commentedComment #25
tim-dielsThe last patch is not correct. I use the patch in #16 with correcting the use statement for InvalidArgumentException to \ InvalidArgumentException
This patch does not include the extra "Also added the possibility to scan everything if no projects are given as an argument."
Comment #26
tim-dielsAlso fixed the invalid class call in the annotation.
Comment #27
Gábor HojtsyRerolled and cleaned up the user facing portions of it for a start. I made it compatible with Drush 9 or 10. I have 10 locally and it registered with it fine. I did not manage to run it due to Twig parsing errors that I think are unrelated:
The patch will not succeed here until the composer parts are added, but that I believe would start failing on sites that have drush without the actual drush services / command file in place, I am reluctant to commit it in the interim.
Comment #29
Gábor HojtsyMaking a bit more tight:
Still fails for me with the same Twig error as above for upgrade_status itself but will count that up to some local weirdness as I asked Lauriii to reproduce and he could not.
@jefuri: I committed the patch for now. Can you look into re-implementing your suggestion to scan all projects in a followup? That sounds like a useful thing in itself.
Comment #30
Gábor Hojtsy