aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2015-08-23 15:14:08 -0700
committerMatt Friedman <maf675@gmail.com>2015-08-23 15:14:08 -0700
commit13851f308f57e0cda4c24f9a9a186aac912213d1 (patch)
treea0e7b47fb5ba11f39cba80f852cf6421d4720553
parentef3de412b71259642022d5027817fceb5247552a (diff)
downloadforums-13851f308f57e0cda4c24f9a9a186aac912213d1.tar
forums-13851f308f57e0cda4c24f9a9a186aac912213d1.tar.gz
forums-13851f308f57e0cda4c24f9a9a186aac912213d1.tar.bz2
forums-13851f308f57e0cda4c24f9a9a186aac912213d1.tar.xz
forums-13851f308f57e0cda4c24f9a9a186aac912213d1.zip
[ticket/14123] Add descriptive help to the CLI help output
PHPBB3-14123
-rw-r--r--phpBB/language/en/cli.php82
-rw-r--r--phpBB/phpbb/console/command/cache/purge.php1
-rw-r--r--phpBB/phpbb/console/command/config/delete.php1
-rw-r--r--phpBB/phpbb/console/command/config/get.php1
-rw-r--r--phpBB/phpbb/console/command/config/increment.php1
-rw-r--r--phpBB/phpbb/console/command/config/set.php1
-rw-r--r--phpBB/phpbb/console/command/config/set_atomic.php1
-rw-r--r--phpBB/phpbb/console/command/cron/cron_list.php1
-rw-r--r--phpBB/phpbb/console/command/cron/run.php1
-rw-r--r--phpBB/phpbb/console/command/db/migrate.php1
-rw-r--r--phpBB/phpbb/console/command/dev/migration_tips.php1
-rw-r--r--phpBB/phpbb/console/command/extension/disable.php1
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php1
-rw-r--r--phpBB/phpbb/console/command/extension/purge.php1
-rw-r--r--phpBB/phpbb/console/command/extension/show.php1
-rw-r--r--phpBB/phpbb/console/command/fixup/recalculate_email_hash.php1
16 files changed, 96 insertions, 1 deletions
diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php
index 0e7dc39b95..11d45646f8 100644
--- a/phpBB/language/en/cli.php
+++ b/phpBB/language/en/cli.php
@@ -54,7 +54,7 @@ $lang = array_merge($lang, array(
'CLI_DESCRIPTION_DELETE_CONFIG' => 'Deletes a configuration option',
'CLI_DESCRIPTION_DISABLE_EXTENSION' => 'Disables the specified extension.',
'CLI_DESCRIPTION_ENABLE_EXTENSION' => 'Enables the specified extension.',
- 'CLI_DESCRIPTION_FIND_MIGRATIONS' => 'Finds migrations that are not depended on.',
+ 'CLI_DESCRIPTION_FIND_MIGRATIONS' => 'Finds migrations that are not depended upon.',
'CLI_DESCRIPTION_GET_CONFIG' => 'Gets a configuration option’s value',
'CLI_DESCRIPTION_INCREMENT_CONFIG' => 'Increments a configuration option’s value',
'CLI_DESCRIPTION_LIST_EXTENSIONS' => 'Lists all extensions in the database and on the filesystem.',
@@ -65,6 +65,86 @@ $lang = array_merge($lang, array(
'CLI_DESCRIPTION_SET_ATOMIC_CONFIG' => 'Sets a configuration option’s value only if the old matches the current value',
'CLI_DESCRIPTION_SET_CONFIG' => 'Sets a configuration option’s value',
+ 'CLI_HELP_PURGE_CACHE' => 'The <info>%command.name%</info> command allows you to purge the board’s cache.
+
+ <info>php %command.full_name%</info>
+',
+ 'CLI_HELP_DELETE_CONFIG' => 'The <info>%command.name%</info> command deletes a configuration option. The key name is required.
+
+ <info>php %command.full_name% config_key</info>
+',
+ 'CLI_HELP_GET_CONFIG' => 'The <info>%command.name%</info> command gets a configuration option’s value. The key name is required.
+
+ <info>php %command.full_name% config_key</info>
+',
+ 'CLI_HELP_INCREMENT_CONFIG' => 'The <info>%command.name%</info> command increments an integer configuration option’s value. The key name and increment amount are required.
+
+ <info>php %command.full_name% config_key 1</info>
+
+If the configuration option changes too frequently to be efficiently cached, use the <info>--dynamic</info> or <info>-d</info> option:
+
+ <info>php %command.full_name% config_key 1 --dynamic</info>
+ <info>php %command.full_name% config_key 1 -d</info>
+',
+ 'CLI_HELP_SET_CONFIG' => 'The <info>%command.name%</info> sets a configuration option’s value. The key name and value are required.
+
+ <info>php %command.full_name% config_key foo</info>
+
+If the configuration option changes too frequently to be efficiently cached, use the <info>--dynamic</info> or <info>-d</info> option:
+
+ <info>php %command.full_name% config_key foo --dynamic</info>
+ <info>php %command.full_name% config_key foo -d</info>
+',
+ 'CLI_HELP_SET_ATOMIC_CONFIG' => 'The <info>%command.name%</info> command sets a configuration option’s value only if the old value matches the current value or the configuration value does not exist yet. The key name, old and new values are required.
+
+ <info>php %command.full_name% config_name foo bar</info>
+
+If the configuration option changes too frequently to be efficiently cached, use the <info>--dynamic</info> or <info>-d</info> option:
+
+ <info>php %command.full_name% config_key foo bar --dynamic</info>
+ <info>php %command.full_name% config_key foo bar -d</info>
+',
+ 'CLI_HELP_CRON_LIST' => 'The <info>%command.name%</info> command prints a list of ready and unready cron jobs.
+
+ <info>php %command.full_name%</info>
+',
+ 'CLI_HELP_CRON_RUN' => 'The <info>%command.name%</info> command runs all ready cron tasks.
+
+ <info>php %command.full_name%</info>
+
+Optionally you can specify a cron task name to run only the specified cron task:
+
+ <info>php %command.full_name% task_name</info>
+',
+ 'CLI_HELP_DB_MIGRATE' => 'The <info>%command.name%</info> command updates the database by applying available migrations.
+
+ <info>php %command.full_name%</info>
+',
+ 'CLI_HELP_FIND_MIGRATIONS' => 'The <info>%command.name%</info> command finds migrations that are not depended upon.
+
+ <info>php %command.full_name%</info>
+',
+ 'CLI_HELP_DISABLE_EXTENSION' => 'The <info>%command.name%</info> command disables the specified extension. The extension name is required.
+
+ <info>php %command.full_name% vendor_name/package_name</info>
+',
+ 'CLI_HELP_ENABLE_EXTENSION' => 'The <info>%command.name%</info> command enables the specified extension. The extension name is required.
+
+ <info>php %command.full_name% vendor_name/package_name</info>
+',
+ 'CLI_HELP_PURGE_EXTENSION' => 'The <info>%command.name%</info> command purges the specified extension. The extension name is required.
+
+ <info>php %command.full_name% vendor_name/package_name</info>
+',
+ 'CLI_HELP_LIST_EXTENSIONS' => 'The <info>%command.name%</info> command lists all extensions in the database and on the filesystem.
+
+ <info>php %command.full_name%</info>
+',
+ 'CLI_HELP_RECALCULATE_EMAIL_HASH' => 'The <info>%command.name%</info> command recalculates the user_email_hash column of the users table.
+
+ <info>php %command.full_name%</info>
+',
+
'CLI_EXTENSION_DISABLE_FAILURE' => 'Could not disable extension %s',
'CLI_EXTENSION_DISABLE_SUCCESS' => 'Successfully disabled extension %s',
'CLI_EXTENSION_ENABLE_FAILURE' => 'Could not enable extension %s',
diff --git a/phpBB/phpbb/console/command/cache/purge.php b/phpBB/phpbb/console/command/cache/purge.php
index d0c2ef6f72..4a6c8cbbdd 100644
--- a/phpBB/phpbb/console/command/cache/purge.php
+++ b/phpBB/phpbb/console/command/cache/purge.php
@@ -60,6 +60,7 @@ class purge extends \phpbb\console\command\command
$this
->setName('cache:purge')
->setDescription($this->user->lang('PURGE_CACHE'))
+ ->setHelp($this->user->lang('CLI_HELP_PURGE_CACHE'))
;
}
diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php
index efd276d7e3..51fe2165eb 100644
--- a/phpBB/phpbb/console/command/config/delete.php
+++ b/phpBB/phpbb/console/command/config/delete.php
@@ -26,6 +26,7 @@ class delete extends command
$this
->setName('config:delete')
->setDescription($this->user->lang('CLI_DESCRIPTION_DELETE_CONFIG'))
+ ->setHelp($this->user->lang('CLI_HELP_DELETE_CONFIG'))
->addArgument(
'key',
InputArgument::REQUIRED,
diff --git a/phpBB/phpbb/console/command/config/get.php b/phpBB/phpbb/console/command/config/get.php
index 9c03b49a3d..688fafc753 100644
--- a/phpBB/phpbb/console/command/config/get.php
+++ b/phpBB/phpbb/console/command/config/get.php
@@ -27,6 +27,7 @@ class get extends command
$this
->setName('config:get')
->setDescription($this->user->lang('CLI_DESCRIPTION_GET_CONFIG'))
+ ->setHelp($this->user->lang('CLI_HELP_GET_CONFIG'))
->addArgument(
'key',
InputArgument::REQUIRED,
diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php
index b4d7438b66..a29473a471 100644
--- a/phpBB/phpbb/console/command/config/increment.php
+++ b/phpBB/phpbb/console/command/config/increment.php
@@ -27,6 +27,7 @@ class increment extends command
$this
->setName('config:increment')
->setDescription($this->user->lang('CLI_DESCRIPTION_INCREMENT_CONFIG'))
+ ->setHelp($this->user->lang('CLI_HELP_INCREMENT_CONFIG'))
->addArgument(
'key',
InputArgument::REQUIRED,
diff --git a/phpBB/phpbb/console/command/config/set.php b/phpBB/phpbb/console/command/config/set.php
index 695de31013..14ee9a2deb 100644
--- a/phpBB/phpbb/console/command/config/set.php
+++ b/phpBB/phpbb/console/command/config/set.php
@@ -27,6 +27,7 @@ class set extends command
$this
->setName('config:set')
->setDescription($this->user->lang('CLI_DESCRIPTION_SET_CONFIG'))
+ ->setHelp($this->user->lang('CLI_HELP_SET_CONFIG'))
->addArgument(
'key',
InputArgument::REQUIRED,
diff --git a/phpBB/phpbb/console/command/config/set_atomic.php b/phpBB/phpbb/console/command/config/set_atomic.php
index e8c69a0885..cff89d5157 100644
--- a/phpBB/phpbb/console/command/config/set_atomic.php
+++ b/phpBB/phpbb/console/command/config/set_atomic.php
@@ -27,6 +27,7 @@ class set_atomic extends command
$this
->setName('config:set-atomic')
->setDescription($this->user->lang('CLI_DESCRIPTION_SET_ATOMIC_CONFIG'))
+ ->setHelp($this->user->lang('CLI_HELP_SET_ATOMIC_CONFIG'))
->addArgument(
'key',
InputArgument::REQUIRED,
diff --git a/phpBB/phpbb/console/command/cron/cron_list.php b/phpBB/phpbb/console/command/cron/cron_list.php
index c515fd9e80..418f2d8c76 100644
--- a/phpBB/phpbb/console/command/cron/cron_list.php
+++ b/phpBB/phpbb/console/command/cron/cron_list.php
@@ -40,6 +40,7 @@ class cron_list extends \phpbb\console\command\command
$this
->setName('cron:list')
->setDescription($this->user->lang('CLI_DESCRIPTION_CRON_LIST'))
+ ->setHelp($this->user->lang('CLI_HELP_CRON_LIST'))
;
}
diff --git a/phpBB/phpbb/console/command/cron/run.php b/phpBB/phpbb/console/command/cron/run.php
index 72ad1205ef..a9648fcd41 100644
--- a/phpBB/phpbb/console/command/cron/run.php
+++ b/phpBB/phpbb/console/command/cron/run.php
@@ -50,6 +50,7 @@ class run extends \phpbb\console\command\command
$this
->setName('cron:run')
->setDescription($this->user->lang('CLI_DESCRIPTION_CRON_RUN'))
+ ->setHelp($this->user->lang('CLI_HELP_CRON_RUN'))
->addArgument('name', InputArgument::OPTIONAL, $this->user->lang('CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1'))
;
}
diff --git a/phpBB/phpbb/console/command/db/migrate.php b/phpBB/phpbb/console/command/db/migrate.php
index 87c2a057d1..e279e8ee0c 100644
--- a/phpBB/phpbb/console/command/db/migrate.php
+++ b/phpBB/phpbb/console/command/db/migrate.php
@@ -52,6 +52,7 @@ class migrate extends \phpbb\console\command\command
$this
->setName('db:migrate')
->setDescription($this->user->lang('CLI_DESCRIPTION_DB_MIGRATE'))
+ ->setHelp($this->user->lang('CLI_HELP_DB_MIGRATE'))
;
}
diff --git a/phpBB/phpbb/console/command/dev/migration_tips.php b/phpBB/phpbb/console/command/dev/migration_tips.php
index f9047bdac8..03d81a72a2 100644
--- a/phpBB/phpbb/console/command/dev/migration_tips.php
+++ b/phpBB/phpbb/console/command/dev/migration_tips.php
@@ -31,6 +31,7 @@ class migration_tips extends \phpbb\console\command\command
$this
->setName('dev:migration-tips')
->setDescription($this->user->lang('CLI_DESCRIPTION_FIND_MIGRATIONS'))
+ ->setHelp($this->user->lang('CLI_HELP_FIND_MIGRATIONS'))
;
}
diff --git a/phpBB/phpbb/console/command/extension/disable.php b/phpBB/phpbb/console/command/extension/disable.php
index 1eee16cbd9..dae63c4076 100644
--- a/phpBB/phpbb/console/command/extension/disable.php
+++ b/phpBB/phpbb/console/command/extension/disable.php
@@ -23,6 +23,7 @@ class disable extends command
$this
->setName('extension:disable')
->setDescription($this->user->lang('CLI_DESCRIPTION_DISABLE_EXTENSION'))
+ ->setHelp($this->user->lang('CLI_HELP_DISABLE_EXTENSION'))
->addArgument(
'extension-name',
InputArgument::REQUIRED,
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
index 59ff11e9b7..94baaa0f44 100644
--- a/phpBB/phpbb/console/command/extension/enable.php
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -23,6 +23,7 @@ class enable extends command
$this
->setName('extension:enable')
->setDescription($this->user->lang('CLI_DESCRIPTION_ENABLE_EXTENSION'))
+ ->setHelp($this->user->lang('CLI_HELP_ENABLE_EXTENSION'))
->addArgument(
'extension-name',
InputArgument::REQUIRED,
diff --git a/phpBB/phpbb/console/command/extension/purge.php b/phpBB/phpbb/console/command/extension/purge.php
index 517e9a74c9..b9fa038a4b 100644
--- a/phpBB/phpbb/console/command/extension/purge.php
+++ b/phpBB/phpbb/console/command/extension/purge.php
@@ -23,6 +23,7 @@ class purge extends command
$this
->setName('extension:purge')
->setDescription($this->user->lang('CLI_DESCRIPTION_PURGE_EXTENSION'))
+ ->setHelp($this->user->lang('CLI_HELP_PURGE_EXTENSION'))
->addArgument(
'extension-name',
InputArgument::REQUIRED,
diff --git a/phpBB/phpbb/console/command/extension/show.php b/phpBB/phpbb/console/command/extension/show.php
index f9322034d7..2e703e7156 100644
--- a/phpBB/phpbb/console/command/extension/show.php
+++ b/phpBB/phpbb/console/command/extension/show.php
@@ -22,6 +22,7 @@ class show extends command
$this
->setName('extension:show')
->setDescription($this->user->lang('CLI_DESCRIPTION_LIST_EXTENSIONS'))
+ ->setHelp($this->user->lang('CLI_HELP_LIST_EXTENSIONS'))
;
}
diff --git a/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php
index ec4e1b0ee7..94592409c5 100644
--- a/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php
+++ b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php
@@ -32,6 +32,7 @@ class recalculate_email_hash extends \phpbb\console\command\command
$this
->setName('fixup:recalculate-email-hash')
->setDescription($this->user->lang('CLI_DESCRIPTION_RECALCULATE_EMAIL_HASH'))
+ ->setHelp($this->user->lang('CLI_HELP_RECALCULATE_EMAIL_HASH'))
;
}