Drupal Contrib

"Get Started" Kit

Negrean Rosian

$ git clone --branch 8.0.x http://git.drupal.org/project/drupal.git drupal8
$ cd drupal8
$ git pull --rebase

Step 1: Getting the repository

Environment Setup

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    ServerName drupal8.local
    ServerAlias drupal8.local

    DocumentRoot /var/www/drupal8
    <Directory /var/www/drupal8>
        Options FollowSymLinks MultiViews
        AllowOverride All
        Allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    <Directory /var/www/drupal8/>
       RewriteEngine on
       RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    </Directory>

    ErrorLog /var/log/apache2/drupal8-error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    FileETag INode MTime Size

    CustomLog /var/log/apache2/drupal8-access.log combined

</VirtualHost>

Step2: Creating the VirtualHost File

Environment Setup

Step 3: Installing Drupal8

Environment Setup

Requirements:

- create sites/default/files folder and make it writable

- create sites/default/settings.php and make it writable

- make sure you have a database already for Drupal8

$ sudo apt-get update
$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer
$ export PATH="$HOME/.composer/vendor/bin:$PATH"
$ source ~/.bash_profile
$ composer
OUTPUT
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.0-dev (790a941cba36842ae74c14c421cbd58200b661ea) 2015-10-01 13:48:22

Usage:
 command [options] [arguments]

Options:
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
 --version (-V)        Display this application version
 --ansi                Force ANSI output
 --no-ansi             Disable ANSI output
 --no-interaction (-n) Do not ask any interactive question
 --profile             Display timing and memory usage information
 --working-dir (-d)    If specified, use the given directory as working directory.

...

Composer

Tools

$ composer global require drush/drush:dev-master
$ composer global update

Drush

Tools

Dreditor Plugin for broswer

Tools

- get it from here: https://dreditor.org/

$ git branch [issue-number]-[issue-description]
$ git checkout [issue-number]-[issue-description]
$ git status
$ git diff 
$ git add new_file.php
$ git commit -a 
$ git diff 8.0.x > [project_name]-[short-description]-[issue-number]-[comment-number]-[drupal-version].patch

Creating a patch

Contributing

$ git branch [issue-number]-[issue-description]
$ git checkout [issue-number]-[issue-description]
$ git apply --index patchname.patch
$ git commit -m "[issue_id]-[old_comment_number]"

$ git checkout -b [issue_id]-[new_comment_number]
OR
$ git checkout 8.0.x
$ git checkout -b [issue_id]-[new_comment_number]

$ git commit -m "[issue_id]-[new_comment_number]"
$ git diff [issue_id]-[old_comment_number] > interdiff-[issue_id]-[old_comment_number]-[new_comment_number].txt
$ git diff 8.0.x > [issue_id]-[new_comment_number].patch

Creating an interdiff

Contributing

rnegrean@rnegrean-nix:/var/www/drupal8$ git submodule add http://git.drupal.org/project/search_api.git modules/contrib/search_api
Cloning into 'modules/contrib/search_api'...
remote: Counting objects: 17010, done.
remote: Compressing objects: 100% (7656/7656), done.
remote: Total 17010 (delta 11153), reused 11977 (delta 7685)
Receiving objects: 100% (17010/17010), 2.89 MiB | 962.00 KiB/s, done.
Resolving deltas: 100% (11153/11153), done.
Checking connectivity... done.

Creating a git submodule

Extra

.gitmodule file create

[submodule "modules/contrib/search_api"]
	path = modules/contrib/search_api
	url = http://git.drupal.org/project/search_api.git

References

- http://whaaat.com/installing-drush-8-using-composer

- https://www.drupal.org/node/707484

- https://dreditor.org/

- https://git-scm.com/book/en/v2/Git-Tools-Submodules

- http://randyfay.com/content/drupal-deployment-git-submodules

Main URLs

drupal.org/documentation

drupal.org/project/[name]

drupal.org/tools

drupal.org/irc

api.drupal.org

association.drupal.org

Presentations

slides.com/negreanrosian-andrei/drupal-contrib-beginners/

 

Register

drupal.org/user/register

Issue queue

drupal.org/project/issues/drupal

dreditor.org

 

Git

drupal.org/project/drupal/git-instructions

Drupal Contrib Beginners

By Negrean Rosian-Andrei

Drupal Contrib Beginners

  • 527