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
4
votes
2 answers

Change Composer PHP Version Path Plesk

RESOLVED : For plesk users you need to make nano .bash_profile when you are in the file add this line : PATH=/opt/plesk/php/7.1/bin:$PATH it will work for ssh users !! for root ssh user you can do : export…
Mathieu Mourareau
  • 1,140
  • 2
  • 23
  • 47
4
votes
2 answers

How can I update jquery to version 3.* in yii2 project using composer

I have a project which is working off of yii2's advanced template. When I checked the version of jquery in vendor/bower/jquery/dist/jquery.js the current version is 2.2.4. I want to update this version to version 3.2.1 but doing a composer update…
natral
  • 986
  • 1
  • 18
  • 42
4
votes
1 answer

Using Composer scripts defined in composer.json, how to display phpunit colors?

Context I'm using Composer scripts defined in my composer.json file to run unit tests in my application. My composer.json: { "name": "my company/my_application", "description": "Description of my application", "license": "my licence", …
darckcrystale
  • 1,582
  • 2
  • 18
  • 40
4
votes
2 answers

Composer install with only composer.lock

I freshly installed a PHP application given with a composer.lock file. When running composer install, command line tool is still asking for a composer.json.... I don't have. In composer documentation, it's said that install command first look for a…
marcoooo
  • 417
  • 4
  • 11
4
votes
1 answer

PHPUnit is not reading configuration file?

I want to install PHPUnit with composer and followed this tutorial: https://jtreminio.com/2013/03/unit-testing-tutorial-introduction-to-phpunit/ I added { "require-dev": { "phpunit/phpunit": "3.7.14" }, "autoload": { …
Adam
  • 25,960
  • 22
  • 158
  • 247
4
votes
2 answers

Composer Update Failed cannot open shared object file:

I just run composer update but I got this Failed loading ./opcache.so: ./opcache.so: cannot open shared object file: No such file or directory PHP Warning: PHP Startup: Unable to load dynamic library './pdo.so' - ./pdo.so: cannot open shared…
Dark Cyber
  • 2,181
  • 7
  • 44
  • 68
4
votes
1 answer

Laravel Artisan make command issue

I am trying to make a middleware using artisan php artisan make:middleware AuthorizedUserOnly but I get ErrorException like below. file_get_contents(/mysite.com/www/local/composer.json) Failed to open stream no such file or directory. This is my…
4
votes
1 answer

ignore dev dependencies in php composer

I have developed a composer laravel based project that I need to install on a remote production server. The problem is I have limited permission/ access so my option is to "archive" the package( using composer archive) and unpack on the production.…
Kendall
  • 5,065
  • 10
  • 45
  • 70
4
votes
2 answers

How to remove extension from vendor?

I have cloned a project written in Yii2. There are some extensions in vendor folder which I want to remove them from project. How can I do this? I am sure they are installed using composer because they are noted in composer.lock file.
hd.
  • 17,596
  • 46
  • 115
  • 165
4
votes
2 answers

PHP codesniffer path to whole project

I`m new to this but i have installed composer and with it installed PHP Codesniffer. Now, how can i use php codesnifer to check for files in my entire project folder? My directory structure is something like this: ProjectName functions …
Cata John
  • 1,371
  • 11
  • 19
4
votes
0 answers

Composer SSL: An existing connection was forcibly closed by the remote host

I'm trying to install a new package from composer using composer require but then an error was showed existing connection was forcibly closed by the remote host. send of 95 bytes failed with errno=10054 An existing connection was forcibly closed by…
Bang Fady
  • 151
  • 2
  • 13
4
votes
1 answer

the packagist could not be downloaded 404 not found

I'm using Laravel 5.4 and my composer version is 1.4.1. I tried to install package composer require 'name package' but always failed. Output: C:\xampp\htdocs\dhuha_service_admin>composer require intervention/image -vvv Reading…
4
votes
0 answers

Class 'Doctrine\Common\Inflector\Inflector' not found

I'm setting a Laravel project into a server, but I had this problem when I used "composer install". I have done exactly the same in local, followed the same tutorials and I didn't have this problem. I'm using ubuntu 16.04 for both. Here is my…
Ray Montiel
  • 59
  • 1
  • 3
4
votes
2 answers

File ./vendor/autoload.php missing or not readable in phpmyadmin

This question is different from: https://stackoverflow.com/questions/36150377/missing-vendor-autoload-php I want to contribute to phpmyadmin. I cloned the github repo in my machine using Github Desktop software. I copied the downloaded files in…
Kashyap Kotak
  • 1,888
  • 2
  • 19
  • 38
4
votes
1 answer

How to run docker-compose with php-fpm and php-cli?

I need to run docker-compose with two containers,- php-fpm and php-cli. Although I need another container with composer. When I run docker-compose up -d - container with php-cli become always restarting and composer container just stops.
troitskyA
  • 103
  • 2
  • 7