Questions tagged [composer]
Use it for questions about the PHP application library dependency manager (Composer).
130
questions with no upvoted or accepted answers
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 ...
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-...
4
votes
1
answer
128
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 ...
3
votes
0
answers
1k
views
Composer install is asking me user and password for a contrib module
I'm installing my own clone of a Drupal project and when I'm launching Composer Install, in the drupal/calendar, ask me an git.drupal.org id to download the module...what can I do?
3
votes
0
answers
795
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 ...
2
votes
0
answers
73
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. ...
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
1k
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 ...
1
vote
0
answers
67
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 ....
1
vote
0
answers
34
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/...
1
vote
0
answers
52
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/...
1
vote
0
answers
140
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 ...
1
vote
0
answers
389
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\\...
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 ...
1
vote
0
answers
47
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.
...
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 ...
1
vote
2
answers
187
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 ...
1
vote
0
answers
178
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 ...
1
vote
0
answers
331
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
1
vote
0
answers
129
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 ...
1
vote
0
answers
59
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,...
1
vote
0
answers
282
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 ...
1
vote
0
answers
33
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 ...
1
vote
1
answer
455
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 ...
1
vote
0
answers
142
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-...
1
vote
0
answers
967
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 ...
1
vote
1
answer
410
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 ...
1
vote
0
answers
925
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/...
1
vote
1
answer
697
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....
1
vote
0
answers
943
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/...
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 ...
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 ...
1
vote
1
answer
248
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 ...
1
vote
0
answers
488
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 ...
1
vote
1
answer
1k
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/...
0
votes
0
answers
51
views
After updating drupal-core with composer accessing my website gives an unexpected error
The site was working. I then ran composer require drupal/core -W which upgraded drupal/core from 9.5.4 to 10.0.4, as well as all its dependencies.
Full error I see (after adding $config['system....
0
votes
0
answers
110
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 ...
0
votes
0
answers
47
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 ...
0
votes
0
answers
123
views
I cannot install a module
I have installed a Drupal 8.0.0 local test site in Windows 7 and I am trying to install Devel via Composer, running: composer require drupal/devel:^4.1. I get the following message in the command line:...
0
votes
0
answers
110
views
Docker4drupal provides images with drupal files inside php/nginx container, how to have them at my OS file system?
Maybe I just don't get this d4d thing. But why do I even use their docker-compose file if I still need to grab Drupal files from another repo?
Using d4d is even more cumbersome than just going ...
0
votes
0
answers
112
views
Create Custom Composer create-project with private BitBucket
I have a private repository on Bitbucket for standing up a new site via composer. This repository contains a composer.json file. This file points to mostly drupal/PROJECT_NAME for version control. I ...
0
votes
1
answer
66
views
Installing specific git releases via composer
I'm trying to install a specific release version of a library (pdf.js) into my D9 site, to which I've followed this example, and I have this in my composer file
"repositories": [
{
...
0
votes
0
answers
86
views
How to version control with Git whilst using composer?
So I've been going through the steep learning curve from D7 to D9.
I like to use git for deployment and version control. I'm new to composer as I only know Drupal and it was never used.
I've developed ...
0
votes
1
answer
35
views
How to load a sandbox project via composer and enable other devs on project to commit to the sandbox project
I'm working on an install profile right now in Drupal (https://www.drupal.org/sandbox/jnicola/3277854). I want to while developing the next project we're on also build this out during the initial part ...
0
votes
0
answers
46
views
unapplied patch reinstall the drupal core
I've upgraded a site from d8 to d9. And I'm rewarded with this error :
- Applying patches for drupal/core
https://www.drupal.org/files/issues/2021-03-15/...