Twig

To day Sunday everning now 09/17/2017

https://youtu.be/J3eVeSpQ9kQ?t=938
https://www.youtube.com/watch?time_continue=8&v=J3eVeSpQ9kQ
https://www.youtube.com/watch?time_continue=8&v=J3eVeSpQ9kQ

twig Introduction to theming for Drupal 8. We'll create a new Drupal 8 theme using Bootstrap built as a child-theme atop the core theme 'Stable'. We'll show how to add Bootstrap downloaded right from getbootstrap.com as a library theme dependency in your D8 theme. Bootstrap is used as an example, but you can user your (micro)framework of choice - e.g. Foundation, bourbon/neat etc. Nothing is Bootstrap specific, we are using it as a well known example. How to correctly configure D8 for twig/theme debugging. There is a lot of terrible information out there. Show how to set up theme debugging correctly (no more $drush cr, $drush cr): Theme debugging comments in the source Disable page caching Additionally, we'll cover: How to work out what templates to use. How to work out what preprocess functions to use. Define your own regions. Define your own js libraries, and only load the js on the pages it's needed - not every page. How theme libraries work in D8. We'll do a quick twig demo, looking at: Filters and control structures Discuss finding the available template variables How to add new ones and pass them to Twig Available preprocessor hooks And more! https://www.drupalasheville.com/2017/... Gold Sponsor: CivicActions - https://civicactions.com

[ 23.09.17 ] segodny echo vtornik
Nachal is etogo , kak na localhost vchera
drupaluser@vera:/opt$ curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer &&
>  cd /var/www/ && composer install --no-plugins --no-scripts
All settings correct for using Composer
Downloading...

Composer (version 1.5.1) successfully installed to: /opt/composer.phar
Use it: php composer.phar

mv: cannot move ‘composer.phar’ to ‘/usr/local/bin/composer’: Permission denied
drupaluser@vera:/opt$ Xotya Permission denied, odnako composer tam
drupaluser@vera:/usr/local/bin$ composer --version
Composer version 1.5.1 2017-08-09 16:07:22
drupaluser@vera:/usr/local/bin$
dalee http://whaaat.com/installing-drush-9-using-composer
///
A teper tak ge na vds, gde sozdal user twigger [ 23.09.17 ]
twigger@host1529592:/usr/bin$ ./drush
bash: ./drush: No such file or directory
twigger@host1529592:/usr/bin$ mc

twigger@host1529592:/usr/bin$ mc

