Questions tagged [composer]
Use it for questions about the PHP application library dependency manager (Composer).
586
questions
0
votes
1
answer
722
views
Update packages conflicting with core update
When updating drupal core via composer, you often get problems like:
Problem 1
- Installation request for drupal/core 8.8.2 -> satisfiable by drupal/core[8.8.2].
- Conclusion: remove ...
6
votes
3
answers
165
views
What's the correct way to install Drupal with Composer if I want to work on core issues?
I want to install a local Drupal site in such a way that Drupal core is a git repository so I can work on patches.
Just doing a git clone doesn't work, because I also need tools such as Drush, and ...
1
vote
2
answers
166
views
Can I have Composer or something else download a Git repo as a dependency of my contrib module?
I'm working on a module and there is a sub module for scanning barcodes that requires this, quagga.
Currently you have to manually download the library and put it into the libraries dir. If I add this ...
13
votes
1
answer
4k
views
Composer keeps overwriting .htaccess (and other files) every time I do anything
Every time I try to update anything using Composer, it overwrites a load of files. One of the files it overwrites is .htaccess, which I have customised, so I have to keep patching it all the time. ...
0
votes
1
answer
53
views
Cannot disable module "monitoring" after failed upgrade
I just updated to Drupal 8.8.1 (composer update drupal/* --with-dependencies now says I'm up to date, even though I know that 8.8.2 is actually the most recent). After doing this, I can use most of ...
1
vote
0
answers
97
views
Drupal Commerce 2 updating with composer
I am a retired civil servant -- NOT a developer by a long shot -- and while I have used Drupal for about 19 years, I am new to composer and drush and Drupal Commerce 2.
I was able to successfully ...
0
votes
0
answers
37
views
Install drupal-project w/ composer failing
I am trying to install Drupal 8 on Windows using composer and drupal-project. It is failing on the first package install; cweagans. I have rebooted the box and checked all the permissions. Composer ...
-4
votes
1
answer
43
views
Issues while Updating drupa/slack to 8.x-1.2
The site I am working on is using drupal/slack ^1.2 in composer.json file but the module present in the instance and that in composer.lock is the dev version.
I ran a
lando composer require drupal/...
0
votes
1
answer
320
views
Composer cannot find drupal/commerce in a specific module
I'm attempting to update the dependencies of a specific module in my site. I've downloaded the module with git and navigated inside. If I run composer validate it says ./composer.json is valid.
...
1
vote
1
answer
145
views
Reinstall a patch with composer - update one module only
Can I update a patch without running composer update ? In other words: can I update one module only?
14
votes
4
answers
16k
views
composer require fails because it can't delete default.services.yml
Using composer with Drupal (7, 8 & 9), composer require drupal/<package-name> returns the following error.
Installation failed, reverting ./composer.json to its original content.
[...
3
votes
1
answer
2k
views
Using drupal-scaffold correctly
I am in the process of starting new projects using drupal/recommended-project over the Drupal composer project template. One of the differences I have noted is that the Drupal scaffold tool fires ...
0
votes
1
answer
322
views
Impossible to update some modules via Composer
I've updated a D8 website from 8.7 to 8.8.1 with SSH and composer.
For some modules (in SSH 3rd column is marked in yellow) it is not possible to update them. I understand that when they are marked in ...
0
votes
1
answer
2k
views
How can you have Composer install the site in the project root not in web/?
I have downloaded Drupal 8.8 through composer drupal/recommended-project. The downloaded files structure is diff than previous download. Now core and other files are stored in web folder and vendor is ...
2
votes
2
answers
459
views
Third-party modules installed with Composer don't have their version in the .info.yml file
I have a project installed by composer, everything working perfectly, except when i run composer install contrib module installed successfully in web/modules/contrib but none of the modules .info.yml ...
0
votes
1
answer
184
views
Error guzzlehttp/guzzle ^6.3 -> no matching package found when update from 8.7.9 to 8.8.1
When i tried to update my project using composer from 8.7.9 to 8.8.1 i get the following error:
Command:
composer update drupal/core --with-dependencies
[Composer\DependencyResolver\...
5
votes
0
answers
2k
views
Class "\Drupal\system\Controller\Http4xxController" does not exist [closed]
I'm using https://github.com/drupal-composer/drupal-project to install Drupal 8. The only thing I've changed in the composer.json is to freeze Drupal core version to 8.8.1
After Drupal installation I ...
1
vote
0
answers
1k
views
How to refresh Composer install to restore missing (deleted) files
I attempted to install the 8.8.1 Drupal Core security update using the command
composer update drupal/core webflo/drupal-core-require-dev --with-dependencies
I've used this many times. However, this ...
0
votes
1
answer
51
views
How to upgrade to Drupal 8 from 7 with clean install? [closed]
I currently have a Drupal 7 site that I want to install Drupal 8, but do a clean install. This means wiping away everything and starting with a new Drupal 8 instance. I have seen many articles on how ...
0
votes
1
answer
1k
views
Could not find package with stability dev in a version installable using your PHP version
When I want to install Drupal Commerce using Composer via Git Bash terminal and using the following command:
$ composer create-project drupalcommerce/project-base mystore --stability dev
I get the ...
2
votes
0
answers
119
views
Dealing with installed modules/extensions in composer packages removed from composer.json [duplicate]
I had brought up a similar question on StackOverflow, but it hasn't gotten much traction because of a lack of understanding of Drupal, I think.
The issue we are experiencing happens when a developer ...
2
votes
1
answer
164
views
How do I Install an earlier version of Drupal 8 with composer because install fails on server with PHP 5.6?
My server is using PHP version 5, therefore, I need to install Drupal 8 version 8.6.18. But when I try, composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --no-interaction ...
2
votes
1
answer
670
views
drush migrate-upgrade "[debug] key_value table not found. Database may be empty."
I am trying to migrate a D7 site to D8 following the steps found here .
Once I can manage it and make sure I have all the PHP components, Drupal modules and etc. I have 4 sites to update, and one ...
1
vote
0
answers
44
views
How do Install and use packages from Packagist? [closed]
I would like to install use kamermans/guzzle-oauth2-subscriber in my Drupal 8 build.
I ran composer require kamermans/guzzle-oauth2-subscriber which put the package in mysite/vendor/kamermans.
The ...
0
votes
1
answer
652
views
Steps to update vendor files after pulling changed composer.lock file
Let's say I work in a group and somebody else did composer update and pushed changed composer.lock file. I pulled it and now I have to do update too, to match the files from changed lock file.
In ...
0
votes
2
answers
165
views
Updating Drupal project using Composer fails
I have site (which is originally installed also with composer) with drupal core version 8.7.2. I'm trying to update it to latest 8.7.8. When I do:
composer outdated "drupal/*"
I get the list of all ...
0
votes
0
answers
23
views
How to install the appointments module with composer?
I am trying to install the appointments module, but running composer require drupal/appointments fails because some 3rd party libraries are not installed. I am using the drupal-project composer ...
0
votes
1
answer
126
views
Odd problems with Drupal 8.7.7 and drupal/jsonapi 2.4.0
I share a release branch with a team of developers and I am the only one having this problem locally (see below).
$ git reset --hard origin/2019-Oct-R2
HEAD is now at 8e5cec59b1 WWW-1599 update spoke ...
0
votes
1
answer
350
views
Moving "vendor/" in a different location and symlinking it breaks drush
I'd like to have vendor/ moved out of the Drupal 8 root and symlink it. Composer doesn't have any problem with that (all commands work) but when I issue any drush command, even drush --version, it ...
1
vote
1
answer
2k
views
Drush cannot connect to the database when updating
I am trying to update Drupal from version 8.7.5 to 8.7.7. I installed Drupal using composer and had a really old version of Drush that I had installed from apt-get. I uninstalled the old version and ...
1
vote
2
answers
811
views
Updating without Composer
I've previously used Drush to update my Drupal-installations. They are installed without using Composer, and currently on version 8.7.3. However, when I try to use Drush (drush v8.1.15, using drush up)...
1
vote
1
answer
768
views
How can we just apply the updates to a single module using composer without apply patches for other modules?
We have the following composer.json file. When we want to update a module such as Environment Indicator, we run the suggested composer command composer require drupal/environment_indicator:^3.7'.
...
1
vote
1
answer
64
views
Why would I provide a composer.json for my modules?
I’ve come across several Drupal7 modules that include a composer.json. It seems that this somehow influences how Drupal-CI determines test dependencies. Now I’m trying to find out whether it’s worth ...
3
votes
1
answer
5k
views
How to install multiple modules with composer at once? [closed]
Let's say we need to install these 2 modules :
composer require 'drupal/redirect:^1.4'
composer require 'drupal/pathauto:^1.4'
I couldn't find the correct syntax so I've tried this but it doesn't ...
-3
votes
1
answer
51
views
How do I deploy a site?
I am following this link to set-up a Drupal 8 site, I am installing drupal-composer/drupal-project as a template for my composer install for the first time, as I forced myself into drupal 8 for future ...
1
vote
1
answer
345
views
Is there a way to update custom packages with composer?
The project is using Drupal 8 composer template to manage dependencies. Some of the packages are defined locally to look like Drupal modules and be installed in a specific location.
An example could ...
0
votes
1
answer
480
views
Composer update still shows an older version of a module
Updating dependencies according to these instructions offers an older version of the module. Composer.json file has the package required as "drupal/h5p": "^1.0@RC", and it used to update just fine. It ...
2
votes
2
answers
3k
views
Composer update - Your requirements could not be resolved to an installable set of packages
when I run a composer update --with-dependencies, I get the following error message:
Problem 1
- don't install drupal/core 8.6.0|remove drupal/drupal dev-master
- don't install drupal/core 8....
1
vote
1
answer
236
views
Composer using old JSON for contrib module?
I maintain skilling, a contrib module. This...
composer require drupal/skilling
... reports...
[RuntimeException]
Could not load package drupal/skilling in https://packages.drupal.org/8: [...
0
votes
2
answers
78
views
Patch Status for 'cweagans/composer-patches'?
It seems that 'Drush Patch File' (https://bitbucket.org/davereid/drush-patchfile/src/master/) isn't compatible with Drush 9. It, however, has one important function - Patch Status - which enables ...
1
vote
1
answer
627
views
How to include a patch to a JS library?
I'm using the Superfish library in my Drupal 8.7.x project. I included it in composer.json like this:
"repositories": [
{
"type": "composer",
"url": "https://packages....
8
votes
3
answers
6k
views
How can I install a specific core version?
Composer always installs the latest version of Drupal core, but I want Drupal 8.6, not Drupal 8.7.
How can I install a specific core version?
-2
votes
1
answer
431
views
Git merge issues with Composer.lock [closed]
We have a simple setup.
We update our drupal 8 sites on a local machine using composer update
we commit the lock file and json file and push to a gitlab git repo
We then pull to a staging server ...
0
votes
1
answer
632
views
Recommended Drush version to use and install for Ubuntu 19 with PHP 7.2 and running Drupal 7
It's been awhile since I've upgraded my server and I'm setting it up from scratch. I'm using Ubuntu 19, apache 2 and PHP 7.2. My site is Drupal 7 which is still running php 5.6 in my old server. I'm ...
1
vote
2
answers
2k
views
Don't re-apply patches when requiring new module?
I keep running into the issue that, when requiring a new module with composer, existing packages are removed and reinstalled if they have patches defined in composer.json. For instance:
$ lando ...
0
votes
1
answer
132
views
Skip updating certain themes/modules on composer update [closed]
My setup is composer driven.
I have overridden some module with patches and customised a contributed theme (boostrap_sass).
Now I want to avoid overbidding these modules and theme when I perform ...
1
vote
0
answers
374
views
Managing custom themes and modules using composer or git
If I am managing my drupal 8 site using the Composer workflow, how should I go about incorporating/managing custom themes and modules?
Let's say I have a custom theme that I manage using gitlab.
Do ...
0
votes
1
answer
2k
views
The following SSH command responded with a non-zero exit status (drupal-vm)
My environment:
Vagrant 2.2.4
VirtualBox 6.0.6r130049
ansible 2.7.10
config file = None
Mac OS Mojave (10.14.4)
I use drupal-vm to build my local development environment.
I cloned this repo and ...
0
votes
2
answers
2k
views
Composer update failure
I am trying to update a site to Drupal 8.7 and getting a weird set of errors. Can someone point me to how to best diagnose and fix the problem?
Here are the steps that I am taking:
When I try to ...
3
votes
1
answer
910
views
Using Composer in a multisite installation
How do I manage modules via composer in a multisite architecture? For example, if I want one site to have version 2.3 of a module, and another to have version 2.4, how do I do this?
Do I have a ...