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
3 answers

Missing PHP extension zip when trying to install laravel from composer

I have seen this question answered on other posts here, but none of the answers work for me. Mostly because I'm trying to install laravel locally on my mac and the answers are for Linux environments and brew claims it doesn't have this extension.…
WTFranklin
  • 2,454
  • 4
  • 21
  • 28
4
votes
1 answer

Artifactory local Composer repository won't download a package

I have a local composer repository in Artifactory named php-test. I have used the user interface to deploy a zip file representing a package. When I then attempt to do a composer install I get the following error: Package operations: 1 install, 0…
4
votes
0 answers

@php artisan package:discover handling the post-autoload-dump event returned with error code 255

My local machine (Ubuntu 18.04) has had issues this morning and I've had to repair the git HEAD. Now, I can use git normally with no errors but I am having to run composer update --no-scripts instead of composer update due to the following…
sdexp
  • 756
  • 4
  • 18
  • 36
4
votes
3 answers

Composer Require 'package' throws OpenSSL error

This problem seems to be common, and i've been through a lot of SO posts related to it and nothing works, and i'm going crazy. Whats weird is that it was working perfectly few weeks ago, and i didnt install anything new since months... Setup :…
Elbarto
  • 1,213
  • 1
  • 14
  • 18
4
votes
2 answers

Unable to load dynamic library 'php_wincache.dll'?

Because I already use ASP.NET I decided to use PHP on IIS, I install it using Wep PI but when I trying to install Composer he fails with PHP settings error. I tried to change the extension_dir to absolute and uncommented php_wincache extension in…
4
votes
3 answers

How to install Phar on Ubuntu?

I got into a situation where if I run composer install on my PHP project, I get this error: Fatal error: Class 'Phar' not found in /usr/local/bin/composer on line 23 As I read composer update class phar not found, I tried to check if Phar was…
Arnaud
  • 4,884
  • 17
  • 54
  • 85
4
votes
1 answer

Why won't composer use OPcache?

I added "require": { "ext-opcache": "*", to composer.json for an eDirectory Symfony 2.8 app, but it gave me an error: $ composer update Loading composer repositories with package information Updating dependencies (including require-dev) Your…
Chloe
  • 25,162
  • 40
  • 190
  • 357
4
votes
3 answers

Composer require-dev problems

i have installed developer mode on windows at work, and i have a lot problems with installing some programs/features that i need to run project. One of problems is when i run composer install or composer install --no-plugins --no-scripts, it always…
Rade Ilijev
  • 61
  • 1
  • 5
4
votes
4 answers

chmod(): Operation not permitted

on composer install on my smfony project, I get always this message. Seems that all permissions are well done. user@ubuntu:/var/www/html/sf-test$ composer install Loading composer repositories with package information Installing dependencies…
n00n
  • 654
  • 1
  • 10
  • 30
4
votes
1 answer

'composer' is not recognized as an internal or external command, operable program or batch file

I have installed the composer also and the path is also well defined but when I type composer update then the following error appears. 'composer' is not recognized as an internal or external command, operable program or batch…
THEE NES
  • 115
  • 1
  • 1
  • 12
4
votes
1 answer

How to tell composer to ignore php version for a specific package?

I can't seem to install a package because I need to use php 5.6 and the minimum is 7. I tried composer require mopo922/laravel-treats --ignore-platform-reqs [InvalidArgumentException] Could not find package mopo922/laravel-treats at any…
orbitory
  • 1,090
  • 5
  • 16
  • 40
4
votes
1 answer

Twig_Error_Runtime ; the "core" extension is not enabled ; symfony

I've inherited a Symfony/PHP web app codebase with zero documentation. I'm a nodejs dev so you can image the fun...! Anyway I'm getting there, my focus atm is to be able to run the project locally. Here's the Symfony version: Symfony version 2.7.16…
ajonno
  • 2,140
  • 4
  • 20
  • 33
4
votes
1 answer

Can't run composer command in cmd

Successfully install composer with their instruction but I can't check composer version. I also add path in environment. Which things left that I need to do? User Variables System Variables Command line
Mr.Pyae
  • 33
  • 7
4
votes
1 answer

How to force dev-dependencies from a dependency to also install with composer?

I'm currently working on a package (cms), which has a dev-dependency to a certain package (code-generator) to create code. This package is not needed in production. However, when creating a website that uses the cms package, dev-dependencies…
Kaz
  • 63
  • 7
4
votes
3 answers

Unable to install phpunit ,Conclusion: don't install phpunit/phpunit 6.5.8

I have php 7.0.29 version installed on my vagrant setup on windows 10. When I run following command composer require --dev phpunit/phpunit I get errors as mentioned Using version ^6.5 for phpunit/phpunit ./composer.json has been updated Loading…
Mukesh
  • 7,630
  • 21
  • 105
  • 159