twigger@host1529592:/usr/bin$ cd /opt
twigger@host1529592:/opt$ ls
drush-8.x
twigger@host1529592:/opt$ cd drush-8.x
twigger@host1529592:/opt/drush-8.x$ ls
composer.json  drush  sha_384_string
twigger@host1529592:/opt/drush-8.x$ cd drush
twigger@host1529592:/opt/drush-8.x/drush$ ls
circle.yml       drush.api.php         misc        unish.clean.php
composer.json    drush.info            mkdocs.yml  unish.phpunit.php
CONTRIBUTING.md  drush_logo-black.png  README.md   unish.sut.php
docs             drush.php             src
dr.bat           examples              sut
drush            includes              tests
twigger@host1529592:/opt/drush-8.x/drush$ ./drush
Unable to load autoload.php. Run composer install to fetch dependencies and write autoload.php (http://docs.drush.org/en/master/install/).
twigger@host1529592:/opt/drush-8.x/drush$ cd drush
bash: cd: drush: Not a directory
twigger@host1529592:/opt/drush-8.x/drush$ .drush
bash: .drush: command not found
twigger@host1529592:/opt/drush-8.x/drush$ drush -status
bash: drush: command not found
twigger@host1529592:/opt/drush-8.x/drush$ ./drush -status
Unable to load autoload.php. Run composer install to fetch dependencies and write autoload.php (http://docs.drush.org/en/master/install/).
twigger@host1529592:/opt/drush-8.x/drush$ cd ..
twigger@host1529592:/opt/drush-8.x$ ls
composer.json  drush  sha_384_string
twigger@host1529592:/opt/drush-8.x$ cd drush
twigger@host1529592:/opt/drush-8.x/drush$ ls
circle.yml       drush.api.php         misc        unish.clean.php
composer.json    drush.info            mkdocs.yml  unish.phpunit.php
CONTRIBUTING.md  drush_logo-black.png  README.md   unish.sut.php
docs             drush.php             src
dr.bat           examples              sut
drush            includes              tests
twigger@host1529592:/opt/drush-8.x/drush$ composer require drush
./composer.json is not writable.
twigger@host1529592:/opt/drush-8.x/drush$ ./composer require drush
bash: ./composer: No such file or directory
twigger@host1529592:/opt/drush-8.x/drush$ cd includes
twigger@host1529592:/opt/drush-8.x/drush/includes$ ls
annotationcommand_adapter.inc  context.inc      legacy.inc
backend.inc                    drupal.inc       output.inc
batch.inc                      drush.inc        preflight.inc
bootstrap.inc                  environment.inc  sitealias.inc
cache.inc                      exec.inc         site_install.inc
command.inc                    filesystem.inc
twigger@host1529592:/opt/drush-8.x/drush/includes$ cd ..
twigger@host1529592:/opt/drush-8.x/drush$ ls
circle.yml       drush.api.php         misc        unish.clean.php
composer.json    drush.info            mkdocs.yml  unish.phpunit.php
CONTRIBUTING.md  drush_logo-black.png  README.md   unish.sut.php
docs             drush.php             src
dr.bat           examples              sut
drush            includes              tests
twigger@host1529592:/opt/drush-8.x/drush$ sudo ./drush
sudo: unable to resolve host host1529592
[sudo] password for twigger:
Unable to load autoload.php. Run composer install to fetch dependencies and write autoload.php (http://docs.drush.org/en/master/install/).
twigger@host1529592:/opt/drush-8.x/drush$ sudo composer require drush
sudo: unable to resolve host host1529592
Do not run Composer as root/super user! See https://getcomposer.org/root for details

                                                                               
  [InvalidArgumentException]                                                   
  Could not find package drush at any version for your minimum-stability (sta  
  ble). Check the package spelling or your minimum-stability                   
                                                                               

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

twigger@host1529592:/opt/drush-8.x/drush$ ls
circle.yml       drush.api.php         misc        unish.clean.php
composer.json    drush.info            mkdocs.yml  unish.phpunit.php
CONTRIBUTING.md  drush_logo-black.png  README.md   unish.sut.php
docs             drush.php             src
dr.bat           examples              sut
drush            includes              tests
twigger@host1529592:/opt/drush-8.x/drush$ ./drush
Unable to load autoload.php. Run composer install to fetch dependencies and write autoload.php (http://docs.drush.org/en/master/install/).
twigger@host1529592:/opt/drush-8.x/drush$ sudo ./drush
sudo: unable to resolve host host1529592
[sudo] password for twigger:
Unable to load autoload.php. Run composer install to fetch dependencies and write autoload.php (http://docs.drush.org/en/master/install/).
twigger@host1529592:/opt/drush-8.x/drush$ mc

twigger@host1529592:/opt/drush-8.x/drush$ ./drush
Unable to load autoload.php. Run composer install to fetch dependencies and write autoload.php (http://docs.drush.org/en/master/install/).

twigger@host1529592:/opt/drush-8.x/drush$ ./drush.php
./drush.php: line 1: ?php: No such file or directory
./drush.php: line 2: /bin: Is a directory
./drush.php: line 3: circle.yml: command not found
./drush.php: line 4: circle.yml: command not found
./drush.php: line 5: circle.yml: command not found
./drush.php: line 6: circle.yml: command not found
./drush.php: line 7: docs/: Is a directory
./drush.php: line 9: require: command not found
./drush.php: line 10: syntax error near unexpected token `drush_main'
./drush.php: line 10: `exit(drush_main());'

twigger@host1529592:/opt/drush-8.x/drush$ whereis drush
drush:
twigger@host1529592:/opt/drush-8.x/drush$ cd drush
bash: cd: drush: Not a directory
twigger@host1529592:/opt/drush-8.x/drush$ cd ..
twigger@host1529592:/opt/drush-8.x$ whereis drush
drush:
twigger@host1529592:/opt/drush-8.x$ cd ..
twigger@host1529592:/opt$ ls
drush-8.x
twigger@host1529592:/opt$ sudo mkdir example drush
sudo: unable to resolve host host1529592
twigger@host1529592:/opt$ ls
drush  drush-8.x  example
twigger@host1529592:/opt$ sud rm example
bash: sud: command not found
twigger@host1529592:/opt$ sudo rm example
sudo: unable to resolve host host1529592
rm: cannot remove 'example': Is a directory
twigger@host1529592:/opt$ sudo -r rm example
sudo: unable to resolve host host1529592
sudo: example: command not found
twigger@host1529592:/opt$ sudo -rm examle
sudo: unable to resolve host host1529592
sudo: examle: command not found
twigger@host1529592:/opt$ sudo rm -r example
sudo: unable to resolve host host1529592
twigger@host1529592:/opt$ ls
drush  drush-8.x
twigger@host1529592:/opt$ sudo rm -r drush
sudo: unable to resolve host host1529592
twigger@host1529592:/opt$ ls
drush-8.x
twigger@host1529592:/opt$ sudo mkdir exampledrush
sudo: unable to resolve host host1529592
twigger@host1529592:/opt$ ls
drush-8.x  exampledrush
twigger@host1529592:/opt$ sudo mv -r /opt/drush-8.x /exampledrush
sudo: unable to resolve host host1529592
mv: invalid option -- 'r'
Try 'mv --help' for more information.
twigger@host1529592:/opt$ ls
drush-8.x  exampledrush
twigger@host1529592:/opt$ cd exampledrush
twigger@host1529592:/opt/exampledrush$ ls
twigger@host1529592:/opt/exampledrush$ cd .
twigger@host1529592:/opt/exampledrush$ ls
twigger@host1529592:/opt/exampledrush$ cd ..
twigger@host1529592:/opt$ ls
drush-8.x  exampledrush
twigger@host1529592:/opt$ sudo mv /opt/drush-8.x /opt/exampledrush
sudo: unable to resolve host host1529592
twigger@host1529592:/opt$ ls
exampledrush
twigger@host1529592:/opt$ cd exampledrush
twigger@host1529592:/opt/exampledrush$ ls
drush-8.x
twigger@host1529592:/opt/exampledrush$ cd ..
twigger@host1529592:/opt$ ls
exampledrush
twigger@host1529592:/opt$ sudo curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer &&
> >  cd /var/www/ && composer install --no-plugins --no-scripts
sudo: unable to resolve host host1529592
All settings correct for using Composer
The installation directory "/opt" is not writable
twigger@host1529592:/opt$ ls
exampledrush
twigger@host1529592:/opt$ cd ..
twigger@host1529592:/$ ls
bin   etc         lib    lost+found  opt   run   sys  var
boot  home        lib32  media       proc  sbin  tmp  vmlinuz
dev   initrd.img  lib64  mnt         root  srv   usr
twigger@host1529592:/$ ls -la
total 88
drwxr-xr-x 23 root root  4096 Aug  5 01:25 .
drwxr-xr-x 23 root root  4096 Aug  5 01:25 ..
drwxr-xr-x  2 root root  4096 Aug  5 09:46 bin
drwxr-xr-x  3 root root  4096 Aug  5 01:25 boot
drwxr-xr-x 15 root root  3600 Sep 12 05:12 dev
drwxr-xr-x 84 root root  4096 Sep 12 18:41 etc
drwxr-xr-x  4 root root  4096 Sep 12 17:58 home
lrwxrwxrwx  1 root root    32 Aug  5 01:25 initrd.img -> boot/initrd.img-4.4.0-89-generic
drwxr-xr-x 16 root root  4096 Aug  5 11:02 lib
drwxr-xr-x  2 root root  4096 Aug  5 01:25 lib32
drwxr-xr-x  2 root root  4096 Aug  5 01:25 lib64
drwx------  2 root root 16384 Aug  5 01:22 lost+found
drwxr-xr-x  2 root root  4096 Aug  5 01:22 media
drwxr-xr-x  2 root root  4096 Aug  5 01:22 mnt
drwxr-xr-x  3 root root  4096 Sep 12 20:31 opt
dr-xr-xr-x 90 root root     0 Sep 12 05:12 proc
drwx------  8 root root  4096 Sep 12 18:18 root
drwxr-xr-x 18 root root   560 Sep 12 17:27 run
drwxr-xr-x  2 root root  4096 Aug  5 11:02 sbin
drwxr-xr-x  2 root root  4096 Aug  5 01:22 srv
dr-xr-xr-x 13 root root     0 Sep 12 05:12 sys
drwxrwxrwt  9 root root  4096 Sep 12 20:17 tmp
drwxr-xr-x 11 root root  4096 Aug  5 01:25 usr
drwxr-xr-x 12 root root  4096 Aug  5 09:46 var
lrwxrwxrwx  1 root root    29 Aug  5 01:25 vmlinuz -> boot/vmlinuz-4.4.0-89-generic
twigger@host1529592:/$ sudo chmod 777 opt
sudo: unable to resolve host host1529592
twigger@host1529592:/$ ls -la opt
total 12
drwxrwxrwx  3 root root 4096 Sep 12 20:31 .
drwxr-xr-x 23 root root 4096 Aug  5 01:25 ..
drwxr-xr-x  3 root root 4096 Sep 12 20:31 exampledrush
twigger@host1529592:/$ ls
bin   etc         lib    lost+found  opt   run   sys  var
boot  home        lib32  media       proc  sbin  tmp  vmlinuz
dev   initrd.img  lib64  mnt         root  srv   usr
twigger@host1529592:/$ cd opt
twigger@host1529592:/opt$ ls
exampledrush
twigger@host1529592:/opt$ sudo curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer &&
> >  cd /var/www/ && composer install --no-plugins --no-scripts
sudo: unable to resolve host host1529592
All settings correct for using Composer
Downloading...

Composer (version 1.5.2) successfully installed to: /opt/composer.phar
Use it: php composer.phar

mv: replace '/usr/local/bin/composer', overriding mode 0755 (rwxr-xr-x)? yes
mv: cannot move 'composer.phar' to '/usr/local/bin/composer': Permission denied
twigger@host1529592:/opt$ cd /usr/local/bin
twigger@host1529592:/usr/local/bin$ ls
composer  composer.phar
twigger@host1529592:/usr/local/bin$ composer -v
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.5.1 2017-08-09 16:07:22

Usage:
  command [options] [arguments]

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

Available commands:
  about           Shows the short information about Composer.
  archive         Creates an archive of this composer package.
  browse          Opens the package's repository URL or homepage in your browser.
  clear-cache     Clears composer's internal package cache.
  clearcache      Clears composer's internal package cache.
  config          Sets config options.
  create-project  Creates new project from a package into given directory.
  depends         Shows which packages cause the given package to be installed.
  diagnose        Diagnoses the system to identify common errors.
  dump-autoload   Dumps the autoloader.
  dumpautoload    Dumps the autoloader.
  exec            Executes a vendored binary/script.
  global          Allows running commands in the global composer dir ($COMPOSER_HOME).
  help            Displays help for a command
  home            Opens the package's repository URL or homepage in your browser.
  info            Shows information about packages.
  init            Creates a basic composer.json file in current directory.
  install         Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
  licenses        Shows information about licenses of dependencies.
  list            Lists commands
  outdated        Shows a list of installed packages that have updates available, including their latest version.
  prohibits       Shows which packages prevent the given package from being installed.
  remove          Removes a package from the require or require-dev.
  require         Adds required packages to your composer.json and installs them.
  run-script      Runs the scripts defined in composer.json.
  search          Searches for packages.
  self-update     Updates composer.phar to the latest version.
  selfupdate      Updates composer.phar to the latest version.
  show            Shows information about packages.
  status          Shows a list of locally modified packages.
  suggests        Shows package suggestions.
  update          Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.
  validate        Validates a composer.json and composer.lock.
  why             Shows which packages cause the given package to be installed.
  why-not         Shows which packages prevent the given package from being installed.
twigger@host1529592:/usr/local/bin$ composer -version

                                                          
  [Symfony\Component\Console\Exception\RuntimeException]  
  The "-e" option does not exist.                         
                                                          

list [--xml] [--raw] [--format FORMAT] [--] [<namespace>]

twigger@host1529592:/usr/local/bin$ composer status
Composer could not find a composer.json file in /usr/local/bin
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
twigger@host1529592:/usr/local/bin$ sudo composer -v
sudo: unable to resolve host host1529592
[sudo] password for twigger:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.5.1 2017-08-09 16:07:22

Usage:
  command [options] [arguments]

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

Available commands:
  about           Shows the short information about Composer.
  archive         Creates an archive of this composer package.
  browse          Opens the package's repository URL or homepage in your browser.
  clear-cache     Clears composer's internal package cache.
  clearcache      Clears composer's internal package cache.
  config          Sets config options.
  create-project  Creates new project from a package into given directory.
  depends         Shows which packages cause the given package to be installed.
  diagnose        Diagnoses the system to identify common errors.
  dump-autoload   Dumps the autoloader.
  dumpautoload    Dumps the autoloader.
  exec            Executes a vendored binary/script.
  global          Allows running commands in the global composer dir ($COMPOSER_HOME).
  help            Displays help for a command
  home            Opens the package's repository URL or homepage in your browser.
  info            Shows information about packages.
  init            Creates a basic composer.json file in current directory.
  install         Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
  licenses        Shows information about licenses of dependencies.
  list            Lists commands
  outdated        Shows a list of installed packages that have updates available, including their latest version.
  prohibits       Shows which packages prevent the given package from being installed.
  remove          Removes a package from the require or require-dev.
  require         Adds required packages to your composer.json and installs them.
  run-script      Runs the scripts defined in composer.json.
  search          Searches for packages.
  self-update     Updates composer.phar to the latest version.
  selfupdate      Updates composer.phar to the latest version.
  show            Shows information about packages.
  status          Shows a list of locally modified packages.
  suggests        Shows package suggestions.
  update          Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.
  validate        Validates a composer.json and composer.lock.
  why             Shows which packages cause the given package to be installed.
  why-not         Shows which packages prevent the given package from being installed.
twigger@host1529592:/usr/local/bin$ sudo composer -v
sudo: unable to resolve host host1529592
[sudo] password for twigger:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.5.1 2017-08-09 16:07:22

Usage:
  command [options] [arguments]

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

Available commands:
  about           Shows the short information about Composer.
  archive         Creates an archive of this composer package.
  browse          Opens the package's repository URL or homepage in your browser.
  clear-cache     Clears composer's internal package cache.
  clearcache      Clears composer's internal package cache.
  config          Sets config options.
  create-project  Creates new project from a package into given directory.
  depends         Shows which packages cause the given package to be installed.
  diagnose        Diagnoses the system to identify common errors.
  dump-autoload   Dumps the autoloader.
  dumpautoload    Dumps the autoloader.
  exec            Executes a vendored binary/script.
  global          Allows running commands in the global composer dir ($COMPOSER_HOME).
  help            Displays help for a command
  home            Opens the package's repository URL or homepage in your browser.
  info            Shows information about packages.
  init            Creates a basic composer.json file in current directory.
  install         Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
  licenses        Shows information about licenses of dependencies.
  list            Lists commands
  outdated        Shows a list of installed packages that have updates available, including their latest version.
  prohibits       Shows which packages prevent the given package from being installed.
  remove          Removes a package from the require or require-dev.
  require         Adds required packages to your composer.json and installs them.
  run-script      Runs the scripts defined in composer.json.
  search          Searches for packages.
  self-update     Updates composer.phar to the latest version.
  selfupdate      Updates composer.phar to the latest version.
  show            Shows information about packages.
  status          Shows a list of locally modified packages.
  suggests        Shows package suggestions.
  update          Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.
  validate        Validates a composer.json and composer.lock.
  why             Shows which packages cause the given package to be installed.
  why-not         Shows which packages prevent the given package from being installed.
 
twigger@host1529592:$ sudo mv composer.phar /usr/local/bin/composer
twigger@host1529592:$/usr/local/bin$ sed -i 'li export PATH="$HOME/
 .composer/vendor/bin:$PATH", $HOME/.bashrc source $HOME/.bashrc
> eto znachit, chto-to ne tak
///
twigger@host1529592:$ /usr/local/bin$ sudo composer global require drush/drush:dev-master
WOW ! Poshlo.->
twigger@host1529592:/usr/local/bin$ sudo composer global require drush/drush:dev-master
sudo: unable to resolve host host1529592
[sudo] password for twigger:
Changed current directory to /home/twigger/.composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 35 installs, 0 updates, 0 removals
  - Installing webmozart/assert (1.2.0): Downloading (100%)         
  - Installing webmozart/path-util (2.3.0): Downloading (100%)         
  - Installing webflo/drupal-finder (1.0.0): Downloading (100%)         
  - Installing symfony/yaml (v3.3.9): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.5.0): Downloading (100%)         
  - Installing symfony/var-dumper (v3.3.9): Downloading (100%)         
  - Installing symfony/process (v3.3.9): Downloading (100%)         
  - Installing symfony/finder (v3.3.9): Downloading (100%)         
  - Installing symfony/event-dispatcher (v3.3.9): Downloading (100%)         
  - Installing psr/log (1.0.2): Downloading (100%)         
  - Installing symfony/debug (v3.3.9): Downloading (100%)         
  - Installing symfony/console (v3.3.9): Downloading (100%)         
  - Installing symfony/filesystem (v3.3.9): Downloading (100%)         
  - Installing symfony/config (v3.3.9): Downloading (100%)         
  - Installing sebastian/version (1.0.6): Downloading (100%)         
  - Installing jakub-onderka/php-console-color (0.1): Downloading (connecting...Downloading (100%)         
  - Installing jakub-onderka/php-console-highlighter (v0.3.2): Downloading (connDownloading (100%)         
  - Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%)         
  - Installing nikic/php-parser (v3.1.1): Downloading (100%)         
  - Installing psy/psysh (v0.8.11): Downloading (100%)         
  - Installing phpdocumentor/reflection-docblock (2.0.5): Downloading (connectinDownloading (100%)         
  - Installing pear/console_table (v1.3.0): Downloading (100%)         
  - Installing psr/container (1.0.0): Downloading (100%)         
  - Installing container-interop/container-interop (1.2.0): Downloading (connectDownloading (100%)         
  - Installing league/container (2.4.1): Downloading (100%)         
  - Installing consolidation/output-formatters (3.1.11): Downloading (connectingDownloading (100%)         
  - Installing consolidation/log (1.0.3): Downloading (100%)         
  - Installing dflydev/dot-access-data (v1.1.0): Downloading (100%)         
  - Installing grasmash/yaml-expander (1.1.1): Downloading (100%)         
  - Installing consolidation/config (1.0.1): Downloading (100%)         
  - Installing consolidation/annotated-command (2.4.13): Downloading (connectingDownloading (100%)         
  - Installing consolidation/robo (1.1.2): Downloading (100%)         
  - Installing twig/twig (v1.34.4): Downloading (100%)         
  - Installing chi-teck/drupal-code-generator (1.19.0): Downloading (connecting.Downloading (100%)         
  - Installing drush/drush (dev-master c106607): Cloning c106607fbd from cache
symfony/var-dumper suggests installing ext-symfony_debug ()
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
consolidation/robo suggests installing pear/archive_tar (Allows tar archives to be created and extracted in taskPack and taskExtract, respectively.)
consolidation/robo suggests installing henrikbjorn/lurker (For monitoring filesystem changes in taskWatch)
consolidation/robo suggests installing patchwork/jsqueeze (For minifying JS files in taskMinify)
consolidation/robo suggests installing natxet/CssMin (For minifying CSS files in taskMinify)
Writing lock file
Generating autoload files
twigger@host1529592:/usr/local/bin$
<-///
twigger@host1529592:/usr/local/bin/vendor/drush/drush# zapuskay cherez mc , ono pischet
![NOTE] Drupal root not found. Pass --root or a @siteAlias in order to see
        Drupal-secific commands. (ladno, vichogu is roota, i probuyu
twigger@host1529592:/usr/local/bin/vendor/drush/drush$ ./drush status
 PHP binary    : /usr/bin/php5.6                         
 PHP config    : /etc/php/5.6/cli/php.ini                
 PHP OS        : Linux                                   
 Drush script  : /usr/local/bin/vendor/drush/drush/drush
 Drush version : 9.0-dev-gc106607                        
 Drush temp    : /tmp                                    
 Drush configs :                                         
 Drush aliases :                                         
twigger@host1529592:/usr/local/bin$ zdesy drush net
Dalsce is pod root
///
root@host1529592:/usr/local/bin# ls
composer  composer.phar
root@host1529592:/usr/local/bin# sudo composer global require drush/drush:dev-master
sudo: unable to resolve host host1529592
Changed current directory to /root/.composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 15 installs, 1 update, 0 removals
  - Installing webflo/drupal-finder (1.0.0): Downloading (100%)         
  - Installing symfony/process (v3.3.9): Downloading (100%)         
  - Installing symfony/filesystem (v3.3.9): Downloading (100%)         
  - Installing symfony/config (v3.3.2): Downloading (100%)         
  - Installing sebastian/version (1.0.6): Downloading (100%)         
  - Installing psr/container (1.0.0): Downloading (100%)         
  - Installing container-interop/container-interop (1.2.0): Downloading (connectDownloading (100%)         
  - Installing league/container (2.4.1): Downloading (100%)         
  - Installing consolidation/log (1.0.3): Downloading (100%)         
  - Installing dflydev/dot-access-data (v1.1.0): Downloading (100%)         
  - Installing grasmash/yaml-expander (1.1.1): Downloading (100%)         
  - Installing consolidation/config (1.0.1): Downloading (100%)         
  - Installing consolidation/robo (1.1.2): Downloading (100%)         
  - Installing twig/twig (v1.34.4): Downloading (100%)         
  - Installing chi-teck/drupal-code-generator (1.19.0): Downloading (connecting.Downloading (100%)         
  - Removing drush/drush (8.1.13)
  - Installing drush/drush (dev-master c106607): Cloning c106607fbd from cache
consolidation/robo suggests installing pear/archive_tar (Allows tar archives to be created and extracted in taskPack and taskExtract, respectively.)
consolidation/robo suggests installing henrikbjorn/lurker (For monitoring filesystem changes in taskWatch)
consolidation/robo suggests installing patchwork/jsqueeze (For minifying JS files in taskMinify)
consolidation/robo suggests installing natxet/CssMin (For minifying CSS files in taskMinify)
Writing lock file
Generating autoload files
root@host1529592:/usr/local/bin# ls
composer  composer.phar
root@host1529592:/usr/local/bin# ./drush
bash: ./drush: No such file or directory
root@host1529592:/usr/local/bin# mc

root@host1529592:/usr/local/bin# cd /root
root@host1529592:~# ls
root@host1529592:~# ls
root@host1529592:~# ls -la
total 96
drwx------  8 root root  4096 Sep 12 18:18 .
drwxr-xr-x 23 root root  4096 Aug  5 01:25 ..
-rw-------  1 root root 31847 Sep 12 00:21 .bash_history
-rw-r--r--  1 root root  3294 Sep  9 23:31 .bashrc
drwx------  3 root root  4096 Aug  5 09:24 .cache
drwxr-xr-x  4 root root  4096 Sep  9 23:18 .composer
drwx------  3 root root  4096 Aug  5 09:24 .config
drwxr-xr-x  3 root root  4096 Sep  9 22:13 .drush
drwx------  3 root root  4096 Aug  5 09:24 .local
-rw-------  1 root root   908 Sep 11 22:51 .mysql_history
-rw-r--r--  1 root root   148 Aug 17  2015 .profile
-rw-r--r--  1 root root    72 Aug  5 18:44 .selected_editor
drwx------  2 root root  4096 Sep  2 19:56 .ssh
-rw-------  1 root root  7915 Sep 12 18:18 .viminfo
-rw-r--r--  1 root root   171 Sep 10 21:13 .wget-hsts
root@host1529592:~# ./drush
bash: ./drush: No such file or directory
root@host1529592:~# .drush
bash: .drush: command not found
root@host1529592:~# .composer
bash: .composer: command not found
root@host1529592:~# ./composer
bash: ./composer: No such file or directory
root@host1529592:~# ls -la
total 96
drwx------  8 root root  4096 Sep 12 18:18 .
drwxr-xr-x 23 root root  4096 Aug  5 01:25 ..
-rw-------  1 root root 31847 Sep 12 00:21 .bash_history
-rw-r--r--  1 root root  3294 Sep  9 23:31 .bashrc
drwx------  3 root root  4096 Aug  5 09:24 .cache
drwxr-xr-x  4 root root  4096 Sep  9 23:18 .composer
drwx------  3 root root  4096 Aug  5 09:24 .config
drwxr-xr-x  3 root root  4096 Sep  9 22:13 .drush
drwx------  3 root root  4096 Aug  5 09:24 .local
-rw-------  1 root root   908 Sep 11 22:51 .mysql_history
-rw-r--r--  1 root root   148 Aug 17  2015 .profile
-rw-r--r--  1 root root    72 Aug  5 18:44 .selected_editor
drwx------  2 root root  4096 Sep  2 19:56 .ssh
-rw-------  1 root root  7915 Sep 12 18:18 .viminfo
-rw-r--r--  1 root root   171 Sep 10 21:13 .wget-hsts
root@host1529592:~# pwd
/root
root@host1529592:~# drush
Drush Commandline Tool version 9.0-dev-gc106607

Run `drush help [command]` to view command-specific help.  Run `drush topic` to read even more documentation.

 Global options. See `drush topic core-global-options` for the full list.          
 -r, --root=ROOT                      Drupal root directory to use.                
 -l, --uri=URI                        URI of the drupal site to use.               
 -v|vv|vvv, --verbose                 Display extra information about the command.
 -d, --debug                          Display even more information.               
 -y, --yes                            Assume 'yes' as answer to all prompts.       
  --no                                Assume 'no' as answer to all prompts.        
 -h, --help                           This help system.                            
                                                                                   
 Available commands:                                                        
 _global:                                                                   
   help                         Display usage details for a command.        
   list                         List available commands.                    
   runserver (rs)               Runs PHP's built-in http server for         
                                development.                                
   updatedb (updb)              Apply any database updates required (as     
                                with running update.php).                   
   browse                       Display a link to a given path or open link
                                in a browser.                               
   version                      Show Drush version.                         
   generate (gen)               Generate boilerplate code for               
                                modules/plugins/services etc.               
   shell-alias (sha)            Print all known shell alias records.        
   entity-updates (entup)       Apply pending entity schema updates.        
   updatedb-status (updbst)     List any pending database updates.          
   drupal-directory (dd)        Return the filesystem path for              
                                modules/themes and other key folders.       
   user-login (uli)             Display a one time login link for user ID   
                                1, or another user.                         
   config-pull (cpull)          Export and transfer config from one         
                                environment to another.                     
 cache:                                                                     
   cache-get (cg)               Fetch a cached object and display it.       
   cache-clear (cc)             Clear a specific cache, or all Drupal       
                                caches.                                     
   cache-set (cs)               Cache an object expressed in JSON or        
                                var_export() format.                        
   cache-rebuild (cr, rebuild)  Rebuild a Drupal 8 site.                    
 core:                                                                      
   core-status (status, st, n)                                              
   core-topic (topic)           Read detailed documentation on a given      
                                topic.                                      
   core-init (init)             Enrich the bash startup file with bash      
                                aliases and a smart command prompt.         
   core-rsync (rsync)           Rsync Drupal code or files to/from another  
                                server using ssh.                           
   core-edit (conf, config)     Edit drushrc, site alias, and Drupal        
                                settings.php files.                         
   core-execute (exec, execute) Execute a shell command. Usually used with  
                                a site alias.                               
 php:                                                                       
   php-eval (eval, ev)          Evaluate arbitrary php code after           
                                bootstrapping Drupal (if available).        
   php-script (scr)             Run php a script after a full Drupal        
                                bootstrap.                                  
 site:                                                                      
   site-set (use)               Set a site alias to work on that will       
                                persist for the current session.            
   site-alias (sa)              Show site alias details, or a list of       
                                available site aliases.                     
   site-install (si)            Install Drupal along with                   
                                modules/themes/configuration/profile.       
   site-ssh (ssh)               Connect to a Drupal site's server via SSH.  
 sql:                                                                       
   sql-connect                  A string for connecting to the DB.          
   sql-create                   Create a database.                          
   sql-drop                     Drop all tables in a given database.        
   sql-cli (sqlc)               Open a SQL command-line interface using     
                                Drupal's credentials.                       
   sql-query (sqlq)             Execute a query against a database.         
   sql-dump                     Exports the Drupal DB as SQL using          
                                mysqldump or equivalent.                    
   sql-sync                     Copy DB data from a source site to a target
                                site. Transfers data via rsync.             

 ! [NOTE] Drupal root not found. Pass --root or a @siteAlias in order to see    
 !        Drupal-specific commands.                                             

root@host1529592:~# drush status
 PHP binary    : /usr/bin/php7.0                  
 PHP config    : /etc/php/7.0/cli/php.ini         
 PHP OS        : Linux                            
 Drush script  : /root/.composer/vendor/bin/drush
 Drush version : 9.0-dev-gc106607                 
 Drush temp    : /tmp                             
 Drush configs :                                  
 Drush aliases :                                  
root@host1529592:~# cd /home
root@host1529592:/home# ls
procyonu  twigger
root@host1529592:/home# cd twigger
root@host1529592:/home/twigger# ls
root@host1529592:/home/twigger# ls -la
total 48
drwxr-xr-x 6 twigger twigger 4096 Sep 12 20:22 .
drwxr-xr-x 4 root    root    4096 Sep 12 17:58 ..
-rw------- 1 twigger twigger   20 Sep 12 20:22 .bash_history
-rw-r--r-- 1 twigger twigger  220 Sep 12 17:58 .bash_logout
-rw-r--r-- 1 twigger twigger 3771 Sep 12 17:58 .bashrc
drwx------ 3 twigger twigger 4096 Sep 12 19:49 .cache
drwxrwxr-x 4 twigger twigger 4096 Sep 12 21:02 .composer
drwx------ 3 twigger twigger 4096 Sep 12 19:49 .config
drwx------ 3 twigger twigger 4096 Sep 12 19:49 .local
-rw------- 1 twigger twigger  161 Sep 12 19:43 .mysql_history
-rw-r--r-- 1 twigger twigger  675 Sep 12 17:58 .profile
-rw-r--r-- 1 twigger twigger    0 Sep 12 18:25 .sudo_as_admin_successful
-rw------- 1 root    root     592 Sep 12 18:41 .viminfo
root@host1529592:/home/twigger# drush
Drush Commandline Tool version 9.0-dev-gc106607

Run `drush help [command]` to view command-specific help.  Run `drush topic` to read even more documentation.

 Global options. See `drush topic core-global-options` for the full list.          
 -r, --root=ROOT                      Drupal root directory to use.                
 -l, --uri=URI                        URI of the drupal site to use.               
 -v|vv|vvv, --verbose                 Display extra information about the command.
 -d, --debug                          Display even more information.               
 -y, --yes                            Assume 'yes' as answer to all prompts.       
  --no                                Assume 'no' as answer to all prompts.        
 -h, --help                           This help system.                            
                                                                                   
 Available commands:                                                        
 _global:                                                                   
   help                         Display usage details for a command.        
   list                         List available commands.                    
   runserver (rs)               Runs PHP's built-in http server for         
                                development.                                
   updatedb (updb)              Apply any database updates required (as     
                                with running update.php).                   
   browse                       Display a link to a given path or open link
                                in a browser.                               
   version                      Show Drush version.                         
   generate (gen)               Generate boilerplate code for               
                                modules/plugins/services etc.               
   shell-alias (sha)            Print all known shell alias records.        
   entity-updates (entup)       Apply pending entity schema updates.        
   updatedb-status (updbst)     List any pending database updates.          
   drupal-directory (dd)        Return the filesystem path for              
                                modules/themes and other key folders.       
   user-login (uli)             Display a one time login link for user ID   
                                1, or another user.                         
   config-pull (cpull)          Export and transfer config from one         
                                environment to another.                     
 cache:                                                                     
   cache-get (cg)               Fetch a cached object and display it.       
   cache-clear (cc)             Clear a specific cache, or all Drupal       
                                caches.                                     
   cache-set (cs)               Cache an object expressed in JSON or        
                                var_export() format.                        
   cache-rebuild (cr, rebuild)  Rebuild a Drupal 8 site.                    
 core:                                                                      
   core-status (status, st, n)                                              
   core-topic (topic)           Read detailed documentation on a given      
                                topic.                                      
   core-init (init)             Enrich the bash startup file with bash      
                                aliases and a smart command prompt.         
   core-rsync (rsync)           Rsync Drupal code or files to/from another  
                                server using ssh.                           
   core-edit (conf, config)     Edit drushrc, site alias, and Drupal        
                                settings.php files.                         
   core-execute (exec, execute) Execute a shell command. Usually used with  
                                a site alias.                               
 php:                                                                       
   php-eval (eval, ev)          Evaluate arbitrary php code after           
                                bootstrapping Drupal (if available).        
   php-script (scr)             Run php a script after a full Drupal        
                                bootstrap.                                  
 site:                                                                      
   site-set (use)               Set a site alias to work on that will       
                                persist for the current session.            
   site-alias (sa)              Show site alias details, or a list of       
                                available site aliases.                     
   site-install (si)            Install Drupal along with                   
                                modules/themes/configuration/profile.       
   site-ssh (ssh)               Connect to a Drupal site's server via SSH.  
 sql:                                                                       
   sql-connect                  A string for connecting to the DB.          
   sql-create                   Create a database.                          
   sql-drop                     Drop all tables in a given database.        
   sql-cli (sqlc)               Open a SQL command-line interface using     
                                Drupal's credentials.                       
   sql-query (sqlq)             Execute a query against a database.         
   sql-dump                     Exports the Drupal DB as SQL using          
                                mysqldump or equivalent.                    
   sql-sync                     Copy DB data from a source site to a target
                                site. Transfers data via rsync.             

 ! [NOTE] Drupal root not found. Pass --root or a @siteAlias in order to see    
 !        Drupal-specific commands.                                             

root@host1529592:/home/twigger# cd /var/www/html
root@host1529592:/var/www/html# ls
123egmont.xyz  egmontgroup.ru  home  index.html  oldspbmapo
root@host1529592:/var/www/html# drush status
 PHP binary    : /usr/bin/php7.0                  
 PHP config    : /etc/php/7.0/cli/php.ini         
 PHP OS        : Linux                            
 Drush script  : /root/.composer/vendor/bin/drush
 Drush version : 9.0-dev-gc106607                 
 Drush temp    : /tmp                             
 Drush configs :                                  
 Drush aliases :                                  
root@host1529592:/var/www/html# su twigger
twigger@host1529592:/var/www/html$ drush status
bash: drush: command not found
twigger@host1529592:/var/www/html$ sudo drush status
sudo: unable to resolve host host1529592
sudo: drush: command not found
twigger@host1529592:/var/www/html$ sudo root drush
sudo: unable to resolve host host1529592
sudo: root: command not found
twigger@host1529592:/var/www/html$ .drush
bash: .drush: command not found
twigger@host1529592:/var/www/html$ ./drush
bash: ./drush: No such file or directory
twigger@host1529592:/var/www/html$ su root
Password:
root@host1529592:/var/www/html# drush
Drush Commandline Tool version 9.0-dev-gc106607

Run `drush help [command]` to view command-specific help.  Run `drush topic` to read even more documentation.

 Global options. See `drush topic core-global-options` for the full list.          
 -r, --root=ROOT                      Drupal root directory to use.                
 -l, --uri=URI                        URI of the drupal site to use.               
 -v|vv|vvv, --verbose                 Display extra information about the command.
 -d, --debug                          Display even more information.               
 -y, --yes                            Assume 'yes' as answer to all prompts.       
  --no                                Assume 'no' as answer to all prompts.        
 -h, --help                           This help system.                            
                                                                                   
 Available commands:                                                        
 _global:                                                                   
   help                         Display usage details for a command.        
   list                         List available commands.                    
   runserver (rs)               Runs PHP's built-in http server for         
                                development.                                
   updatedb (updb)              Apply any database updates required (as     
                                with running update.php).                   
   browse                       Display a link to a given path or open link
                                in a browser.                               
   version                      Show Drush version.                         
   generate (gen)               Generate boilerplate code for               
                                modules/plugins/services etc.               
   shell-alias (sha)            Print all known shell alias records.        
   entity-updates (entup)       Apply pending entity schema updates.        
   updatedb-status (updbst)     List any pending database updates.          
   drupal-directory (dd)        Return the filesystem path for              
                                modules/themes and other key folders.       
   user-login (uli)             Display a one time login link for user ID   
                                1, or another user.                         
   config-pull (cpull)          Export and transfer config from one         
                                environment to another.                     
 cache:                                                                     
   cache-get (cg)               Fetch a cached object and display it.       
   cache-clear (cc)             Clear a specific cache, or all Drupal       
                                caches.                                     
   cache-set (cs)               Cache an object expressed in JSON or        
                                var_export() format.                        
   cache-rebuild (cr, rebuild)  Rebuild a Drupal 8 site.                    
 core:                                                                      
   core-status (status, st, n)                                              
   core-topic (topic)           Read detailed documentation on a given      
                                topic.                                      
   core-init (init)             Enrich the bash startup file with bash      
                                aliases and a smart command prompt.         
   core-rsync (rsync)           Rsync Drupal code or files to/from another  
                                server using ssh.                           
   core-edit (conf, config)     Edit drushrc, site alias, and Drupal        
                                settings.php files.                         
   core-execute (exec, execute) Execute a shell command. Usually used with  
                                a site alias.                               
 php:                                                                       
   php-eval (eval, ev)          Evaluate arbitrary php code after           
                                bootstrapping Drupal (if available).        
   php-script (scr)             Run php a script after a full Drupal        
                                bootstrap.                                  
 site:                                                                      
   site-set (use)               Set a site alias to work on that will       
                                persist for the current session.            
   site-alias (sa)              Show site alias details, or a list of       
                                available site aliases.                     
   site-install (si)            Install Drupal along with                   
                                modules/themes/configuration/profile.       
   site-ssh (ssh)               Connect to a Drupal site's server via SSH.  
 sql:                                                                       
   sql-connect                  A string for connecting to the DB.          
   sql-create                   Create a database.                          
   sql-drop                     Drop all tables in a given database.        
   sql-cli (sqlc)               Open a SQL command-line interface using     
                                Drupal's credentials.                       
   sql-query (sqlq)             Execute a query against a database.         
   sql-dump                     Exports the Drupal DB as SQL using          
                                mysqldump or equivalent.                    
   sql-sync                     Copy DB data from a source site to a target
                                site. Transfers data via rsync.             

 ! [NOTE] Drupal root not found. Pass --root or a @siteAlias in order to see    
 !        Drupal-specific commands.                                             

root@host1529592:/var/www/html#
to est # drush vezde, vsegda. twigger $ ni sudo ni kak drush ne vidit, nu
i ladno.
///teper nado stavit sam drupal . a uge 0:27 13.09.2017
root@host1529592:/var/www/html# composer create-project drupal/drupal FOLDER 8.3.*@stable
root@host1529592:/var/www/html# drush dl drupal 8.3.7
 [error]  dl has been deprecated. Please build your site using Composer. Add new projects with composer require drupal/[project-name]. Use https://www.drupal.org/project/composer_generate to build a composer.json which represents the the enabled modules on your site.
root@host1529592:/var/www/html# composer require drupal 8.3.7
Do not run Composer as root/super user! See https://getcomposer.org/root for details
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package drupal could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability&gt; for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md&gt; for further common problems.

Installation failed, deleting ./composer.json.
root@host1529592:/var/www/html# ls
123egmont.xyz  egmontgroup.ru  home  index.html  oldspbmapo
///
 0:50 13.09.2017 Thuesdey uge https://niklan.net/blog/130
A teper tak. Drush No ! On dlya drugogo, moget moduli etc.
https://niklan.net/blog/130
Dalee podrobno is site
->
Суть в том, что в Drupal 8.1 в ядро интегрировали composer и теперь всё можно делать через него. Это на самом деле очень удобно, так как зависимости проекта хранятся в файле, их очень легко установить в одну команду и обновить. Но не без недостатков, на данный момент, по крайней мере у меня, drush и drupal compose не умеют с этим обращаться, и если у модуля какая-то зависимость через композер, то он её не установит, и придется контролировать руками, также установка через обе тулзы не добавляют модули в зависимости композера и теряется функционал композера и часть его смысла. Не ясно как узнавать доступные версии для пакета на установку, только указав неверную версию он выдает какой-то список, может кто в комментах подскажет.

Особо вдаваться в подробности по работе с композером я не буду, он уже не молодой, известный по нему куча гайдов в сети, я буду описывать лишь в рамках Drupal сайта.
Установка ядра через composer

Если у вас чистый проект, то проще ядро сразу тянуть через композер, делается это очень просто

# Загрузка текущей стабильной версии Drupal 8.1
composer create-project drupal/drupal FOLDER 8.1.*@stable
# В предыдущем примере ядро скачается в папку FOLDER,
# но если вы хотите чтобы ядро развернулось в текущей папке
# используйте данную команду
composer create-project drupal/drupal . 8.1.*@stable
# Хотите использовать dev версию ядра?
composer create-project drupal/drupal . 8.1.*@dev

UPD Установка ядра через create-project достаточно специфичная вещь и далеко не каждому понравится\подойдет. При такой установке, ядро ставится в вендор, и соответстенно, вам придется менять настройки веб-сервера, ибо index.php файл в корне не будет, он будет в /vendor/drupal/index.php (точно не помню), следовательно сайт даже не заведется. Лучше ставить ядро по старинке - скачал, закинул, или свой composer.json который поставит в корень, а уже далее все установки и обновления модулей и ядра делать исключительно композером.
Подключение репозиториев

UPD Не знаю точно когда такое появилось, но начиная с 8.3.x+ данные репозитории подключены из коробки в ядре и поставляются уже сразу в composer.json. Подключать на новых проектах его уже не нужно.

Не важно как вы устанавливали сайт. Через Composer, из архива, через драш, вообще никакой разницы нет, все они содержат в корне файлик composer.json и требуют дополнительных действий для использования composer по полной программе.

Для полноценной работы нужно подключить репозитории Drupal.org, так как по умолчанию они не подключены, вы не сможете устанавливать проекты с drupal.org, так как композер их просто не найдет. Все по принципу репозиториев в Linux, если вы, конечно, знакомы с этим подходом.
Добавление Drupal.org репозитория в Composer

composer config repositories.drupal composer https://packages.drupal.org/8

То же самое и работает для Drupal 7 https://packages.drupal.org/7, но там composer.json придется заготовить руками как я понял, не тестил, но поддерживается.

Если вы всё сделали правильно, в корневом composer.json должно появиться упоминание подключенного нами репозитория.
Подключенный репозиторий для Drupal 8
<-
root@host1529592:/var/www/html# composer create-project drupal/drupal FOLDER 8.3.*@stable
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Installing drupal/drupal (8.3.7)
  - Installing drupal/drupal (8.3.7): Downloading (100%)         
Created project in FOLDER
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 75 installs, 0 updates, 0 removals
  - Installing composer/installers (v1.2.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing wikimedia/composer-merge-plugin (v1.4.0): Downloading (connectingDownloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing ircmaxell/password-compat (v1.0.4): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/polyfill-php55 (v1.3.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/polyfill-php54 (v1.3.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/polyfill-mbstring (v1.3.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/http-foundation (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/event-dispatcher (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing psr/log (1.0.2): Loading from cache
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/debug (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/http-kernel (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing asm89/stack-cors (1.0.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing composer/semver (1.4.2): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing doctrine/lexer (v1.0.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing doctrine/inflector (v1.1.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing doctrine/collections (v1.3.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing doctrine/cache (v1.6.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing doctrine/annotations (v1.2.7): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing doctrine/common (v2.6.2): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing easyrdf/easyrdf (0.9.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing egulias/email-validator (1.2.14): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing psr/http-message (1.0.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing masterminds/html5 (2.2.2): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing paragonie/random_compat (v2.0.10): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing stack/builder (v1.0.4): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/routing (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony-cmf/routing (1.4.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/polyfill-apcu (v1.3.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/class-loader (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/console (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/dependency-injection (v2.8.18): Downloading (connecting..Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/polyfill-iconv (v1.3.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/process (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/psr-http-message-bridge (v1.0.0): Downloading (connectingDownloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/serializer (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/translation (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/validator (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing zendframework/zend-diactoros (1.3.10): Downloading (connecting...Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing zendframework/zend-stdlib (3.0.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing zendframework/zend-escaper (2.5.2): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing zendframework/zend-feed (2.7.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/css-selector (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing behat/mink (dev-master 9ea1ceb): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/dom-crawler (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/browser-kit (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing guzzlehttp/guzzle (6.2.3): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing fabpot/goutte (v3.2.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing behat/mink-browserkit-driver (v1.3.2): Downloading (connecting...Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing behat/mink-goutte-driver (v1.2.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing symfony/yaml (v2.8.18): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing squizlabs/php_codesniffer (2.8.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing drupal/coder (8.2.12): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing twig/twig (v1.25.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing jcalderonzumba/gastonjs (v1.0.2): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing jcalderonzumba/mink-phantomjs-driver (v0.3.1): Downloading (conneDownloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing mikey179/vfsstream (v1.6.4): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing phpdocumentor/reflection-docblock (2.0.4): Downloading (connectinDownloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing phpunit/php-token-stream (1.4.11): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing sebastian/version (1.0.6): Loading from cache
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing sebastian/global-state (1.1.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing sebastian/recursion-context (1.0.5): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing sebastian/exporter (1.2.2): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing sebastian/environment (1.3.8): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing sebastian/diff (1.4.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing sebastian/comparator (1.2.4): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing doctrine/instantiator (1.0.5): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing phpunit/phpunit-mock-objects (2.3.8): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing phpunit/php-timer (1.0.9): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing phpunit/php-file-iterator (1.4.2): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing phpunit/php-code-coverage (2.2.4): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing phpspec/prophecy (v1.7.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing phpunit/phpunit (4.8.35): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
symfony/http-kernel suggests installing symfony/config ()
symfony/http-kernel suggests installing symfony/finder ()
symfony/http-kernel suggests installing symfony/var-dumper ()
easyrdf/easyrdf suggests installing ml/json-ld (~1.0)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/dependency-injection suggests installing symfony/config ()
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
symfony/serializer suggests installing symfony/config (For using the XML mapping loader.)
symfony/serializer suggests installing symfony/property-access (For using the ObjectNormalizer.)
symfony/translation suggests installing symfony/config ()
symfony/validator suggests installing symfony/config ()
symfony/validator suggests installing symfony/expression-language (For using the 2.4 Expression validator)
symfony/validator suggests installing symfony/intl ()
symfony/validator suggests installing symfony/property-access (For using the 2.4 Validator API)
zendframework/zend-feed suggests installing zendframework/zend-cache (Zend\Cache component, for optionally caching feeds between requests)
zendframework/zend-feed suggests installing zendframework/zend-db (Zend\Db component, for use with PubSubHubbub)
zendframework/zend-feed suggests installing zendframework/zend-http (Zend\Http for PubSubHubbub, and optionally for use with Zend\Feed\Reader)
zendframework/zend-feed suggests installing zendframework/zend-servicemanager (Zend\ServiceManager component, for easily extending ExtensionManager implementations)
zendframework/zend-feed suggests installing zendframework/zend-validator (Zend\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent)
behat/mink suggests installing behat/mink-selenium2-driver (slow, but JS-enabled driver for any app (requires Selenium2))
behat/mink suggests installing behat/mink-zombie-driver (fast and JS-enabled headless driver for any app (requires node.js))
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
root@host1529592:/var/www/html# ls
123egmont.xyz  egmontgroup.ru  FOLDER  home  index.html  oldspbmapo
root@host1529592:/var/www/html# cd FOLDER
root@host1529592:/var/www/html/FOLDER# ls
autoload.php   core               modules     robots.txt  update.php
composer.json  example.gitignore  profiles    sites       vendor
composer.lock  index.php          README.txt  themes      web.config
root@host1529592:/var/www/html/FOLDER# cd ..
root@host1529592:/var/www/html# ls
123egmont.xyz  egmontgroup.ru  FOLDER  home  index.html  oldspbmapo
root@host1529592:/var/www/html# mv FOLDER spbmapo
root@host1529592:/var/www/html# ls
123egmont.xyz  egmontgroup.ru  home  index.html  oldspbmapo  spbmapo
root@host1529592:/var/www/html# cp permissions.sh v spbmapo (udobno s pravami).
root@host1529592:/var/www/html/spbmapo# chmod 777 permissions.sh
root@host1529592:/var/www/html/spbmapo# ./permissions.sh
Начинаю изменение прав...
Устанавливаю владельца www-data для всех папок и файлов
Выставляю права 755 для всех папок
Выставляю права 644 для всех файлов
Выставляю права 440 для .htaccess
Выставляю права 775 для tmp
chmod: cannot access './tmp': No such file or directory
Выставляю права 440 для tmp/.htaccess
chmod: cannot access './tmp/.htaccess': No such file or directory
Выставляю права 775 для sites
Выставляю права 775 для sites/default
Выставляю права 775 для sites/default/files
chmod: cannot access './sites/default/files': No such file or directory
Корректирую права g+w для поддеррикторий sites/default/files
chmod: cannot access './sites/default/files': No such file or directory
Выставляю права 440 для sites/default/files/.htaccess
chmod: cannot access './sites/default/files/.htaccess': No such file or directory
Выставляю права 440 для sites/default/settings.php
chmod: cannot access './sites/default/settings.php': No such file or directory
Выставляю права 440 для sites/default/default.settings.php
Выставляю права 775 для sites/all/themes
chmod: cannot access './sites/all/themes': No such file or directory
Выставляю права 775 для sites/all/modules
chmod: cannot access './sites/all/modules': No such file or directory
Выставляю права 775 для sites/all/libraries
chmod: cannot access './sites/all/libraries': No such file or directory
Изменение прав закончил! Убедись, что всё верно...
root@host1529592:/var/www/html/spbmapo# ls
autoload.php   example.gitignore  profiles    themes
composer.json  index.php          README.txt  update.php
composer.lock  modules            robots.txt  vendor
core           permissions.sh     sites       web.config
root@host1529592:/var/www/html/spbmapo# udobno script is drupal.ru (author ne pomnu), rabotaet bespochadno.
Srasu copiruu is mousepad na localhost (chtobi nadejnee), opit uchit vse reservno copirovat.
I dalee v brausere : spbampo (da chut ne zabil, mv spbmapo spbmapo.org)

13. 09. 2017 Thuesday. And the final touch, if we want to working with twig templates, need to twig debug by defalut in developmpent.

services.yml (or)

https://www.drupal.org/node/2839709
Enable Twig debug by default in development.services.yml

https://www.drupal.org/docs/8/theming/twig
Twig in Drupal 8 Twig is a template engine for PHP and it is part of the Symfony2 framework.

root@host1529592:/var/www/html/spbmapo.org/sites# drush cr
 [success] Cache rebuild complete.
root@host1529592:/var/www/html/spbmapo.org/sites#

or see http://drupalbook.ru/comment/4998 Ivan Abramenko (rus)

That all. Next to need reserve copy [see in next page -><a href=" http://spbmapo.org/node/4" Backup and Migrate </a> ]

 

Яндекс.Метрика