How to configure Drupal Console on Windows 7?

How to install / configure Drupal Console in Windows 7? In the video, the author uses the Linux environment.

I tried installing it on Windows 7, but I was not able to use it to generate module code.

+4
source share
6 answers

Create the drupal.bat file

@php "%~dp0drupal.phar" %*
+2
source

Here is the complete list of steps I took:

  • php -r "readfile (' https://drupalconsole.com/installer ');" > drupal.phar
  • added installation location to global PATH
  • created the drupal.bat file in the same directory as drupal.phar. drupal.bat contains:@php "%~dp0drupal.phar" %*

Now you can call> drupal from anywhere. I would raise @Nate's answer, but this is a new account.

+2

drupal Git Bash

$curl https://drupalconsole.com/installer -L -o drupal

Windows

c:\>php -r "readfile('https://drupalconsole.com/installer');" > drupal

php.exe php ( ), terminal/cmd-prompt

$drupal

.

Drupal Console.phar, Drupal composer Windows.

.

Windows git terminal

$composer global require drupal/console:@stable
+2
  • Git bash ( curl)
  • curl https://drupalconsole.com/installer -L -o drupal.phar
  • drupal.bat @php "%~dp0drupal.phar" %*
  • (drupal.phar drupal.bat) C:\WINDOWS
  • Command prompt, drupal list.

:

  • PHP Path , php --version.
  • Git Windows.
+1

, php var

load the drupal console with the command

php -r "readfile('http://drupalconsole.com/installer');" | php

rename it if you want or not

Move the file to the D8 project directory.

then use

php console.phar
0
source
  • Find php.exe
  • Add this path to the environment variable path
  • from terminal

    php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar
    
  • i then use the PHP storm IDE:

  • file / settings / command line

  • add symfony console based tool
  • fill in php path and drupal.phar path Now the console is installed
  • tools / start command

    drupal list 
    
0
source

Source: https://habr.com/ru/post/1568766/


All Articles