Answer the question
In order to leave comments, you need to log in
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"
}
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question