24

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

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/...


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 ...


17

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


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.


15

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.


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" : "...


13

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 ...


13

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 -...


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.


12

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 ...


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

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


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 ...


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

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 ...


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

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 ...


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

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/{$...


8

Finally, i could update with these modifications. Step 1, optional in case your composer.jsoncontains this. If it is ok, apply step 2 add "require": { --- "drupal/core": "~8.5" }, remove "replace": { "drupal/core": "^8.4" }, Step 2 delete this folder : vendor delete this file : composer.lock run composer update --with-...


8

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 ...


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

If you want to update your global installations of any package under composer, you can just do this: composer global update You don't need to navigate to .composer/vendor/drush/drush However: There are a couple of things: 1) Your global composer.json file might have a version constraint. Check out drush's packagist page: https://packagist.org/packages/...


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

Checking https://packagist.org/packages/drupal/drupal for the versions available there is NO 7.x version. Drupal 7 has no composer.json for this to command to work. You can use one of the other 2 methods mentioned on https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies Using https://github.com/drupal-composer/...


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


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