Questions tagged [composer]

Use it for questions about the PHP application library dependency manager (Composer).

134 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
2k views

What is the best practice for handling abandoned packages required by the drupal core?

When I run composer update on a Drupal 9 website, I get this warning: Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead. A similar question has ...
Free Radical's user avatar
  • 15.1k
4 votes
0 answers
1k views

How can I fix requirements could not be resolved to an installable set of packages?

I had a development site still on 8.8.0. I updated it using composer require 'drupal/core-recommended:^8.9' --update-with-all-dependencies, as per instructions; it worked, but it only went to 8.9.0-...
Francesco Marchetti-Stasi's user avatar
4 votes
1 answer
130 views

Can composer-dependent PHP libraries be used with the Libraries API?

I'm trying to include a PHP library called Geocod.io in my custom module. I am also trying to use the Libraries API. So far I have: Downloaded geocod.io to sites/all/libraries composer install'ed in ...
beth's user avatar
  • 9,087
3 votes
0 answers
811 views

Why does composer-patches not work half of the time?

I am really trying to leverage Composer for workflow and while it is mostly smooth, a big pain point currently is the patch process. It seems like half of the time, modules are just deleted, and ...
Kevin's user avatar
  • 27.7k
2 votes
3 answers
318 views

Fatal error: concerning DrushStyle::warning not being compatible with SymfonyStyle::warning

