Questions tagged [composer-php]

Composer is an application-level package manager for the PHP programming language. It provides a standard format for managing with ease PHP-based project dependencies (libraries) and was strongly inspired by Node.js's "npm" and Ruby's "bundler". Use with the [php] tag

Presentation

Composer is an application-level package manager.

Yes, it deals with "packages" or libraries, but it manages them on a per-project basis, installing them inside your project's directory.

By default, it will never install anything globally.

Thus, it is considered a PHP-based project package manager.

Useful links

It aggregates all sorts of PHP packages that are installable with Composer.

Also, you can check your build log; it could be helpful for debugging.

  • Packanalyst: Packanalyst is a service that lets you browse packages from Packagist and shows who is using and implementing your interfaces / abstract classes/traits.
11065 questions
125
votes
2 answers

How to remove globally a package from Composer?

I ran this command to install globally PHPUnit: composer global require 'phpunit/phpunit=3.7.*' Now I want to uninstall globally PHPUnit. Any ideas?
winkster
  • 1,353
  • 2
  • 8
  • 5
120
votes
6 answers

SHA384 is not supported by your openssl extension, could not verify the phar file integrity

I get the error when i run composer self-update on Windows 10 Here is the full error message composer self-update Updating to version 1.8.4 (stable channel). Downloading (100%) [RuntimeException] SHA384 is not supported…
ovicko
  • 2,242
  • 3
  • 21
  • 37
118
votes
18 answers

How to enable PHP's openssl extension to install Composer?

I am trying to install Laravel in WAMP setup. I am getting a warning message for not enabling openssl which I had already done in WAMP. Here is a screenshot of the message.
FirmView
  • 3,130
  • 8
  • 34
  • 50
117
votes
14 answers

Composer: file_put_contents(./composer.json): failed to open stream: Permission denied

I'm trying to install Prestissimo to an Ubuntu 16.04 server, but that leads to an error: $ composer global require "hirak/prestissimo:^0.3" Changed current directory to /home/kramer65/.composer [ErrorException] …
kramer65
  • 50,427
  • 120
  • 308
  • 488
117
votes
7 answers

Installing specific laravel version with composer create-project

The fastest and simplest way of installing Laravel is via composer command. From the laravel docs (http://laravel.com/docs/quick), it shows that we can install it with this: composer create-project laravel/laravel your-project-name…
user1995781
  • 19,085
  • 45
  • 135
  • 236
116
votes
10 answers

How to install PHP composer inside a docker container

I try to work out a way to create a dev environment using docker and laravel. I have the following dockerfile: FROM php:7.1.3-fpm RUN apt-get update && apt-get install -y libmcrypt-dev \ mysql-client libmagickwand-dev --no-install-recommends \ …
Andre
  • 4,185
  • 5
  • 22
  • 32
115
votes
18 answers

Disabling xdebug when running composer

When running composer diagnose, I get the following error : The xdebug extension is loaded, this can slow down Composer a little. Disabling it when using Composer is recommended. How can I disable xdebug only when I'm running Composer?
greg0ire
  • 22,714
  • 16
  • 72
  • 101
114
votes
1 answer

NPM/Bower/Composer - differences?

Can someone explain to me the difference between NPM, Bower and Composer. They are all package managers - correct? But when should each one be used? Also, each one appears to have a json file that accompanies it, does this store all the packages you…
panthro
  • 22,779
  • 66
  • 183
  • 324
114
votes
11 answers

Composer: The requested PHP extension ext-intl * is missing from your system

I am trying to use composer.json file. but, when I am trying to run command 'composer install' in my path/project/, I am getting an error: I have already configured my wamp for 'extension=php_intl.dll' and copied all icu*.dll in…
Nono
  • 6,986
  • 4
  • 39
  • 39
114
votes
6 answers

Problems with lib-icu dependency when installing Symfony 2.3.x via Composer

I've had no problems installing Symfony 2.2.x using Composer, I've always just copied the stable version at http://symfony.com/download. composer create-project symfony/framework-standard-edition myproject/ 2.2.1 (I have Composer installed…
Mark Fox
  • 8,694
  • 9
  • 53
  • 75
111
votes
16 answers

Why is PHP Composer so slow?

Why is PHP Composer so slow when all I do is init a project with zero dependencies? Here are the commands I run: composer init composer install Wait 3 minutes (not an…
AgmLauncher
  • 7,070
  • 8
  • 41
  • 67
111
votes
12 answers

Why composer install timeouts after 300 seconds?

I have small project made in symfony2 when I try to build it on my server it's always fails when unzipping symfony. Build was OK and suddenly composer won't unzip symfony and I didn't change anything. I tried to build with Jenkins and also manually…
zajca
  • 2,288
  • 4
  • 30
  • 40
110
votes
4 answers

Composer - the requested PHP extension mbstring is missing from your system

I've recently tried to install package through Composer, but I have got an error the requested PHP extension mbstring is missing from your system. I removed semicolon from php.ini, but it still doesn't work. What should I do?
Jozef Cipa
  • 2,133
  • 3
  • 15
  • 29
109
votes
7 answers

Can I Install Laravel without using Composer?

I'd like to know if I can install or use the Laravel PHP framework on any web server without using Composer (PHP package/dependency manager) every time? I would like to be able to drop my app on to any web server (like a shared server without access…
ryanwinchester
  • 11,737
  • 5
  • 27
  • 45
109
votes
3 answers

composer.lock: how does it work?

I'm trying to understand this part: http://getcomposer.org/doc/02-libraries.md#lock-file this lock file will not have any effect on other projects that depend on it. It only has an effect on the main project" Does that mean that if project P…
HappyDeveloper
  • 12,480
  • 22
  • 82
  • 117