franzliedke / studio

A workbench for developing Composer packages.
MIT License
1.14k stars 73 forks source link

Load Studio packages before dump #78

Closed Arcesilas closed 6 years ago

Arcesilas commented 7 years ago

By default, when running composer dump-autoload, Studio packages are not loaded. Because of it, their autoload directive, in their composer.json is not included in composer root autoload. To have them included, it's required to composer update which is much longer and not the appropriate way to just dump-autoload.

franzliedke commented 6 years ago

So, are you suggesting that with this change you could simply call composer dump-autoload straight after running studio load your/package?

I don't see how this should work, given that composer update (or install) needs to be executed at least once for the symlink to be generated.

Arcesilas commented 6 years ago

Wow... been a while... :)

I think I remember I had a problem with autoload not correctly generated since packages loaded (symlinked) with studio were not added. when running composer dump-autoload. I don't remember how I got to this modification, where I found ScriptEvents::PRE_AUTOLOAD_DUMP, but I guess it solved the problem I had...

Anyway, I've recently experienced this same problem, while using the version with this modification... I'm sorry I cannot tell you more :/

franzliedke commented 6 years ago

Thanks for responding so quickly!

Okay then, I think this will be fixed in the course of fixing #52 by merging #73.