{"action":"created","issue":{"url":"https://api.github.com/repos/drush-ops/drush/issues/3511","repository_url":"https://api.github.com/repos/drush-ops/drush","labels_url":"https://api.github.com/repos/drush-ops/drush/issues/3511/labels{/name}","comments_url":"https://api.github.com/repos/drush-ops/drush/issues/3511/comments","events_url":"https://api.github.com/repos/drush-ops/drush/issues/3511/events","html_url":"https://github.com/drush-ops/drush/issues/3511","id":313517888,"number":3511,"title":"Module-provided sql-dump hooks not fully recognized","user":{"login":"axel-rutz","id":15613398,"avatar_url":"https://avatars2.githubusercontent.com/u/15613398?v=4","gravatar_id":"","url":"https://api.github.com/users/axel-rutz","html_url":"https://github.com/axel-rutz","followers_url":"https://api.github.com/users/axel-rutz/followers","following_url":"https://api.github.com/users/axel-rutz/following{/other_user}","gists_url":"https://api.github.com/users/axel-rutz/gists{/gist_id}","starred_url":"https://api.github.com/users/axel-rutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axel-rutz/subscriptions","organizations_url":"https://api.github.com/users/axel-rutz/orgs","repos_url":"https://api.github.com/users/axel-rutz/repos","events_url":"https://api.github.com/users/axel-rutz/events{/privacy}","received_events_url":"https://api.github.com/users/axel-rutz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-04-11T23:07:23Z","updated_at":"2018-04-17T20:24:53Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"* I have declared an option in a hook like described [here](https://github.com/consolidation/annotated-command#option-event-hook): _Static options may be added via the @option annotation on any hook that uses them._\r\n* This option is shown in drush help\r\n* calling the command errors out though and --gdpr is not shown in the symfony command summary\r\n\r\n[Code](https://cgit.drupalcode.org/sandbox-axel.rutz-2960256/commit/?id=665699c):\r\n```\r\n  /**\r\n   * @hook init sql:dump\r\n   * @option $gdpr Make a gdpr compliant db dump or sync by obfuscating data.\r\n   * @default $gdpr false\r\n   */\r\n  public function initializeDump(InputInterface $input, AnnotationData $annotationData) {\r\n    if ($input->getOption('gdpr')) {\r\n```\r\n\r\n```\r\n$ drush help sql-dump\r\nExports the Drupal DB as SQL using mysqldump or equivalent.\r\n...\r\n  --gdpr                                        Make a gdpr compliant db dump or sync by obfuscating data.                                                                                            \r\n\r\nAliases: sql-dump\r\n\r\n```\r\n\r\n\r\n```\r\n$ drush sql-dump --tables-list=users_field_data --gdpr -vvv\r\n [preflight] Config paths: /var/www/html/vendor/drush/drush/drush.yml,/var/www/html/drush/drush.yml\r\n [preflight] Alias paths: /var/www/html/web/drush/sites,/var/www/html/drush/sites\r\n [preflight] Commandfile search paths: /var/www/html/vendor/drush/drush/src,/var/www/html/drush/Commands\r\n\r\nIn DrushArgvInput.php line 228:\r\n                                                          \r\n  [Symfony\\Component\\Console\\Exception\\RuntimeException]  \r\n  The \"--gdpr\" option does not exist.                     \r\n                                                          \r\n\r\nException trace:\r\n Drush\\Symfony\\DrushArgvInput->addLongOption() at /var/www/html/vendor/drush/drush/src/Symfony/DrushArgvInput.php:164\r\n Drush\\Symfony\\DrushArgvInput->parseLongOption() at /var/www/html/vendor/drush/drush/src/Symfony/DrushArgvInput.php:88\r\n Drush\\Symfony\\DrushArgvInput->parse() at /var/www/html/vendor/symfony/console/Input/Input.php:55\r\n Symfony\\Component\\Console\\Input\\Input->bind() at /var/www/html/vendor/symfony/console/Command/Command.php:210\r\n Symfony\\Component\\Console\\Command\\Command->run() at /var/www/html/vendor/symfony/console/Application.php:964\r\n Symfony\\Component\\Console\\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:248\r\n Symfony\\Component\\Console\\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:148\r\n Symfony\\Component\\Console\\Application->run() at /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php:112\r\n Drush\\Runtime\\Runtime->doRun() at /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php:41\r\n Drush\\Runtime\\Runtime->run() at /var/www/html/vendor/drush/drush/drush.php:66\r\n require() at /var/www/html/vendor/drush/drush/drush:4\r\n\r\nsql:dump [--result-file RESULT-FILE] [--create-db] [--data-only] [--ordered-dump] [--gzip] [--extra EXTRA] [--extra-dump EXTRA-DUMP] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--database [DATABASE]] [--target [TARGET]] [--db-url DB-URL] [--skip-tables-key SKIP-TABLES-KEY] [--structure-tables-key STRUCTURE-TABLES-KEY] [--tables-key TABLES-KEY] [--skip-tables-list SKIP-TABLES-LIST] [--structure-tables-list STRUCTURE-TABLES-LIST] [--tables-list TABLES-LIST] [--xh-link XH-LINK] [--notify [NOTIFY]] [--druplicon] [--] <command>\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/drush-ops/drush/issues/comments/382130141","html_url":"https://github.com/drush-ops/drush/issues/3511#issuecomment-382130141","issue_url":"https://api.github.com/repos/drush-ops/drush/issues/3511","id":382130141,"user":{"login":"weitzman","id":7740,"avatar_url":"https://avatars0.githubusercontent.com/u/7740?v=4","gravatar_id":"","url":"https://api.github.com/users/weitzman","html_url":"https://github.com/weitzman","followers_url":"https://api.github.com/users/weitzman/followers","following_url":"https://api.github.com/users/weitzman/following{/other_user}","gists_url":"https://api.github.com/users/weitzman/gists{/gist_id}","starred_url":"https://api.github.com/users/weitzman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weitzman/subscriptions","organizations_url":"https://api.github.com/users/weitzman/orgs","repos_url":"https://api.github.com/users/weitzman/repos","events_url":"https://api.github.com/users/weitzman/events{/privacy}","received_events_url":"https://api.github.com/users/weitzman/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T20:24:53Z","updated_at":"2018-04-17T20:24:53Z","author_association":"OWNER","body":"I'm most open to a docs change here. Code changes would be considered too."}}
{"actor":{"display_login":"weitzman"}}