keyboardcowboy / drush-denver Goto Github PK
View Code? Open in Web Editor NEWDrush plugin to quickly and easily personalize your Drupal site per environment.
License: GNU General Public License v2.0
Drush plugin to quickly and easily personalize your Drupal site per environment.
License: GNU General Public License v2.0
Multisite environment definitions are not currently recognized when using aliases.
The screen gets really cluttered when running large commands due to the summary printing before the prompt, then each component being run.
We should add a delimiter after the prompt and add an option to hide the summary so it doesn't pollute the logs when run in automated commands.
Add a section so drush commands can also be run in sequence, such as drush fra
and drush cc all
The --groups
option may be specified to run only certain components of a definition. However, the full definition is still displayed when that option is used, which can mislead the user.
Input prompts and errors are OK.
Just like we can set composite env-defs (drush env local+chris
), we should be able to inspect them this way to see everything that the command will run.
Allow sections to be run separately. For example, the command
drush env dev --run=perms
would run just the permissions settings.
Chris: ✗ drush env devify --groups=commands
PHP Fatal error: Unsupported operand types in /Users/Chris/.drush/plugins/dev/denver/Denver.class.php on line 615
Drush aliases use the @
, which is protected in YAML parsing. The tests included in this package contain unquoted aliases. These need to be quoted to prevent the following error:
exception 'Symfony\Component\Yaml\Exception\ParseException' with message 'The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 11 (near "alias: @test").' in /app/vendor/symfony/yaml/Inline.php:353 [error]
Stack trace:
#0 /app/vendor/symfony/yaml/Inline.php(125): Symfony\Component\Yaml\Inline::parseScalar('@test', 0, NULL, 5, true, Array)
#1 /app/vendor/symfony/yaml/Parser.php(783): Symfony\Component\Yaml\Inline::parse('@test', 0, Array)
#2 /app/vendor/symfony/yaml/Parser.php(387): Symfony\Component\Yaml\Parser->parseValue('@test', 0, 'mapping')
#3 /app/vendor/symfony/yaml/Parser.php(504): Symfony\Component\Yaml\Parser->doParse('alias: @test\nar...', 0)
#4 /app/vendor/symfony/yaml/Parser.php(365): Symfony\Component\Yaml\Parser->parseBlock(10, 'alias: @test\nar...', 0)
#5 /app/vendor/symfony/yaml/Parser.php(504): Symfony\Component\Yaml\Parser->doParse('# Longform synt...', 0)
#6 /app/vendor/symfony/yaml/Parser.php(365): Symfony\Component\Yaml\Parser->parseBlock(8, '# Longform synt...', 0)
#7 /app/vendor/symfony/yaml/Parser.php(141): Symfony\Component\Yaml\Parser->doParse('modules:\n enab...', 0)
#8 /app/vendor/symfony/yaml/Yaml.php(111): Symfony\Component\Yaml\Parser->parse('modules:\n enab...', 0)
#9 /app/docroot/sites/all/drush/commands/drush-denver/Denver.class.php(672): Symfony\Component\Yaml\Yaml::parse('modules:\n enab...')
#10 /app/docroot/sites/all/drush/commands/drush-denver/Denver.class.php(654): Denver->extractEnv('/app/docroot/si...')
#11 /app/docroot/sites/all/drush/commands/drush-denver/Denver.class.php(639): Denver->loadEnvFile(Object(stdClass))
#12 /app/docroot/sites/all/drush/commands/drush-denver/Denver.class.php(49): Denver->findEnvironments()
#13 /app/docroot/sites/all/drush/commands/drush-denver/environment.drush.inc(67): Denver->__construct()
#14 [internal function]: drush_environment('reset')
#15 /app/vendor/drush/drush/includes/command.inc(422): call_user_func_array('drush_environme...', Array)
#16 /app/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#17 [internal function]: drush_command('reset')
#18 /app/vendor/drush/drush/includes/command.inc(199): call_user_func_array('drush_command', Array)
#19 /app/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#20 /app/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#21 /app/vendor/drush/drush/drush.php(12): drush_main()
#22 {main}
Use a formatter instead of drush_print_r
It would be nice if we could edit a definition either by using the drush config
command or by passing an argument like drush env chris --edit
Currently we get two:
Chris: ✗ drush env asdf
Unable to locate an environment definition for 'asdf'. [error]
There was an error building the definition for 'asdf'.
Add a -y
option to module enable/disable actions so they don't require a specific prompt.
PHP is nice in that it lets us nest commands under a category. INFO files are nice in that they are simple, readable text. YAML is a nice combination of both, but requires extra modules to work.
Can/should we allow multiple formats?
Single site installations should use 'all' instead of 'default' to contain drush files
Just like you can export a component to a feature, I'd like to be able to export module status, variable values and permissions to an environment definition.
Instead of calling drush env-list
to inspect environments, call drush env-info
. This makes more sense when inspecting a definition like drush env-info <env>
.
Currently, the way the definitions are loaded, the command name is the key of the command array, meaning each command can only be listed once. There are cases where we might want to run the same command with different parameters in a single definition.
There is a slight workaround where, if a command has an alias, you can use the alias as a second command.
Modules:
Unknown option: --groups. See `drush help pm-enable` for available options. To suppress this error, add the option --strict=0. [error]
Currently when you run $ drush env-list
, the example and test environments show in the list. We don't want those to show during regular execution, but we do need them for unit testing.
Add a confirmation prompt when a user attempts to execute an env definition. This can be overridden by passing in -y
to the command.
Current command notation is very terse.
Ex.
commands:
command-name:
@site.alias
arguments:
arg1: value
options:
opt1: value
opt2:
- item1
- item2
This could be simplified by using the notation we are already familiar with to identify args, opts and aliases.
Ex.
commands:
command-name:
@site.alias
arg1: value
arg2: value
--opt1: value
--opt2:
- item1
- item2
Some settings are globally consistent, such as turning off caching on development boxes, and should be placed in /etc/drush or ~/.drush so they are available to all projects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.