SlideShare a Scribd company logo
How to Use the Command
Line to Increase Speed of
Development
Dave Myburgh
Senior Engineer and
Team Lead on www.acquia.com
About Me
● Dave Myburgh
● Team lead for www.acquia.com, training, dev, engage
● Most recently worked on docs D6 -> D8 update
● 10 years of Drupal
● First site in 4.7 and it's still running :)
● Started on PC, now on Mac
● From DOS to Terminal (autoexec.bat to .bash_profile)
What we will cover
● Pimp out that prompt for Git
● Bash profile
● Aliases
● Drush
● File editing
● SASS & Compass
● Drupal 8 & Composer
Pimp my prompt
● Git on the command line
● .git-completion.bash
https://github.
com/git/git/blob/master/contrib/completion/git-
completion.bash
● .git-prompt.sh
http://git-prompt.sh
source ~/.git-completion.bash
source ~/.git-prompt.sh
export PS1="[fun_stuff_here]"
export PS1='[t]:w[033[0;32m]$(__git_ps1 " (%s)")[033[0;0m]$ ';
time path start
green
THE
MAGIC
end
green
For more prompt styling: https://wiki.archlinux.org/index.php/Bash/Prompt_customization
PS1 = main/primary prompt
Bash profile
● .bash_profile on Mac, .bash_rc on Linux
● aliases
e.g. alias l="ls =al"
● directory listing colors
e.g. export LSCOLORS=GxFxCxDxBxegedabagacad
● setting paths to programs:
export PATH="$PATH:/Applications/Dev Desktop/drush"
Bash profile (cont.)
● custom functions
Convert an mp4 video file into an mp3:
mp4-mp3() {
# ${1%.*} returns only the filename, not the extension.
ffmpeg -i "$1" -f mp3 -ab 192000 -vn "${1%.*}".mp3
}
● lots more out there:
http://blog.taylormcgann.com/2012/06/13/customize-your-shell-command-prompt
Bash profile: Aliases
● TIP: separate file for aliases, load from .bash_profile
source ~/.aliases
● some of favorites:
alias l="ls -al"
alias dev="cd ~/Sites/devdesktop/acquiacom-dev/docroot"
alias gitb="git branch"
alias gits="git status"
alias ssh-ac-dev="ssh
[user].dev@[server].network.hosting.acquia.com"
alias fixwebcam="sudo killall VDCAssistant"
Drush
● The Drupal shell (http://www.drush.org)
● command line shell and scripting interface
● ships with lots of useful commands
● Drupal modules can add more commands
e.g. Backup & Migrate
● THE most useful command line utility for Drupal
Drush (cont.)
● Two main ways to get it:
○ Acquia Dev Desktop (Mac & Win)
○ install globally for your computer via command line:
$ wget http://files.drush.org/drush.phar
$ chmod +x drush.phar
$ sudo mv drush.phar /usr/local/bin/drush
● http://docs.drush.org/en/master/install for more help
Drush (cont.)
● Some of the most used commands:
$ drush cc [all] (clear all caches)
$ drush dl [module_name]
$ drush en [module_name]
$ drush updb (run update.php)
$ drush sql-cli (login to mysql)
$ drush sql-connect (show mysql connection string)
$ drush uli [username] (user login)
$ drush sa (show site aliases)
$ drush @acquia.prod cc all (clear caches on acquia)
$ drush up [module_name] (update modules)
Drush (cont.)
● Some Drupal 8 changes & additions:
$ drush cc all (clear all caches)
=> drush cr (cache rebuild)
$ drush dis [module_name] (disable module)
=> drush pm-uninstall (also used in D7 & below)
$ drush config-export / cex (export config)
$ drush config-import / cim (import config)
$ drush config-pull (copy config to new env)
$ drush up drupal!!
and many, many more...
$ drush
$ drush help [command]
Drush (cont.)
● Acquia Dev Desktop:
to avoid this:
Command xxxx needs a higher bootstrap level to run...
File Editing
● Vi (Vim), Nano, Emacs, etc.
● Personal favorite is nano
● Similar commands like DOS editors: Ctrl-[key]
● No typing : before commands
● Tip: show line numbers all the time (else nano -c)
.nanorc:
set const
● Some people use Vim for all editing, instead of an IDE
like PHPStorm
SASS & Compass
● Syntactically Awesome StyleSheets
● extension of CSS, so regular CSS is 100% valid
● get to use variables, nested rules, mixins (functions)
● files use .scss extension
● create separate files for regions/content types/whatever
and they all get loaded by one file
● http://sass-lang.com
● https://smacss.com (scalable and modular architecture)
SASS & Compass (cont.)
● Compass is a CSS authoring framework that uses
SASS
● provides many useful mixins (functions)
● basically, it compiles your SASS files into actual CSS
● compass watch will monitor changes to your .scss
files and rebuild the .css file
● requires Ruby and a config.rb file in theme folder
● http://compass-style.org
SASS & Compass (cont.)
Example:
sass/style.scss:
@import 'components/base';
sass/components/_base.scss:
$blue: #29aee1;
a {
color: $blue;
&:hover {
color: darken($blue, 10%);
}
}
SASS & Compass (cont.)
Example:
styles/style.css:
a { color: #29aae1; }
a:hover { color: #1a90bd; }
$ compass watch (to constantly monitor for changes)
$ compass compile (to manually update changes)
SASS & Compass (cont.)
● SO much more...
● https://rvm.io/rvm/install (Ruby installation via RVM)
● http://www.ruby-lang.org/en/documentation/installation
(regular Ruby install)
● http://sass-lang.com
● http://compass-style.org
● https://smacss.com
Drupal 8 & Composer
● new way of managing site dependencies
● Composer Manager module is a helper module with a
Drupal UI too (requires Composer command-line tool:
https://getcomposer.org)
● can replace drush make or work with it
● some modules now use composer for their
dependencies - look for composer.json file
● https://www.drupal.
org/documentation/install/composer-dependencies
Drupal 8 & Composer (cont.)
● so what's the workflow with composer?
● recommended to install composer_manager module,
which will automatically update root composer.json
with a module's requirements:
$ drush dl composer_manager
$ php modules/composer_manager/scripts/init.php
● then download your module(s) and run:
$ composer drupal-update
● all dependencies, including core, will get updated
Drupal 8 & Composer (cont.)
● without Composer Manager, you can manually edit root
composer.json to add modules, run composer
update to then download the module and its
dependencies
● Note: vendor directory will get updated often! Don't
worry, those dependencies are restricted to certain
versions in core/composer.json, so things won't
break e.g.
"jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
(i.e. >=0.3.1 and <0.4)
Q & A
Thank You!

More Related Content

PDF
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
PDF
Drupal 8 improvements for developer productivity php symfony and more
PDF
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
PDF
Terminus, the Pantheon command-line interface
PDF
Drupal 8: frontend development
PDF
Using Composer with Drupal and Drush
PDF
Drupal 8 Theme System: The Backend of Frontend
PDF
Puppet Camp Ghent 2013
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Drupal 8 improvements for developer productivity php symfony and more
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Terminus, the Pantheon command-line interface
Drupal 8: frontend development
Using Composer with Drupal and Drush
Drupal 8 Theme System: The Backend of Frontend
Puppet Camp Ghent 2013

What's hot (20)

PDF
Writing and Publishing Puppet Modules
PDF
Composer Tools & Frameworks for Drupal
PDF
Composer & Drupal
PDF
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
PDF
Ninja Build: Simple Guide for Beginners
PDF
Speed up Drupal development with Drush
PDF
Docker as development environment
PDF
Drush in the Composer Era
PDF
COMO CRIAR O TEU STARTUP PROJECT E SETUP DO TEU AMBIENTE DE DESENVOLVIMENTO D...
PDF
Headless approach and Acquia - Case study - Chris Ozog
PDF
Development Workflow Tools for Open-Source PHP Libraries
PDF
Using Backbone.js with Drupal 7 and 8
PDF
CI workflow in a web studio
PDF
Configuration Kits - DrupalCamp NYC 2021
PDF
Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...
PDF
Frontend JS workflow - Gulp 4 and the like
PDF
Towards the perfect Drupal Dev Machine
PPTX
JavaScript Task Runners - Gulp & Grunt
PDF
Beginning Jquery In Drupal Theming
PPTX
Grunt and Bower
Writing and Publishing Puppet Modules
Composer Tools & Frameworks for Drupal
Composer & Drupal
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Ninja Build: Simple Guide for Beginners
Speed up Drupal development with Drush
Docker as development environment
Drush in the Composer Era
COMO CRIAR O TEU STARTUP PROJECT E SETUP DO TEU AMBIENTE DE DESENVOLVIMENTO D...
Headless approach and Acquia - Case study - Chris Ozog
Development Workflow Tools for Open-Source PHP Libraries
Using Backbone.js with Drupal 7 and 8
CI workflow in a web studio
Configuration Kits - DrupalCamp NYC 2021
Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...
Frontend JS workflow - Gulp 4 and the like
Towards the perfect Drupal Dev Machine
JavaScript Task Runners - Gulp & Grunt
Beginning Jquery In Drupal Theming
Grunt and Bower
Ad

Viewers also liked (15)

PPTX
Northwell Health: How Digital Technology Laid the Foundation for a Brand Over...
DOC
Variabel, Struktur Keputusan dan Alih Kontrol
PDF
Health problems associated with aging
PDF
How Financial Services Firms are Using Digital to Improve the Customer Experi...
PPTX
Ask Us Anything: Dries Buytaert and Team Tell All on Drupal 8
PDF
Achizitii noi februarie 2016
PDF
Make B. Tropical Colors
PPT
Malattie dermatologiche
PDF
Short case...Intramedullary cystic spinal cord metastasis
PPTX
The Essay: Introductions
PPTX
The Essay: Body, Conclusion, and Titles
PDF
Meta-Studie Führungskompetenzen für die digitale Transformation – oder: Warum...
PPTX
Bias vs Variance
PPTX
Decoupled Drupal Showcase: Using Drupal to Power Digital Signage
Northwell Health: How Digital Technology Laid the Foundation for a Brand Over...
Variabel, Struktur Keputusan dan Alih Kontrol
Health problems associated with aging
How Financial Services Firms are Using Digital to Improve the Customer Experi...
Ask Us Anything: Dries Buytaert and Team Tell All on Drupal 8
Achizitii noi februarie 2016
Make B. Tropical Colors
Malattie dermatologiche
Short case...Intramedullary cystic spinal cord metastasis
The Essay: Introductions
The Essay: Body, Conclusion, and Titles
Meta-Studie Führungskompetenzen für die digitale Transformation – oder: Warum...
Bias vs Variance
Decoupled Drupal Showcase: Using Drupal to Power Digital Signage
Ad

Similar to How to Use the Command Line to Increase Speed of Development (20)

PDF
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
PPT
Drush. Why should it be used?
PDF
Pavlenko Sergey. Drush: using and creating custom commands. DrupalCamp Kyiv 2011
ODP
Drupal Theme Development - DrupalCon Chicago 2011
PPTX
Drush for drupal website builder
PDF
Development Setup of B-Translator
PDF
A Drush Primer - DrupalCamp Chattanooga 2013
PPT
Drush&drupal. administration
PDF
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
PPTX
Drupal Deployment Troubles and Problems
PPTX
Dc kyiv2010 jun_08
PPTX
Toolbox of a Ruby Team
PDF
Ajax Performance Tuning and Best Practices
PPT
Drush and drupal. администрирование волчек михаил
PPT
Drush and drupal. администрирование. Волчек Михаил
PDF
Miscelaneous Debris
PDF
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
PPT
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
PDF
Death of a Themer
PPTX
Deployment with Fabric
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Drush. Why should it be used?
Pavlenko Sergey. Drush: using and creating custom commands. DrupalCamp Kyiv 2011
Drupal Theme Development - DrupalCon Chicago 2011
Drush for drupal website builder
Development Setup of B-Translator
A Drush Primer - DrupalCamp Chattanooga 2013
Drush&drupal. administration
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Deployment Troubles and Problems
Dc kyiv2010 jun_08
Toolbox of a Ruby Team
Ajax Performance Tuning and Best Practices
Drush and drupal. администрирование волчек михаил
Drush and drupal. администрирование. Волчек Михаил
Miscelaneous Debris
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Death of a Themer
Deployment with Fabric

More from Acquia (20)

PDF
Acquia_Adcetera Webinar_Marketing Automation.pdf
PDF
Acquia Webinar Deck - 9_13 .pdf
PDF
Taking Your Multi-Site Management at Scale to the Next Level
PDF
CDP for Retail Webinar with Appnovation - Q2 2022.pdf
PDF
May Partner Bootcamp 2022
PDF
April Partner Bootcamp 2022
PDF
How to Unify Brand Experience: A Hootsuite Story
PDF
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
PDF
Improve Code Quality and Time to Market: 100% Cloud-Based Development Workflow
PDF
September Partner Bootcamp
PDF
August partner bootcamp
PDF
July 2021 Partner Bootcamp
PDF
May Partner Bootcamp
PDF
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
PDF
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
PDF
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
PDF
April partner bootcamp deck cookieless future
PDF
How to enhance cx through personalised, automated solutions
PDF
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
PDF
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021
Acquia_Adcetera Webinar_Marketing Automation.pdf
Acquia Webinar Deck - 9_13 .pdf
Taking Your Multi-Site Management at Scale to the Next Level
CDP for Retail Webinar with Appnovation - Q2 2022.pdf
May Partner Bootcamp 2022
April Partner Bootcamp 2022
How to Unify Brand Experience: A Hootsuite Story
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
Improve Code Quality and Time to Market: 100% Cloud-Based Development Workflow
September Partner Bootcamp
August partner bootcamp
July 2021 Partner Bootcamp
May Partner Bootcamp
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
April partner bootcamp deck cookieless future
How to enhance cx through personalised, automated solutions
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Tartificialntelligence_presentation.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation_ Review paper, used for researhc scholars
Programs and apps: productivity, graphics, security and other tools
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology
NewMind AI Weekly Chronicles - August'25-Week II
Tartificialntelligence_presentation.pptx
A Presentation on Artificial Intelligence
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A comparative analysis of optical character recognition models for extracting...
Group 1 Presentation -Planning and Decision Making .pptx
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation theory and applications.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf

How to Use the Command Line to Increase Speed of Development

  • 1. How to Use the Command Line to Increase Speed of Development Dave Myburgh Senior Engineer and Team Lead on www.acquia.com
  • 2. About Me ● Dave Myburgh ● Team lead for www.acquia.com, training, dev, engage ● Most recently worked on docs D6 -> D8 update ● 10 years of Drupal ● First site in 4.7 and it's still running :) ● Started on PC, now on Mac ● From DOS to Terminal (autoexec.bat to .bash_profile)
  • 3. What we will cover ● Pimp out that prompt for Git ● Bash profile ● Aliases ● Drush ● File editing ● SASS & Compass ● Drupal 8 & Composer
  • 4. Pimp my prompt ● Git on the command line ● .git-completion.bash https://github. com/git/git/blob/master/contrib/completion/git- completion.bash ● .git-prompt.sh http://git-prompt.sh source ~/.git-completion.bash source ~/.git-prompt.sh export PS1="[fun_stuff_here]"
  • 5. export PS1='[t]:w[033[0;32m]$(__git_ps1 " (%s)")[033[0;0m]$ '; time path start green THE MAGIC end green For more prompt styling: https://wiki.archlinux.org/index.php/Bash/Prompt_customization PS1 = main/primary prompt
  • 6. Bash profile ● .bash_profile on Mac, .bash_rc on Linux ● aliases e.g. alias l="ls =al" ● directory listing colors e.g. export LSCOLORS=GxFxCxDxBxegedabagacad ● setting paths to programs: export PATH="$PATH:/Applications/Dev Desktop/drush"
  • 7. Bash profile (cont.) ● custom functions Convert an mp4 video file into an mp3: mp4-mp3() { # ${1%.*} returns only the filename, not the extension. ffmpeg -i "$1" -f mp3 -ab 192000 -vn "${1%.*}".mp3 } ● lots more out there: http://blog.taylormcgann.com/2012/06/13/customize-your-shell-command-prompt
  • 8. Bash profile: Aliases ● TIP: separate file for aliases, load from .bash_profile source ~/.aliases ● some of favorites: alias l="ls -al" alias dev="cd ~/Sites/devdesktop/acquiacom-dev/docroot" alias gitb="git branch" alias gits="git status" alias ssh-ac-dev="ssh [user].dev@[server].network.hosting.acquia.com" alias fixwebcam="sudo killall VDCAssistant"
  • 9. Drush ● The Drupal shell (http://www.drush.org) ● command line shell and scripting interface ● ships with lots of useful commands ● Drupal modules can add more commands e.g. Backup & Migrate ● THE most useful command line utility for Drupal
  • 10. Drush (cont.) ● Two main ways to get it: ○ Acquia Dev Desktop (Mac & Win) ○ install globally for your computer via command line: $ wget http://files.drush.org/drush.phar $ chmod +x drush.phar $ sudo mv drush.phar /usr/local/bin/drush ● http://docs.drush.org/en/master/install for more help
  • 11. Drush (cont.) ● Some of the most used commands: $ drush cc [all] (clear all caches) $ drush dl [module_name] $ drush en [module_name] $ drush updb (run update.php) $ drush sql-cli (login to mysql) $ drush sql-connect (show mysql connection string) $ drush uli [username] (user login) $ drush sa (show site aliases) $ drush @acquia.prod cc all (clear caches on acquia) $ drush up [module_name] (update modules)
  • 12. Drush (cont.) ● Some Drupal 8 changes & additions: $ drush cc all (clear all caches) => drush cr (cache rebuild) $ drush dis [module_name] (disable module) => drush pm-uninstall (also used in D7 & below) $ drush config-export / cex (export config) $ drush config-import / cim (import config) $ drush config-pull (copy config to new env) $ drush up drupal!! and many, many more... $ drush $ drush help [command]
  • 13. Drush (cont.) ● Acquia Dev Desktop: to avoid this: Command xxxx needs a higher bootstrap level to run...
  • 14. File Editing ● Vi (Vim), Nano, Emacs, etc. ● Personal favorite is nano ● Similar commands like DOS editors: Ctrl-[key] ● No typing : before commands ● Tip: show line numbers all the time (else nano -c) .nanorc: set const ● Some people use Vim for all editing, instead of an IDE like PHPStorm
  • 15. SASS & Compass ● Syntactically Awesome StyleSheets ● extension of CSS, so regular CSS is 100% valid ● get to use variables, nested rules, mixins (functions) ● files use .scss extension ● create separate files for regions/content types/whatever and they all get loaded by one file ● http://sass-lang.com ● https://smacss.com (scalable and modular architecture)
  • 16. SASS & Compass (cont.) ● Compass is a CSS authoring framework that uses SASS ● provides many useful mixins (functions) ● basically, it compiles your SASS files into actual CSS ● compass watch will monitor changes to your .scss files and rebuild the .css file ● requires Ruby and a config.rb file in theme folder ● http://compass-style.org
  • 17. SASS & Compass (cont.) Example: sass/style.scss: @import 'components/base'; sass/components/_base.scss: $blue: #29aee1; a { color: $blue; &:hover { color: darken($blue, 10%); } }
  • 18. SASS & Compass (cont.) Example: styles/style.css: a { color: #29aae1; } a:hover { color: #1a90bd; } $ compass watch (to constantly monitor for changes) $ compass compile (to manually update changes)
  • 19. SASS & Compass (cont.) ● SO much more... ● https://rvm.io/rvm/install (Ruby installation via RVM) ● http://www.ruby-lang.org/en/documentation/installation (regular Ruby install) ● http://sass-lang.com ● http://compass-style.org ● https://smacss.com
  • 20. Drupal 8 & Composer ● new way of managing site dependencies ● Composer Manager module is a helper module with a Drupal UI too (requires Composer command-line tool: https://getcomposer.org) ● can replace drush make or work with it ● some modules now use composer for their dependencies - look for composer.json file ● https://www.drupal. org/documentation/install/composer-dependencies
  • 21. Drupal 8 & Composer (cont.) ● so what's the workflow with composer? ● recommended to install composer_manager module, which will automatically update root composer.json with a module's requirements: $ drush dl composer_manager $ php modules/composer_manager/scripts/init.php ● then download your module(s) and run: $ composer drupal-update ● all dependencies, including core, will get updated
  • 22. Drupal 8 & Composer (cont.) ● without Composer Manager, you can manually edit root composer.json to add modules, run composer update to then download the module and its dependencies ● Note: vendor directory will get updated often! Don't worry, those dependencies are restricted to certain versions in core/composer.json, so things won't break e.g. "jcalderonzumba/mink-phantomjs-driver": "~0.3.1", (i.e. >=0.3.1 and <0.4)
  • 23. Q & A