When distributing Shopware Plugins as a ZIP file, it must include the vendor directory, but without the shopware/core, shopware/administration, etc. dependencies defined in the composer.json. That one I got to work.
But how to include dependencies, which themselves have dependencies, that overlap with the shopware/core dependencies?
Explicitly, I try to add a package, that depends (like Shopware itself) on psr/cache.
But when I include it, I receive the following error message, when activating the plugin:
Fatal error: Cannot declare interface Psr\Cache\CacheItemPoolInterface, because the name is already in use in /var/www/html/vendor/psr/cache/src/CacheItemPoolInterface.php on line 14
Is there any known workflow to solve these kinds of issues? The documentation, that Shopware provides, do not explain how to solve these kinds of conflicts.