E
E
Evgeny Musonov2021-03-02 11:35:13
Composer
Evgeny Musonov, 2021-03-02 11:35:13

Why does composer install extra packages?

I have a clean project and my composer.json looks like this:

"require": {
    "firebase/php-jwt": "^5.2",
    "phpmailer/phpmailer": "^6.1",
    "aura/sqlquery": "^2.7",
    "phpoffice/phpspreadsheet": "^1.16",
    "php-di/php-di": "^6.3",
    "nikic/fast-route": "^1.3"
  },
  "require-dev": {
    "phpdocumentor/phpdocumentor": "2.*",
    "codeception/codeception": "^4.1",
    "codeception/module-phpbrowser": "^1.0.0",
    "codeception/module-asserts": "^1.0.0",
    "codeception/module-webdriver": "^1.1",
    "codeception/module-rest": "^1.2",
    "codeception/module-db": "^1.0"
  }

But after composer install, symfony, zend and other packages are installed. How can I uninstall these packages?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Sarvarov, 2021-03-02
@evmusonov

composer.json contains your project's dependencies on these libraries.
But these same libraries may contain other dependencies that will be reflected in composer.lock (in composer.json, however, it will not be reflected).
Those. the fact that you download packages that are not in composer.json is normal and there is no way to get away from this, because this is a necessity.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question