27

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


26

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


21

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


16

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.


16

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.


15

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


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

Update Official advice found at: Use issue forks to make compatibility fixes work with Composer Copied here for convenience: It's impossible to install an incompatible module with composer and apply a compatibility patch afterwards. However, since issue forks are branches it's possible to install the module using that branch. In order to do this we need to ...


14

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.


14

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


13

You can use composer global remove drush/drush to uninstall a global Drush. Or use composer remove drush/drush to uninstall a project-local Drush.


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

That's Drupal's Composer Scaffold. Listed as "drupal/core-composer-scaffold": "^8.8.0" or a different version in your project's composer.json file. To prevent certain scaffold files from being overwritten every time you run a Composer command you need to specify them one by one in the "extra" section of your project's composer.json. See the docs on ...


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

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


11

Make your "local" machine work as intended, and maintain the security of your live site. Since you want to use composer require command only on non-production environments, the following steps affect only on the machines you deliberately set up. Drupal's recommended configuration will be preserved on all other machines, including production servers....


11

create-project can take a version number, and recommended-project has some tags in for 9.x, so for example: composer create-project drupal/recommended-project mynewproject "9.0-beta1" Or if you just want the bleeding edge to play with: composer create-project drupal/recommended-project mynewproject "^9.0" --stability=dev --prefer-dist


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

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


10

You can write the names of multiple packages separated by spaces. For example: composer require drupal/adminimal_theme:^1.5 drupal/adminimal_admin_toolbar:^1.9


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


9

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


9

The issue is that composer is applying patches using git apply which is not working for packages that are not installed from source. Therefore the solution is to install the packages from source. This way the package will fetch the package along with its repository (when available) thus enabling it to be patched. So... How to install/update a package from ...


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


9

This command will fix it temporarily: chmod u+w web/sites/default But Drupal will harden permission again soon. To turn it off add this to settings.php: $settings['skip_permissions_hardening'] = TRUE; Source: https://www.drupal.org/docs/develop/using-composer/starting-a-site-using-drupal-composer-project-templates#s-troubleshooting-permission-issues-...


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

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


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


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