Developer added composer packages

Summary

I have a website in Modx 2 that is dependent on composer packages. For this website I have placed the vendor directory within the /core/ directory and loaded the autoloader from the config.inc.php file, however Modx 3 has it’s own vendor directory with it’s own packages. Upgrading will of course override my own and render quite a lot of functionality of the website broken.

Is there a way to add more packages to the vendor directory? I am not noticing any composer.lock file that I can use for this. Of course I can move my vendor directory and load it separately again but this seems rather ugly to me and if possible I’d like to avoid this.

Expected behavior

Have the possibility to add composer packages

Environment

Modx 3.0.4

The MODX extras with dependencies all have their own “vendor” directory and composer.json file inside core/components/<package_name>. So I suppose this is the standard way of doing this.

I don’t think so.

Ah okay, I feared as much. I’ll figure out something on how to prevent duplication.

Thanks for your answer!