User tests: Successful: Unsuccessful:
Improvements to the update:joomla:remove-old-files
CLI Command
--dry-run
-vv
-vvv
--dry-run
option is a standard for all Symfony based commands that do destructive things.
-v
-vv
-vvv
options are a standard Symfony command option for increasing the verbosity to assist with debugging and gathering additional information from a command.
Also See #31941 for a proposal to rename this command to Joomla:update:cleanup
but this PR can be applied without that one.
run these commands to create yourself some folders and files to then go on to delete with the CLI from this PR:
touch administrator/components/com_actionlogs/actionlogs.php
touch administrator/components/com_actionlogs/controller.php
mkdir -p templates/system/images
mkdir -p templates/system/html
mkdir -p templates/protostar/less
mkdir -p templates/protostar/language/en-GB
mkdir -p templates/protostar/language
mkdir -p templates/protostar/js
mkdir -p templates/protostar/img
mkdir -p templates/protostar/images/system
Apply PR.
Run these commands as a test of each new feature:
This command should show s summary, but not delete anything:
php cli/joomla.php update:joomla:remove-old-files --dry-run
--
This command should show what files and folders will be deleted
php cli/joomla.php update:joomla:remove-old-files --dry-run -vv
--
This command should show what files and folders are checked and what will be deleted (output is huge, so screenshots below are snipped to show important bits)
php cli/joomla.php update:joomla:remove-old-files --dry-run -vvv
--
You can then set up your folders/files with the test script above, and run any of these commands to ACTUALLY DELETE the files and folders.
php cli/joomla.php update:joomla:remove-old-files
php cli/joomla.php update:joomla:remove-old-files -vv
and lastly php cli/joomla.php update:joomla:remove-old-files -vvv
but Im not going to show that output as its huge and meant for debugging.
As explained above
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_admin Libraries |
Labels |
Added:
?
|
I have tested this item
Tested successfully in Beta7-dev of 9 January.
PHP notices were reported each time the remove-old-files command was run
Notice: Undefined variable: supressOutput in C:\www\joomla4\administrator\components\com_admin\script.php on line 6275
Notice: Undefined variable: supressOutput in C:\www\joomla4\administrator\components\com_admin\script.php on line 6280
I have tested this item
Works as described. But at the delete stage - best to delete with the -vv option first!
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Pending |
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
@ceford Works as described. But at the delete stage - best to delete with the -vv option first!
Well not that level of control is in the hands of the person running the commands to delete things. Before there was no feedback at all. :-)
If you mean for testing this PR, then yes, you will need to run the creation commands to give you some test files/folders to delete after every delete (non --dry-run) command to give something for the next delete command to actually delete.
Sorry if my comment seemed unkind. It was meant for other testers. The testing instructions were excellent - amongst the best I have encountered.
Not unkind at all - I never took it that way at all :) Thanks for testing.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-01-12 10:08:51 |
Closed_By | ⇒ | drmenzelit | |
Labels |
Added:
?
|
Thanks
I have tested this item✅ successfully on 0a2266d
Tested successfully in Beta7-dev of 9 January.
PHP notices were reported each time the remove-old-files command was run
Notice: Undefined variable: supressOutput in C:\www\joomla4\administrator\components\com_admin\script.php on line 6275
Notice: Undefined variable: supressOutput in C:\www\joomla4\administrator\components\com_admin\script.php on line 6280
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31943.