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

Composer.json getting latest package version and

For each new project, I want to: Get the latest versions of all packages inside composer.json Once I have them I no longer want to get the latest - just the version of the first run. I know I could manually specify latest versions from…
Pete Norris
  • 1,056
  • 7
  • 24
  • 36
4
votes
3 answers

Cannot use 'PhpParser\Node\Scalar\String' as class name as it is reserved

When I use the composer to install Laravel 5 I get this error: Cannot use 'PhpParser\Node\Scalar\String' as class name as it is reserved in …
葛文瑞
  • 43
  • 1
  • 3
4
votes
1 answer

Composer Install/Update stopped working

Suddenly my Composer has stopped working. Whenever I run composer update, it doesn't progress after this: Loading composer repositories with package information Updating dependencies (including require-dev) I tried another Laravel project,…
nirvair
  • 4,001
  • 10
  • 51
  • 85
4
votes
2 answers

How to use composer with phpbrew?

I installed phpbrew to use php 5.4 in Ubuntu 14.04. It works fine, except when I try to use composer, which ignores phpbrew and installs dependencies related to php 5.5. Is there a way to force composer to be compatible with phpbrew config? I…
nitche
  • 121
  • 3
  • 13
4
votes
0 answers

Composer install, PHP extension GD is missing

So I'm trying to deploy my git project to my linux server. After I cloned it I'm trying to do a composer install to get everything up and running but I'm getting an error doing so. brianmcdo/image-palette dev-master requires ext-gd * -> the…
4
votes
1 answer

File missing in Laravel

I setup a Laravel project with composer command. When I open the browser to access the page I get a fatal error like this: Fatal error: require(): Failed opening required 'C:\xampp\htdocs\Learning Laravel\bootstrap/../vendor/autoload.php'…
Borut Flis
  • 15,715
  • 30
  • 92
  • 119
4
votes
1 answer

Understanding PSR-4 Composer without any framework

I try to understand and learn how it works PSR-4, because I like refactor with this standard, a little app. According several manuals, and post on stack overflow, my structure and files are ok. /vendor /abkrim /rclub /src/ …
abkrim
  • 3,512
  • 7
  • 43
  • 69
4
votes
1 answer

The right way to distribute my php libraries on Bitbucket

I'm a litte confused about the right way to use Composer and Bitbucket regarding the distribution of my libraries, maybe because I'm a newbie both in Composer and Bitbucket. My problem is: I have two repositories on Bitbucket, the first one is a…
Giorgia
  • 41
  • 3
4
votes
1 answer

Laravel - Composer unable to find the service provider class

I have been creating a Laravel package (a Middleware). My folder structure looks like the following: laravel-censor/ config/ sensor.php src/ CensorMiddleware.php LaravelCensorServiceProvider.php composer.json And…
Kamran Ahmed
  • 11,809
  • 23
  • 69
  • 101
4
votes
1 answer

How to tell the list of classes under a namespace

How might I filter through the entire namespace hierarchy to see if my packages have auto-loaded successfully (and for additional processing on those classes) I have looked for similar questions on SO but none seem to have answered for this specific…
HowApped
  • 1,001
  • 3
  • 12
  • 22
4
votes
1 answer

Add custom package to composer.json file

I have a custom package that is not uploaded on github or packagist and I need to add it to a Laravel 5.1 project. This is my package folder structure: Packages \_ christian \_ smsservice \_src \_ Facades \_…
Christian Giupponi
  • 7,408
  • 11
  • 68
  • 113
4
votes
2 answers

How to handle this error on WampServer: Class 'Composer\Autoload\ClassLoader' not found?

I developed a website using Symfony2. Unfortunately, the website was deleted on the hard disk and I lost all my work. However, I have succeed to recover my project sources folder (the one that was in www folder of Wampserver) thanks to a files…
Nadim2014
  • 105
  • 2
  • 10
4
votes
3 answers

Empty services.json file is breaking site

I'm getting the Whoops, looks like something went wrong. on my production server. All the sudden, no artisan commands are working. I was getting an error on /bootstrap/compiled.php:4496. After removing compiled.php, I'm getting the same message…
Erin
  • 5,315
  • 2
  • 20
  • 36
4
votes
3 answers

Trying to update composer in Yii2

I want to update the composer: but i am getting following errors: Problem 1 - yiisoft/yii2-mongodb 2.0.4 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system. - yiisoft/yii2-mongodb 2.0.3 requires…
Pathik Vejani
  • 4,263
  • 8
  • 57
  • 98
4
votes
2 answers

Composer(Laravel5) Failed to decode response: zlib_decode(): data error

I am trying to install laravel 5.1 dependencies using composer. I have installed the latest version of composer that is: Composer version 1.0-dev (a54f84f05f915c6d42bed94de0cdcb4406a4707b) 2015-10-13 13:09:04 But when i run composer install on…
Saad Mehmood
  • 691
  • 1
  • 7
  • 19
1 2 3
99
100