I just upgraded our site from Drupal 9.5.9 to Drupal 10.1 (following instructions from here - https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/upgrading-a-composer-based-...
Mahesh Gudapakkam's user avatar
2 votes
0 answers
255 views

Patch gets not applied to Drupal locally in DDEV built with Composer from the Drupal Git repo

I try to build a local workflow to be able to review patches for core. I am using DDEV for the local environment. Steps I have taken: git clone https://git.drupalcode.org/project/drupal.git . ddev ...
rkoller's user avatar
  • 121
2 votes
0 answers
94 views

How to allow drupal/core-composer-scaffold to copy files in dev but not live site

How can I have drupal/core-composer-scaffold behave differently when doing composer install on my live and my dev sites? my live site's sites/default directory and its contents are write-protected. ...
iainH's user avatar
  • 1,374
2 votes
2 answers
3k views

How can I install an installation profile?

I have an installation profile with custom modules and themes. How should I use Composer so that Drupal and the installation profile's dependencies are downloaded and copied in the right directories?
2 votes
4 answers
2k views

The missing modules don't get installed after updating with Composer

To update a site locally, I cloned the code base with git to my local computer and imported the database, then ran "composer update --with-dependencies", there were no errors, then I went to /web ...
Rusletov's user avatar
  • 249
1 vote
0 answers
99 views

Install of drupal/core failed

my installation: > drupal > lando composer install :ended up as seen below, I have run out of ideas what to do with this. 117/118 [===========================>] 99% Install of drupal/...
Lucky Boy's user avatar
1 vote
0 answers
116 views

Unable to reinstall Admin Toolbar in modules directory

All my modules are in the web/modules/ directory except for Admin Toolbar which is in web/modules/contrib/. (Why? Long story, legacy site.) Admin Toolbar refuses to update now because of the ...
Chanel's user avatar
  • 95
1 vote
0 answers
100 views

Cannot enable file-mapping option in a composer.json to prevent custom edits to be overridden in .htaccess

I have a "drupal/legacy-project" Drupal 9 project (it was packed inside bought custom drupal theme and later updated to latest drupal 9 version) and I need some custom edits in my root ....
loarrin's user avatar
  • 11
1 vote
0 answers
49 views

How can I add a patch to a distribution?

Distributions add patches as links to www.drupal.org / git.drupalcode.org, as these distributions. https://git.drupalcode.org/project/thunder/-/blob/6.3.x/composer.json https://git.drupalcode.org/...
Antonín Slejška's user avatar
1 vote
0 answers
58 views

Install newer packages without conflicting with core-recommended?

Is there a way to install third party packages without conflicting with core-recommended? Example: Your requirements could not be resolved to an installable set of packages. Problem 1 - spatie/...
Kevin's user avatar
  • 27.7k
1 vote
0 answers
152 views

Drush can't find commands inside vagrant VM

I have a new install of Drupal 9.1.8, with drush 10.5 installed through composer inside a Vagrant VM. But drush list gives: Available commands: help Displays help for a command list Lists ...
Adaddinsane's user avatar
1 vote
0 answers
523 views

PDOException: SQLSTATE[HY000] [2000] on local Docker Drupal Composer site

I've read all the other similar questions and none of the answers have solved the issue. I'm on a Drupal 8 site. 'host' => 'localhost', 'port' => '3306', 'namespace' => 'Drupal\\Core\\...
Rob Hern's user avatar
1 vote
0 answers
1k views

Issues updating core to 9.1.2 with Composer

On my local site, I had updates for 2 modules and Drupal core. To update, I typed in composer update, which had worked for me previously just fine. Composer indicated everything updated, although on ...
Fawn's user avatar
  • 11
1 vote
0 answers
54 views

How can I update core without upgrading third-party modules?

This is generally how I update Drupal core: composer update drupal/core --with-dependencies However, today when I do this, it is also upgrading the contrib modules. I want to upgrade the core only. ...
arnoldbird's user avatar
  • 1,079
1 vote
0 answers
67 views

Updating core with Composer, differences, and why --with-dependencies fails

I'm a Drupal novice and have been playing around with it for the last few months. It seems like every 'how-to' article tells you a different way and a reason not to do it the other way. I am a ...
mindmischief's user avatar
1 vote
2 answers
218 views

update drupal core from a version to a new version with composer

i want to update the core from 8.7.6 to 8.9.2 and when I try this command "composer require drupal/core:^8.9.2 --update-with-dependencies" i have got an error like below , can anyone help me ...
alex espandora's user avatar
1 vote
0 answers
390 views

How to reference a submodule in composer.json file?

I just learned now that you should not include composer.json files in submodules. But can I have a reference to a submodule as a dependency? Imagine I have a module named AAA with a submodule named ...
Adrian Cid Almaguer's user avatar
1 vote
2 answers
180 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 ...
Derek C.'s user avatar
  • 195
1 vote
0 answers
100 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 ...
trazom's user avatar
  • 31
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 ...
Marshall Morrise's user avatar
1 vote
1 answer
399 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 ...
Pjotr's user avatar
  • 165
1 vote
0 answers
414 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 ...
ymdahi's user avatar
  • 620
1 vote
0 answers
188 views

Change module from manual to composer installed

Note: This is not a duplicate of The site has a mix of modules installed manually and via Composer: Can I move all to Composer? As this question below involves different folder locations. I currently ...
IamOnStage's user avatar
1 vote
0 answers
61 views

Alter the generated composer.json on packages.drupal.org for third-party modules

This question is similar to Support composer_manager AND drupal-composer/drupal-project with contrib module, but I am asking it with a different angle this time. Imo this justifies a separate question,...
donquixote's user avatar
  • 3,622
1 vote
0 answers
303 views

What is drupal/drupal dev-master?

I have a Drupal 8.6.7 project that I'm trying to manage with Composer. I'm trying to understand why I cannot make it work. To get this project started, I wiped the vendor and composer.lock file and ...
sam452's user avatar
  • 451
1 vote
0 answers
34 views

What causes composer.lock to add/remove security coverage and change GPL license string on every commit?

It seems like every time we run composer require drupal/some_contrib on a particular project multiple lines in the lock file change in small ways that have no effect but make it hard to see the real ...
lolcode's user avatar
  • 874
1 vote
1 answer
565 views

composer install error

I can't install anything because of this error: [RuntimeException] Could not scan for classes inside "/app/vendor/symfony/serializer/src/" which does not appear to be a file nor a folder and ...
AlxVallejo's user avatar
1 vote
0 answers
149 views

Drupal install with composer (drupal-project)

I have used option A to install Drupal 8 on server: https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies https://github.com/drupal-composer/drupal-...
user3086053's user avatar
1 vote
0 answers
973 views

Drush not installed via Composer

When I run composer require drush/drush It gives below error Using version ^9.3 for drush/drush ./composer.json has been updated Loading composer repositories with package information Updating ...
Test's user avatar
  • 19
1 vote
1 answer
426 views

Module requires Composer install of third-party library

I am trying to learn about drupal 8 and composer within aegir. It seems like aegir has some support for it but the problem that I am running into right now is that aegir doesn't seem to install ...
timftw's user avatar
  • 11
1 vote
0 answers
936 views

Drush version doesn't update and cannot get local Drupal 8 site install to work on Linux

I am having trouble completing a local install of Drupal 8 on my Linux laptop. I am following this Guide/Blog I am running Xubuntu Linux 16.04.3 LTS Composer is installed: $ which composer /usr/...
J2112O's user avatar
  • 133
1 vote
1 answer
727 views

Error installing CiviCRM

Following the amazing work @david-snopek posted: Blog post - CiviCRM & D8, David's StackExchange Post. I spent the better part of last evening trying to get CiviCRM up and running on a Drupal 8....
Justin Levi Winter's user avatar
1 vote
0 answers
950 views

Using composer to install Drupal 8 on Debian 9 (Stretch)

I have already installed various Drupal 8 sites using composer in various environments and I am trying to do it now on a Debian 9 server> I have done the installation in a sub-directory of /var/www/...
kdvgent's user avatar
  • 11
1 vote
0 answers
35 views

How do I merge composer manager composer.json with core 8.3 composer.json?

I was using Drupal 8.0.5 site with composer manager. Now I want to upgrade core to 8.3.2 which comes with composer. Composer Manager asked me to uninstall this module, as it is no longer supported ...
Sam's user avatar
  • 367
1 vote
1 answer
147 views

Path issues using composer for Commerce install on shared hosting

On a shared server with Composer installed the template for installing Drupal 8 or Drupal commerce creates a project directory and puts the site in a web directory within the project. On a shared ...
goldfish's user avatar
1 vote
1 answer
251 views

Unable to install lullabot/amp and sensiolabs/security-checker

i have installed amp and composer manager today i have been trying to get lullabot/amp installed, i have managed to install composer and drush on my computer but im not sure if they have been ...
twizz's user avatar
  • 11
1 vote
0 answers
533 views

Why does the "drush status" command result in "Permission denied"?

I installed Drush via global Composer, and it seems that it should have installed correctly. However, when I executed drush status in terminal, it resulted in Permission denied. Why is this happening ...
marcello's user avatar
1 vote
1 answer
2k views

Can't update to 8.9.1 after migrating from webflo/drupal-core-strict to drupal/core-recommended

I successfully updated my drupal 8.7.8 site to 8.9.0 following the instructions on 'Migrate composer project for Drupal earlier than 8.8.0' Drupal documentation page, section 'Migrating from webflo/...
Paolo's user avatar
  • 11
0 votes
0 answers
25 views

Impossible to change admin password, script gives me different hash every time (???)

Context: Drupal 9.14 installed on a small EC2 server for testing After a composer update, my admin password stopped working (first strange event). I decided to use the password-hash.sh to recreate one ...
ZozoIT's user avatar
  • 1
0 votes
0 answers
18 views

Drupal wouldn't acknowledge receiving updates, so I tried running the update in GitPod terminal and now Drupal is messed up!

I setup a Drupal 10.0 test site (to do the LinkedIn Learning courses) on a windows machine using some combination of WSL, Composer, XAMPP. I would access it at https://imrodmartin-ddevgitpod-...
MJX's user avatar
  • 1
0 votes
1 answer
149 views

I am trying to upgrade and Composer is complaining. How do I figure out what the actual issue is and fix it?

I am trying to update my Drupal 9 site to Drupal 10. I installed the Upgrade status module (and removed it before trying to update); my site is good with the exception of updating the Dynamic Entity ...
Eluchel's user avatar
  • 325
0 votes
0 answers
85 views

Getting existing composer managed site to legacy-project composer managed

[Update] I seem to be making some actual progress by just replacing the the composer.json with https://github.com/drupal/legacy-project/blob/8.9.x/composer.json and then doing a composer require [all ...
Chris Rockwell's user avatar
0 votes
0 answers
57 views

Composer.lock does not match project versions

I have a drupal site developed using the core-recommended project, and I maintain the site using the recommended practices on drupal.org. Recently after adding a new developer to the project, Composer ...
Ryan Schwab's user avatar
0 votes
0 answers
305 views

Composer install times out with a bind-mounted volume running Composer through Docker

I've been working on trying to set up a Drupal 10 local development instance on my Windows machine and keep running into an issue of the Drupal installation failing when I have a volume mounted. ...
Nathan Healea's user avatar
0 votes
0 answers
275 views

How can I provide composer with a twig version that it's okay with, so I can roll back Drupal to a version that will work with PHP 7.4?

I inherited a broken Drupal 9 site. Drush could not be made to work, so I deleted the vendor directory, renamed composer.lock and reinstalled. This has worked for me before on broken sites. Now I ...
Deej's user avatar
  • 41
0 votes
0 answers
88 views

Issues updating opigno_lms from 2.16.0 -> 2.29.0 -> 3.x using composer

Having an issue with updating an old Opigno server from 2.16 to 3.0 via 2.29. For those unfamiliar, it's a distribution of Drupal that has some extra features for lessons, courses, etc. When ...
Noah Bailey's user avatar