Speeding up Drupal 8 development using
Drupal Console


http://bit.ly/console-midcamp2015


About me



Jesus Manuel Olivas

Drupal 8 Solutions Engineer

I work for Blink Reaction

(and you should too)

What is the Drupal Console?

The Drupal Console is a suite of tools that you run on a command line interface (CLI) to generate boilerplate code and interact with a Drupal 8 installation.

Who started this?


David Flores ‏

@dmouse

Jesús Manuel Olivas

@jmolivas

Who else is maintainig it?


Eduardo García

@enzolutions

Omar Aguirre

@omers

But you can blame Crell aka Larry


Why should you care about it?

Drupal learning curve


Drupal 8 learning curve


A lot of new concepts


A lot of code to write


A lot of directories & files


How does Drupal Console help?

Generating the code and files required by a Drupal 8 module.


Interacting with your Drupal installation.


Outputing verbose-code with comments and links to the documentation.

The goal of Drupal Console is provide a tool easy to use for everyone, from developers currently using Drupal 8 and those who are planning to learn.

Are there similar tools?



Module Builder
https://www.drupal.org/project/module_builder



Drupal Module Upgrader
https://www.drupal.org/project/drupalmoduleupgrader

What makes Drupal Console unique?


Follow the principles and practices introduced with Drupal 8.

You can use it to learn Drupal 8.

Multi-language capabilities.

No plans to support previous versions of Drupal.

Where do I find the project?

Code


Project Landing page

http://drupalconsole.com/


Do you have a Drupal user account?

https://drupal.org/project/console


Do you have a Github account?

http://bit.ly/console-code

Documentation & support


Documentation book at:

http://bit.ly/console-book



Please RTFM and then ping us at:

http://bit.ly/console-chat

Download Drupal Console

Using the Installer


Install the Console locally by running the installer
in your project directory:



$ curl -LSs http://drupalconsole.com/installer | php

Access console from anywhere on your system


$ mv console.phar /usr/local/bin/drupal

You can now execute console using:


$ drupal

Using Composer


You can use composer to install console globally using the following command:


$ composer global require drupal/console:@stable

Add the binary directory to your class path


$ echo "PATH=$PATH:~/.composer/vendor/bin" > ~/.bash_profile

You can now execute console using:


$ console

Download the phar file


You can download the latest version of Console from the repository releases page at:


http://bit.ly/console-releases


Make sure you download the console.phar file from the most current release.


$ php console.phar

Updating the project


The easiest and recommended way of updating Console is using the self-update command.


Depending on the download method:



$ drupal self-update

$ console self-update

$ php console.phar self-update

What can you do with

Drupal Console?

Generate the code and files

required by a Drupal 8 module.

generate:module


generate:form:config


generate:plugin:block


generate:entity:content


Interact with your Drupal

installation.

site:status


site:maintenance


config


debug


Learn Drupal 8.

Using --learning option

Write an integration

generate:command


webprofiler


https://www.drupal.org/project/webprofiler

How to contribute?

Contribute code

http://bit.ly/console-code


Contribute documentation

http://bit.ly/console-book


Contribute translations

http://bit.ly/console-translations

Project Requirements




http://bit.ly/console-project-requirements

Getting the project


Fork your own copy of the Console repository

http://bit.ly/console-fork


Clone your forked repository.


$ git clone git@github.com:[your-git-user-here]/DrupalAppConsole.git


Download dependencies using componser.


$ cd /path/to/DrupalAppConsole
$ composer update --no-dev

Before commiting your code


Project code is PSR-2 Coding Style.

http://www.php-fig.org/psr/psr-2/


Generated code is Drupal Coding Style.

https://www.drupal.org/coding-standards

Code analysis



http://bit.ly/console-insight




http://bit.ly/console-travis

Code Analysis and tools.


PHPUnit - PHP Testing Framework
https://phpunit.de/


PHP Coding Standards Fixer
http://cs.sensiolabs.org/


A pre-commit git hook, for running PHPUnit & PHP Coding Standards Fixer.


JoliCi - Run your TravisCi builds locally
https://github.com/jolicode/JoliCi

Contributors


Supporting organizations





Spread the word and love.


@drupalconsole | #drupalconsole

Roadmap


Increase code coverage.

Improve documentation and translations.

Improve verbose code-output.

Site alias implementation.

Dummy content generation.

Content staging export/import.

One more thing

GUI for the CLI.

Questions & Feedback


Feel free to stalk me and ask any question during MidCamp or ping me at:


@jmolivas | @drupalconsole


Rate this talk

https://joind.in/13812


Presentation slides:

http://bit.ly/console-midcamp2015