My workflow for developing Symfony bundles is the following:
This is all fine and dandy, but seems to break in one specific case: if I alter the 'autoload' tag of the already-installed package, it seems that Composer has a hard time taking it into account:
The same problem manifested itself when I did alter the autoload section of the package on a separate clone, pushed the changes to git and ran 'composer update mypackage' - although that might have been related to packagist not having received the ping from github.
I can of course alter by hand the composer.lock and vendor/composer/installed.json files, but that seems too hackish. It also does not gives the guarantee that user downloading the package the 1st time will see it working.
Try:
./composer.phar dumpautoload -o
It reads the composer.json
files and rewrites all the autoload files which pick up the new paths.
dumpautoload
uses the package information from vendor/composer/installed.json
and not the individual composer.json
files. You need to change the autoload info there, too.
The file installed.json is only being update when you run a
composer update
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With