On the question of the size of the laravel and yii framework project packages, why are the packages downloaded by composer more than 100m?

such as the title
vendor extension and many are not used,
how to make a reasonable choice and delete?

Apr.05,2021

use composer remove some/package directly to remove useless dependencies.

if you modify composer.json and reinstall with composer update , all other dependencies will be updated, and the updated dependency library is not guaranteed to be fully compatible with the previous code. If the product is already online, try not to do so. It doesn't matter if the product is only in the development stage.

https://codeshelper.com/q/10.

in fact, the best management method is to use which dependency to install which dependency. Don't install all kinds of dependencies that seem to be available at the beginning of the project.
dependencies that are abandoned midway should be deleted in a timely manner.


this is normal. A depends on BBJ and b depends on c. Wait.

do not directly modify the files under vendor.
reason

  1. vendor itself is not versioned. Difficult to track
  2. changed the next time you execute composer install or update. The original modification is gone.

the correct way to delete is to modify composer.json to remove packages that you know are really useless to you. Then reinstall.

Menu