Dependency installation adds extra dependencies

Asked

Viewed 25 times

2

This is the first time I’ve tried to work with composer, the purpose is to use only the PHPUnit, because I no longer use any dependencies. By installing composer, with the composer.json having only the PHPUnit as a dependency, it still installs other dependencies such as:

  • symfony
  • Doctrine
  • phpspec
  • bastian
  • phpdocumentor

I don’t know if they’re obligatory in composer or if he’s an 'intruder' and always installs it. I’ve heard of some of these dependencies, but I’ve never used it and I don’t know how to use it. What are each of them for in the project? Is it possible to delete? How?

1 answer

2


The package Phpunit to work needs some other packages (dependencies).

In the specification of your package sane:

inserir a descrição da imagem aqui

Any doubt between the corresponding website of package manager in the package Phpunit. Some are PHP libraries and others are packages like: symfony/yaml

Just remember that without these additional packages the main package does not work. There is another factor also noting that these other packages may have their own packages to work with as well.!

Note the item requires package (package), the item determines the dependencies of the package.

  • Ah, I didn’t know this detail, in this case, there are others like Doctrine that are not dependencies of Phpunit, but can be dependencies of others right?

  • @Ivcs all this is a logic where one depends on the other. Because it brings the non-repeating of code and a use since it is ready of the other. And very interesting and perfect logic. In the world . NET, JAVA, etc is also like this

Browser other questions tagged

You are not signed in. Login or sign up in order to post.