[4] Add dry-run and verbose/debug modes to update:joomla:remove-old-files cmd#31943
[4] Add dry-run and verbose/debug modes to update:joomla:remove-old-files cmd#31943drmenzelit merged 5 commits intojoomla:4.0-devfrom PhilETaylor:cleanupcommand
Conversation
… cmd Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
|
I have tested this item ✅ successfully on 0a2266d PHP notices were reported each time the remove-old-files command was run This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31943. |
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com> cs multi line Signed-off-by: Phil E. Taylor <phil@phil-taylor.com> tabs to spaces Signed-off-by: Phil E. Taylor <phil@phil-taylor.com> spaces to tabs - even though cs said it wanted spaces grrr Signed-off-by: Phil E. Taylor <phil@phil-taylor.com> adding more spaces for the fun of it Signed-off-by: Phil E. Taylor <phil@phil-taylor.com> Tabs must be used to indent lines; spaces are not allowed - apparently. Signed-off-by: Phil E. Taylor <phil@phil-taylor.com> cs - last chance! Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
This comment was marked as abuse.
This comment was marked as abuse.
wilsonge
left a comment
There was a problem hiding this comment.
Love it. Needs tests. But good job!
|
I have tested this item ✅ successfully on 3f9d3ce This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31943. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31943. |
|
I have tested this item ✅ successfully on 3f9d3ce This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31943. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31943. |
This comment was marked as abuse.
This comment was marked as abuse.
|
Sorry if my comment seemed unkind. It was meant for other testers. The testing instructions were excellent - amongst the best I have encountered. |
This comment was marked as abuse.
This comment was marked as abuse.
|
Thanks |
Closes #31901 replaces #31914
Summary of Changes
Improvements to the
update:joomla:remove-old-filesCLI Command--dry-run-vv-vvv--dry-runoption is a standard for all Symfony based commands that do destructive things.-v-vv-vvvoptions 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:cleanupbut this PR can be applied without that one.Testing Instructions
run these commands to create yourself some folders and files to then go on to delete with the CLI from this PR:
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-filesphp cli/joomla.php update:joomla:remove-old-files -vvand lastly
php cli/joomla.php update:joomla:remove-old-files -vvvbut Im not going to show that output as its huge and meant for debugging.Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
As explained above
Documentation Changes Required