22

It seems there is no single remove command, so you need to: Edit your composer.json file, e.g. vim ~/.composer/composer.json and remove line containing drush. Save the file. Update Composer PHP packages by: composer global update It will remove a globally installed drush. If you don't have composer command in your PATH, try php composer.phar instead. ...


22

You have installed the development master branch of Drush. To continue using commands such as drush dl, drush pm-update and so on, you should install the 8.x branch of Drush. However, your basic supposition is correct. The Drupal community is moving towards Composer and away from drush make and the drush pm-* commands. The reason for this is that more and ...


18

While it will install the latest dev release of the Drupal module/theme to simply do the following: composer require drupal/bootstrap:3.x-dev I would argue a best practice when installing a dev version of a module is to make sure you are going to get the commit you want (which might not be the latest), so I would do the following: composer require drupal/...


15

You can keep the original prefer-stable settings. The @dev in 8.3.*@dev is the stability flag for the given package. The easiest way to force a dev-version of a package is to use a different version constraint. Use 8.3.x-dev instead, this version constraint references to a the 8.x-3.x branch and works independently from prefer-stable and minimum-stability.


15

"extra": { "drupal-scaffold": { "source": "http://cgit.drupalcode.org/drupal/plain/{path}?h={version}", "excludes": [ ".htaccess", "robots.txt" ] } } Put this above code in your composer.json file.


14

The library can be installed into a custom path by utilizing extra : installer-paths to for e.g.: web/sites/libraries/{$name} Additional to that, we define the required package repository with the needed type of drupal-library. Example composer.json for a project: { "name" : "example-composer/example-project", "description" : "...


14

Please make sure your webserver (nginx/apache) is using the same PHP version as your cli one. For example, you may encounter this issue if your cli PHP version is PHP 7.1 and your webserver is using PHP 7.0.


13

DOMDocument is included in the extension php-xml. To install it on ubuntu, run: sudo apt-get install php-xml


12

Nothing wrong with that. It is recommend to have the config folder outside of the public web folder; Drupal just doesn't have that. To keep the installation simple for non-experienced users, it puts that folder in the files folder, which has to be writable anyway. Just create that folder and give Drupal write permission to it; you'll be fine.


11

I presume that you are using drupal-composer/drupal-project as the basis for your project. If not, take a look at that project, and compare it with yours. Also, you said that you want to use composer to manage Drupal 8 dependencies, so I presume that you have selected your contrib modules via composer require drupal/devel rather than drush dl devel. If ...


11

This installs the latest beta-12 for me: composer require drupal/webform:5.0.*@dev You need to do a bit of translation from the Drupal version number. From Using Composer to manage Drupal site dependencies: Specifying a version you can specify a version from the command line with: $ composer require drupal/<modulename>:<version> For ...


10

To update Drupal using Composer, you just need to move the "drupal/core": "~8.1" line from the replace section to the require section. At the end the content of the composer.json file is like the following one. { "name": "drupal/drupal", "description": "Drupal is an open source content management platform powering millions of websites and ...


10

There are a few things you can do to help debug your drush. Here is what you can try: Debug output Use drush cc all -vvv This will provide you with some valuable information in terms of what Drush is doing in the background and maybe show you the actual error message. Check your settings.php Depending on your setup you may be passing in environment ...


10

Assuming you are using Composer to maintain your Drupal 8 installation, you can use the following command to update core and all modules (and dependencies): composer update drupal/* --with-dependencies If you started your project from "drupal-composer/drupal-project" the command should otherwise be: composer update drupal/* webflo/drupal-core-require-dev -...


9

Being inspired by comment by Free Radical, it works for me even without removing .composer directory: drush cc all outside the Drupal root directory drush cc all inside the Drupal root directory


9

You are now able to run composer [global] remove drush/drush to uninstall it.


8

Drush switched to requiring composer. The documentation provides details on how to install both composer and drush, but it boils down to: Install composer globally: curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer Install drush globally (for your user), you can specify the version: composer global require drush/...


8

I got this working, I was very close but removing /vendor and composer.lock was what helped in the end. Here are the steps from the top: add the line "drupal/core": "~8.1" to the 'require' statement (or update it to whatever version you require - in my case ^8.0 - latest Drupal 8 release). Remove the drupal/core line from the 'replace' statement. ...


8

https://packages.drupal.org/7 is the correct url, its just that drupal.org does not server any content under this url. Composer will call https://packages.drupal.org/7/packages.json


8

If you don't want composer in production on your server, you can run the composer commands locally to install Drush, then make sure to push the vendordirectory to the server. Make sure to also commit the composer.json and composer.lock files, so that anyone else working with the codebase can handle composer on their own local machines as well. In this way ...


7

To install for all users on the server: curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer ln -s /usr/local/bin/composer /usr/bin/composer git clone https://github.com/drush-ops/drush.git /usr/local/src/drush cd /usr/local/src/drush git checkout 7.0.0-alpha5 #or whatever version you want. ln -s /usr/local/src/drush/...


7

Composer Manager is just a small wrapper around the Merge Plugin which we have in core nowadays. Register your module in the root composer.json of your project, look for extra > merge-plugin > include. It should look like this: "extra": { "_readme": [ "By default Drupal loads the autoloader from ./vendor/autoload.php.", "To change the ...


7

That is because every Drupal package is at drupal/ - twbs is not in the Drupal packagist. You have to add that to composer to get that to work as Clive said. It is not in the composer.json file out of the box. You need to add that, and then do: composer remove twbs/bootstrap because this is NOT a Drupal ready theme. After adding the repository to ...


7

You should follow the docs on the official Drupal Console repo on how to install it with Composer. Note that the global launcher is not recommended, it is recommended to add it to your project through Composer. https://github.com/hechoendrupal/drupal-console/blob/master/README.md # Change directory to Drupal site cd /path/to/drupal8.dev # Download ...


7

For Ubuntu 16.04 I had to run the following commands to adjust the PHP version used by Apache: sudo a2dismod php7.0 sudo a2enmod php7.2 sudo service apache2 restart


7

You should be able to change the installer paths in composer.json, which defines where the files are placed: "installer-paths": { "web/core": ["type:drupal-core"], "web/modules/contrib/{$name}": ["type:drupal-module"], "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], "drush/contrib/{$...


7

Explanation: The problem is that cweagans/composer-patches is applying patches to Drupal Core after cloning it, leading Composer to believe you've modified the affected files and therefore to prompt you to overwrite them lest you unwittingly lose work in progress. Solution: Configure Composer to discard-changes which "[sets] the default style of handling ...


6

To get started, add a composer.json file to your module. The only thing you need here is the require section that includes your external library. Composer manager is one way to combine all of your dependencies together, but there are other options to get Drupal to load your autoload.php file. The technique I prefer is to create a project-level composer....


6

Please refer to our installation instructions for Commerce 2.x here: http://docs.drupalcommerce.org/v2/getting-started.html Note that we recommend the Drupal console project, not drush. However, the linked Composer Manager instructions in there may help you do it via drush.


6

I see, you directly get drupal/drupal. I don't think that's actually supported, you still get a vendor folder from git and the composer.json isn't properly set up. I'm using composer command from this site: composer create-project drupal-composer/drupal-project:8.x-dev myproject --stability dev --no-interaction Regarding update, the trick seems to be the ...


Only top voted, non community-wiki answers of a minimum length are eligible