It seems there is no single remove command, so you need to:
Edit your composer.json file, e.g.
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.
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/...
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 ...
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.
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.
The library can be installed into a custom path by utilizing extra : installer-paths to for e.g.:
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" : "...
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 ...
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.
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>
There are a few things you can do to help debug your drush. Here is what you can try:
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 ...
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 ...
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.
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 ...
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....
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
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.
"description": "Drupal is an open source content management platform powering millions of websites and ...
Finally, i could update with these modifications.
Step 1, optional in case your composer.jsoncontains this. If it is ok, apply step 2
delete this folder :
delete this file :
composer update --with-...
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/...
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.
# Change directory to Drupal site
# Download ...
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.
How to install/update a package from ...
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 ...
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;
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/...
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 ...
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
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.