shopware5 / SwagMediaS3

MIT License
22 stars 17 forks source link

2 Dependencies are missing #19

Closed GerDner closed 6 years ago

GerDner commented 6 years ago
        "league/flysystem": "~1.0",
        "guzzlehttp/guzzle": "~5.3.1"

Error: PHP Fatal error: Uncaught Error: Class 'GuzzleHttp\ClientInterface' not found in /Users/philippbucher/Sites/flugzeugshop/vendor/aws/aws-sdk-php/src/functions.php:265

Both Packages are missing in my composer.lock and in the vendor folder. Comment says that the 2 packages are provides by shopware. But i can't find them. I could provide a pull request, but i don't now what i have to change. Is ist because of the "replace" key in the composer.json?

GerDner commented 6 years ago

You have to remove

    "replace": {
        "league/flysystem": "~1.0",
        "guzzlehttp/guzzle": "~5.3.1"
    },

from the composer.json for this adapter to work with shopware 5.4 + I can create a pull-request if you guys think this is the right way.

mitelg commented 6 years ago

@janbuecker what do you think? the versions used in Shopware are:

"guzzlehttp/guzzle": "5.3.2",
...
"league/flysystem": "1.0.41",
mitelg commented 6 years ago

way to reproduce:

PHP Fatal error:  require(): Failed opening required '/home/mt/www/my_project_name/custom/plugins/SwagMediaS3/vendor/autoload.php' (include_path='/home/mt/www/my_project_name/engine/Library:/home/mt/www/my_project_name/vendor/shopware/shopware/engine/Library:.:/usr/share/php') in /home/mt/www/my_project_name/custom/plugins/SwagMediaS3/SwagMediaS3.php on line 12
PHP Stack trace:
PHP   1. {main}() /home/mt/www/my_project_name/bin/console:0
PHP   2. Shopware\Components\Console\Application->run() /home/mt/www/my_project_name/bin/console:16
PHP   3. Shopware\Components\Console\Application->doRun() /home/mt/www/my_project_name/vendor/symfony/console/Application.php:117
PHP   4. AppKernel->boot() /home/mt/www/my_project_name/vendor/shopware/shopware/engine/Shopware/Components/Console/Application.php:98
PHP   5. AppKernel->initializePlugins() /home/mt/www/my_project_name/vendor/shopware/shopware/engine/Shopware/Kernel.php:314
PHP   6. Shopware\Bundle\PluginInstallerBundle\Service\PluginInitializer->initializePlugins() /home/mt/www/my_project_name/vendor/shopware/shopware/engine/Shopware/Kernel.php:498
PHP   7. class_exists() /home/mt/www/my_project_name/vendor/shopware/shopware/engine/Shopware/Bundle/PluginInstallerBundle/Service/PluginInitializer.php:98
PHP   8. spl_autoload_call() /home/mt/www/my_project_name/vendor/shopware/shopware/engine/Shopware/Bundle/PluginInstallerBundle/Service/PluginInitializer.php:98
PHP   9. Symfony\Component\ClassLoader\Psr4ClassLoader->loadClass() /home/mt/www/my_project_name/vendor/shopware/shopware/engine/Shopware/Bundle/PluginInstallerBundle/Service/PluginInitializer.php:98
PHP  10. require() /home/mt/www/my_project_name/vendor/symfony/class-loader/Psr4ClassLoader.php:66
GerDner commented 6 years ago

Steps to get shopware 5.4 working with SwagMediaS3

  1. Remove the replace in the composer.json of SwagMediaS3
  2. install dependencies manually in custom/plugins/SwagMediaS3
  3. Commit vendor dendencies in custom/plugins/SwagMediaS3 or install the dependencies in your deploymentscript.
  4. don't forget to create the symlinks. (app/functions.sh) -> I forgot that.

This is a more than dirty workaround for now. So how can we fix that? I could provide a pull request. i think SwagMediaSftp etc. also needs an update.

GerDner commented 6 years ago

I'm not sure why, but 'shopware/composer-project' won't install 'guzzlehttp/guzzle' and 'league/flysystem'.

mitelg commented 6 years ago

the composer project itself not, but Shopware has these as dependencies https://github.com/shopware/shopware/blob/5.4/composer.json#L55