Forcing the composer to regenerate startups when the layout is changed. json dependencies?

My workflow for developing symfony packages is as follows:

  • install symfony
  • create a git repository for the new package, put the composer.json file there
  • requires a new package at the top level composer.json using the @dev version
  • composer update newpackage => package is loaded using git clone
  • work with git clone inside vendors, commit and push from it

This is all fine and dandy, but it seems to break in one specific case: if I change the "autoload" tag of an already installed package, it seems that Composer can hardly take it into account:

  • I tried 'composer dumpautoload' and it does nothing
  • I do not want to delete the composer.lock file, since I do not want other packages to be updated to a newer version, I want to change the startup configuration of this package
  • I tried to manually remove vendor / composer / installed.json, and it happened that Composer reloaded all the providers and destroyed all the data that was there at that moment.

The same problem occurred when I changed the startup section of the package on a separate clone, pushed the changes to git and ran 'comper update mypackage' - although this could be due to the package not receiving ping from github.

I can, of course, manually modify the composer.lock and vendor / composer / installed.json files, but that seems too hacky. It also does not guarantee that the user will download the package for the first time after seeing that it is working.

+6
3

dumpautoload vendor/composer/installed.json, composer.json. .

+3

:

./composer.phar dumpautoload -o

composer.json , .

+2

The instal.json file is updated only at startup

composer update
0
source

Source: https://habr.com/ru/post/1606052/


All Articles