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
1 answer

How do you update database when using composer/jenkins and wordpress with plugins?

I am trying to get wordpress and all plugins managed by composer. I have followed instructions including: https://roots.io/using-composer-with-wordpress/ and other similar instructions found here: Composer => Wordpress plugin workflow However my…
hanco ike
  • 285
  • 2
  • 14
4
votes
1 answer

php composer inside container lost vendor directory

I have the following Dockerfile FROM bitgandtter/sf:php7 # basic env fix ENV TERM xterm # install packages ADD . /var/www # update dependencies RUN cd Helpers && SYMFONY_ENV=prod composer update -o --no-dev ENV …
bitgandtter
  • 2,179
  • 6
  • 31
  • 60
4
votes
3 answers

When PHP built in server crashes, the port is still in use

I'm using PHP built in server like so: $ composer serve > php -S localhost:8000 -t public/ But it timed out..? [Symfony\Component\Process\Exception\ProcessTimedOutException] The process "php -S localhost:8080 -t public/"…
Martyn
  • 6,031
  • 12
  • 55
  • 121
4
votes
0 answers

Composer install history re-written error

When I try and run composer install I am seeing the following error for my project: Installing symfony/yaml (dev-master 8bae579) Downloading Failed to download symfony/yaml from dist: Could not authenticate against github.com Now trying to download…
Matthew Fedak
  • 772
  • 9
  • 16
4
votes
1 answer

Composer - don't use autoload and load single classes?

Brand new to composer. Have it installed and running and have since installed two packages to use on my site by requiring the autoload at the top of the page : require $_SERVER['DOCUMENT_ROOT'].'/../vendor/autoload.php'; then my use…
user756659
  • 3,372
  • 13
  • 55
  • 110
4
votes
3 answers

Cannot run 'composer update' on Yii2 project: yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable

I deleted my vendor/ directory and ran composer update, but it's giving me an error. $ composer update Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an…
Chloe
  • 25,162
  • 40
  • 190
  • 357
4
votes
1 answer

Composer requrie ext-redis

I'm trying to set phpredis extension as a requirement for my application. Here is my composer.json: "ext-redis": ">=2.2.7" A've also tried these options: "^2.2.7", 2.2.7@dev But all the time I'm getting the error below: Problem 1 - The…
ozahorulia
  • 9,798
  • 8
  • 48
  • 72
4
votes
3 answers

Fatal error: Class 'LaravelLocalization' not found after composer install in production

It's been 3 days since I'm working on translating my site, so I installed LaravelLocalization: I did everything working in local, then I pushed it in production and executed: composer install --no-interaction --no-dev php artisan clear-compiled php…
Juliatzin
  • 18,455
  • 40
  • 166
  • 325
4
votes
0 answers

Composer Php "installer corrupt"

For my new project, like for the others, I want use composer. But when I install it, I get this message : 'Installer corrupt' Do you know how I can fix it ? Thank's
Swarovski
  • 581
  • 2
  • 8
  • 25
4
votes
3 answers

gearman is missing from your system

Description Trying to install the laelaps/symfony-gearman-bundle via composer require laelaps/symfony-gearman-bundle with a few errors, and I'm having a hard time understanding what they mean. Error Problem 1 - laelaps/symfony-gearman-bundle…
kemicofa ghost
  • 16,349
  • 8
  • 82
  • 131
4
votes
1 answer

Loading unnamespaced classes using composer

I have the following structure application: controllers: - SomeController.php - SomeOtherController.php public: - index.php I am including certain packages using composer. I would like to find a way to autoload my…
Peter
  • 8,776
  • 6
  • 62
  • 95
4
votes
2 answers

Load vendor assets from custom directory - cakephp 3

I want to create vendor package in cakephp 3. It should depend on another package, that has both php files and some static assets: like js, css, img etc. Setting up php files autoloading I am able to handle. However to load static files from another…
dav
  • 8,931
  • 15
  • 76
  • 140
4
votes
1 answer

Laravel 5.1 Auth::attempt() doesn't work after Composer update

My project in Laravel 5.1 and I can't login after Composer update Everything was working before I run composer update I'm using standard built in Laravel's register and login process the function Auth::attempt() in AuthController.php always returns…
Tomer Ofer
  • 378
  • 3
  • 15
4
votes
1 answer

How to automatically choose default parameters when running "composer install" instead of pressing enter to confirm?

When I install symfony2 project, i run "composer install" and for each parameter in parameter.yml I have to choose in the console the value. All I need is to let the console choose the default value instead of pressing enter for every…
scorp1on
  • 103
  • 1
  • 8
4
votes
2 answers

travis+composer repeatedly failing when loading Symfony 2.8.3

Installing symfony/symfony (v2.8.3) Downloading: 85%PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 6553600 bytes) in…
craigh
  • 1,909
  • 1
  • 11
  • 24