Change record status: 
Project: 
Introduced in branch: 
master
Introduced in version: 
7.x-5.0
Description: 

Drush now errors when user provides an undeclared option. This is nice, as drush won't now run a command that is kinda sorta similar to what the user intended.

Commandfile authors must now declare all their options in command definition. An option's value may be a string, or an array is also supported with the following keys:

  1. allow-additional-options: If TRUE, option checking is disabled for this command. An example of where this is done includes the core-rsync command, which passes options along to the rsync shell command. The value may also be a simple array of commandnames in which case all options in those commands are valid when calling the current command. Useful when your command calls into another.
  2. hidden: These options are valid but are not shown by help command.

If your commandfile introduces a new option for one or more existing commands, use drush_hook_help_alter () to declare it. For an example, see examples/policy.drush.inc

Impacts: 
Site builders, administrators, editors
Module developers