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 in a directory inside your project.

By default it will never install anything globally.

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

Useful links

  • Current documentation: The main source of documentation for the project.

  • Packagist: It is the main Composer repository.

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

  • The source code is available on GitHub and distributed under MIT license.

  • Composer as a service: copy/paste your composer.json and get the vendor.zip file of your dependencies.

    Also, you can check the log of your build; it could be useful for debug.

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

10003 questions
3
votes
1 answer

Task of composer dump-autoload

What does this instruction composer dump-autoload exactly do? Especially before migrating in Laravel
parastoo amini
  • 1,496
  • 13
  • 28
3
votes
1 answer

How do I disable filp/whoops package in Laravel 5.5 without removing it?

Laravel 5.5 app. Originally 5.3. I installed the filp/whoops package as per the upgrade guide, but now I want to disable it, as I believe it is causing "out of memory" errors on my Homestead machine whenever I encounter an error, which is really…
fronzee
  • 1,396
  • 2
  • 17
  • 30
3
votes
0 answers

Composer fails when installing a dependency of a dependency, but not when the dependency is installed directly

I have a main composer.json that has the following among others "type": "project", "repositories": [ { "type": "path", "url": "../packages/example/example/", "options": { "symlink": true } …
3
votes
2 answers

using USE and Namespace (composer)in sample php file

I have sample PHP file, i run composer install and got Monolog library. when I trying their installation guide I get error 500. When I put the following code in sample file I get error 500 on new Logger row. Maybe I have autoloader? Is it possible…
Tuz
  • 1,106
  • 13
  • 41
3
votes
2 answers

Laravel installer v1.4.1 not compatible with PHP 7.1 packages?

I can't install 'laravel 5.5' on fresh 'Pop!_OS' (based on Ubuntu 17.10 by system76) linux instalation. Can't find how to 'remove symfony/console v4.0.1'. So can anyone help me solve this annoyance? I followed…
3
votes
3 answers

The requested PHP extension ext-mysql * is missing from your system. in php 7.1.7

I am trying to deploy php app on heroku. I have added tables to clearDB but stuck on this part: after adding "ext-mysql":"*" this line in composer. json it thows me error saying ERROR: Your 'composer.json' lists dependencies inside 'require',…
Thesoham24
  • 186
  • 1
  • 3
  • 16
3
votes
1 answer

composer error: [Composer\Downloader\TransportException] Content-Length mismatch

After installing composer I check it with this command: composer diagnose And all things are OK. When I run this command for latest version of Laravel: composer global require "laravel/installer" I get…
Mohammad
  • 31
  • 1
  • 3
3
votes
0 answers

Symfony: how to setup a development environment for bundles

I want to create a new bundle my-bundle that I can use withing many other Symfony 3 apps that I have, such as my-app with the flowing dir structure. projects my-app composer.json my-bundle composer.json my-app/composer.json "require":…
numediaweb
  • 13,837
  • 11
  • 59
  • 100
3
votes
2 answers

Laravel 5.2 - Error while installing laravel using composer with git bash

I am new to laravel, and while installing laravel using composer I am seeing an error. I tried finding the solution, but end up finding nothing. I also tried composer update. But still face issue while installing, below is the…
topper1309
  • 171
  • 1
  • 13
3
votes
1 answer

Composer error: no matching package found

I have two Symfony projects: project-a (root project) and project-b. My composer.json file from project-a contains: { "name": "myprojects/project-a", "require": { "myprojects/project-b": "dev-master", }, "repositories": [ { …
Wildchild
  • 203
  • 3
  • 16
3
votes
1 answer

How to manage tinymce language packs with composer

How to manage tinymce language packs with composer? They are downloaded separately via https://www.tinymce.com/download/language-packages/. But if i add it into the composer folder it get overwritten via composer automatically.
lcase
  • 33
  • 4
3
votes
1 answer

Using an ssh key with composer for a private vcs

I'm trying to pull a private package hosted on Bitbucket into my project but I can't seem to get composer to work correctly with my SSH key. I'm currently trying: { "type": "composer", "url": "https://packagist.org" }, { "type": "vcs", …
Harry Loyd
  • 319
  • 1
  • 5
  • 14
3
votes
6 answers

Composer could not install tymon/jwt-auth

Please assist, composer could not install tymon/jwt-auth:0.5.* I had type : composer require tymon/jwt-auth:0.5.* i also tried to add the ff in projects composer.json: require { .... "tymon/jwt-auth": "dev-master", .... } and…
Neo Sono
  • 127
  • 2
  • 15
3
votes
1 answer

composer autoload file after classmaps are loaded

I have "autoload": { "psr-4": { "ACME": "src/", }, "classmap": ["src/"], "files": ["mapper.php"], "exclude-from-classmap": ["mapper.php"] }, in mapper.php I'm trying to give different namespaces for some…
Thellimist
  • 2,939
  • 3
  • 26
  • 43
3
votes
0 answers

How to configure Artifactory for Drupal 8 with packages.drupal.org/8 as source of drupal packages

I'm trying to setup an Artifactory PHP Composer repository. In Artifactory repository configuration, we got to set 2 parameters: - URL - Registery URL For Drupal 8 with packages.drupal.org/8 as source of drupal packages, I tried with those…
linyifan
  • 31
  • 4
1 2 3
99
100