shopwareshopware6

Shopware 6.6 plugin installation with composer dependency leads to an error


The installation worked flawless with Shopware 6.5 and whichbrowser/parser is the only dependency.

Shopware version: 6.6.3.0 Environment: dockware/dev:6.6.3.0 container

Required packages in the plugins composer.json

{
  "require": {
    "shopware/core": "^6.6.0.0",
    "whichbrowser/parser": "^v2.1.8"
  },
}

executeComposerCommands is enabled in the plugin base class

class MyPlugin extends Plugin
{
    public function executeComposerCommands(): bool
    {
        return true;
    }
}

The following error message gets thrown:

In FilesystemRepository.php line 166:                                                                                                                                                                                               
                                                                                                                                                                                                                                      
[ErrorException]                                                                                                                                                                                                                  
file_get_contents(/var/www/html/vendor/composer/composer/src/Composer/Repository/../InstalledVersions.php): Failed to open stream: No such file or directory    

The whole installation output:

[Shopware\Core\Framework\Plugin\Exception\PluginComposerRequireException]                                                                                                                                                           
  Could not execute "composer require" for plugin "MyPlugin (my-plugin:2.3.0). Output:                                                                                                                                   
  ./composer.json has been updated                                                                                                                                                                                                    
  Running composer update my-plugin --with-all-dependencies                                                                                                                                                                    
  > pre-update-cmd: Symfony\Flex\Flex_composer_tmp1->configureInstaller                                                                                                                                                               
  Loading composer repositories with package information                                                                                                                                                                              
  > pre-pool-create: Symfony\Flex\Flex_composer_tmp1->truncatePackages                                                                                                                                                                
  Updating dependencies                                                                                                                                                                                                               
  Dependency resolution completed in 0.007 seconds                                                                                                                                                                                    
  Analyzed 624 packages to resolve dependencies                                                                                                                                                                                       
  Analyzed 2148 rules to resolve dependencies                                                                                                                                                                                         
  Lock file operations: 2 installs, 6 updates, 0 removals                                                                                                                                                                             
  Installs: whichbrowser/parser:v2.1.8, my-plugin:2.3.0                                                                                                                                                                        
  Updates: twig/twig:v3.8.0, zircote/swagger-php:4.10.0, twig/intl-extra:v3.8.0, shopware/conflicts:0.1.22, composer/class-map-generator:1.3.3, composer/composer:2.7.7                                                               
    - Locking my-plugin (2.3.0)                                                                                                                                                                                                
    - Upgrading composer/class-map-generator (1.3.2 => 1.3.3)                                                                                                                                                                         
    - Upgrading composer/composer (2.7.6 => 2.7.7)                                                                                                                                                                                    
    - Upgrading shopware/conflicts (0.1.20 => 0.1.22)                                                                                                                                                                                 
    - Downgrading twig/intl-extra (v3.10.0 => v3.8.0)                                                                                                                                                                                 
    - Downgrading twig/twig (v3.10.3 => v3.8.0)                                                                                                                                                                                       
    - Locking whichbrowser/parser (v2.1.8)                                                                                                                                                                                            
    - Upgrading zircote/swagger-php (4.9.3 => 4.10.0)                                                                                                                                                                                 
  Writing lock file                                                                                                                                                                                                                   
  Installing dependencies from lock file (including require-dev)                                                                                                                                                                      
  > pre-operations-exec: Symfony\Flex\Flex_composer_tmp1->recordOperations                                                                                                                                                            
  Package operations: 2 installs, 6 updates, 0 removals                                                                                                                                                                               
  Installs: whichbrowser/parser:v2.1.8, my-plugin:2.3.0                                                                                                                                                                        
  Updates: zircote/swagger-php:4.10.0, twig/twig:v3.8.0, twig/intl-extra:v3.8.0, shopware/conflicts:0.1.22, composer/class-map-generator:1.3.3, composer/composer:2.7.7                                                               
    - Downloading whichbrowser/parser (v2.1.8)                                                                                                                                                                                        
    - Downloading zircote/swagger-php (4.10.0)                                                                                                                                                                                        
    - Downloading twig/twig (v3.8.0)                                                                                                                                                                                                  
    - Downloading twig/intl-extra (v3.8.0)                                                                                                                                                                                            
    - Downloading composer/class-map-generator (1.3.3)                                                                                                                                                                                
    - Downloading composer/composer (2.7.7)                                                                                                                                                                                           
   0/6 [>---------------------------]   0% < 1 sec                                                                                                                                                                                    
   3/6 [==============>-------------]  50%  1 sec                                                                                                                                                                                     
   6/6 [============================] 100%  1 sec                                                                                                                                                                                     
    - Installing whichbrowser/parser (v2.1.8): Extracting archive                                                                                                                                                                     
    - Upgrading zircote/swagger-php (4.9.3 => 4.10.0): Extracting archive                                                                                                                                                             
    - Downgrading twig/twig (v3.10.3 => v3.8.0): Extracting archive                                                                                                                                                                   
    - Downgrading twig/intl-extra (v3.10.0 => v3.8.0): Extracting archive                                                                                                                                                             
    - Upgrading shopware/conflicts (0.1.20 => 0.1.22)                                                                                                                                                                                 
    - Upgrading composer/class-map-generator (1.3.2 => 1.3.3): Extracting archive                                                                                                                                                     
    - Upgrading composer/composer (2.7.6 => 2.7.7): Extracting archive                                                                                                                                                                
    - Installing my-plugin (2.3.0): Symlinking from custom/plugins/MyPlugin                                                                                                                                              
   0/6 [>---------------------------]   0% < 1 sec                                                                                                                                                                                    
   5/6 [=======================>----]  83% < 1 sec                                                                                                                                                                                    
   6/6 [============================] 100% < 1 sec                                                                                                                                                                                    
  In FilesystemRepository.php line 166:                                                                                                                                                                                               
                                                                                                                                                                                                                                      
    [ErrorException]                                                                                                                                                                                                                  
    file_get_contents(/var/www/html/vendor/composer/composer/src/Composer/Repository/../InstalledVersions.php): Failed to open stream: No such file or directory                                                                      
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                      
  Exception trace:                                                                                                                                                                                                                    
    at /var/www/html/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php:166                                                                                                                                    
   Composer\Util\ErrorHandler::handle() at n/a:n/a                                                                                                                                                                                    
   file_get_contents() at /var/www/html/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php:166                                                                                                                 
   Composer\Repository\FilesystemRepository->write() at /var/www/html/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:381                                                                                     
   Composer\Installer\InstallationManager->Composer\Installer\{closure}() at /var/www/html/vendor/react/promise/src/FulfilledPromise.php:28                                                                                           
   React\Promise\FulfilledPromise->then() at /var/www/html/vendor/react/promise/src/Promise.php:134                                                                                                                                   
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/Promise.php:168                                                                                                                         
   React\Promise\Promise->settle() at /var/www/html/vendor/react/promise/src/Promise.php:231                                                                                                                                          
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/FulfilledPromise.php:42                                                                                                                 
   React\Promise\FulfilledPromise->done() at /var/www/html/vendor/react/promise/src/Promise.php:135                                                                                                                                   
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/Promise.php:168                                                                                                                         
   React\Promise\Promise->settle() at /var/www/html/vendor/react/promise/src/Promise.php:231                                                                                                                                          
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/FulfilledPromise.php:42                                                                                                                 
   React\Promise\FulfilledPromise->done() at /var/www/html/vendor/react/promise/src/Promise.php:135                                                                                                                                   
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/Promise.php:168                                                                                                                         
   React\Promise\Promise->settle() at /var/www/html/vendor/react/promise/src/Promise.php:231                                                                                                                                          
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/FulfilledPromise.php:42                                                                                                                 
   React\Promise\FulfilledPromise->done() at /var/www/html/vendor/react/promise/src/Promise.php:66                                                                                                                                    
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/Promise.php:168                                                                                                                         
   React\Promise\Promise->settle() at /var/www/html/vendor/react/promise/src/Promise.php:231                                                                                                                                          
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/FulfilledPromise.php:42                                                                                                                 
   React\Promise\FulfilledPromise->done() at /var/www/html/vendor/react/promise/src/Promise.php:135                                                                                                                                   
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/Promise.php:168                                                                                                                         
   React\Promise\Promise->settle() at /var/www/html/vendor/react/promise/src/Promise.php:231                                                                                                                                          
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/FulfilledPromise.php:42                                                                                                                 
   React\Promise\FulfilledPromise->done() at /var/www/html/vendor/react/promise/src/Promise.php:135                                                                                                                                   
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/Promise.php:168                                                                                                                         
   React\Promise\Promise->settle() at /var/www/html/vendor/react/promise/src/Promise.php:231                                                                                                                                          
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/FulfilledPromise.php:42                                                                                                                 
   React\Promise\FulfilledPromise->done() at /var/www/html/vendor/react/promise/src/Promise.php:135                                                                                                                                   
   React\Promise\Promise::React\Promise\{closure}() at /var/www/html/vendor/react/promise/src/Promise.php:168                                                                                                                         
   React\Promise\Promise->settle() at /var/www/html/vendor/react/promise/src/Promise.php:231                                                                                                                                          
   React\Promise\Promise::React\Promise\{closure}() at n/a:n/a                                                                                                                                                                        
   call_user_func() at /var/www/html/vendor/composer/composer/src/Composer/Util/ProcessExecutor.php:328                                                                                                                               
   Composer\Util\ProcessExecutor->countActiveJobs() at /var/www/html/vendor/composer/composer/src/Composer/Util/Loop.php:90                                                                                                           
   Composer\Util\Loop->wait() at /var/www/html/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:430                                                                                                            
   Composer\Installer\InstallationManager->waitOnPromises() at /var/www/html/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:405                                                                              
   Composer\Installer\InstallationManager->executeBatch() at /var/www/html/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:319                                                                                
   Composer\Installer\InstallationManager->downloadAndExecuteBatch() at /var/www/html/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:218                                                                     
   Composer\Installer\InstallationManager->execute() at /var/www/html/vendor/composer/composer/src/Composer/Installer.php:827                                                                                                         
   Composer\Installer->doInstall() at /var/www/html/vendor/composer/composer/src/Composer/Installer.php:652                                                                                                                           
   Composer\Installer->doUpdate() at /var/www/html/vendor/composer/composer/src/Composer/Installer.php:298                                                                                                                            
   Composer\Installer->run() at /var/www/html/vendor/composer/composer/src/Composer/Command/RequireCommand.php:496                                                                                                                    
   Composer\Command\RequireCommand->doUpdate() at /var/www/html/vendor/composer/composer/src/Composer/Command/RequireCommand.php:340                                                                                                  
   Composer\Command\RequireCommand->execute() at /var/www/html/vendor/symfony/console/Command/Command.php:279                                                                                                                         
   Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:1031                                                                                                                      
   Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:318                                                                                                                  
   Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/composer/composer/src/Composer/Console/Application.php:394                                                                                                  
   Composer\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:169                                                                                                                                  
   Symfony\Component\Console\Application->run() at /var/www/html/vendor/composer/composer/src/Composer/Console/Application.php:148                                                                                                    
   Composer\Console\Application->run() at /var/www/html/vendor/shopware/core/Framework/Plugin/Composer/CommandExecutor.php:40                                                                                                         
   Shopware\Core\Framework\Plugin\Composer\CommandExecutor->require() at /var/www/html/vendor/shopware/core/Framework/Plugin/PluginLifecycleService.php:697                                                                           
   Shopware\Core\Framework\Plugin\PluginLifecycleService->executeComposerRequireWhenNeeded() at /var/www/html/vendor/shopware/core/Framework/Plugin/PluginLifecycleService.php:126                                                    
   Shopware\Core\Framework\Plugin\PluginLifecycleService->installPlugin() at /var/www/html/vendor/shopware/core/Framework/Plugin/Command/Lifecycle/PluginInstallCommand.php:69                                                        
   Shopware\Core\Framework\Plugin\Command\Lifecycle\PluginInstallCommand->execute() at /var/www/html/vendor/symfony/console/Command/Command.php:279                                                                                   
   Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:1049                                                                                                                      
   Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:125                                                                                                 
   Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:318                                                                                                     
   Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:79                                                                                                         
   Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:169                                                                                                            
   Symfony\Component\Console\Application->run() at /var/www/html/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49                                                                                                
   Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /var/www/html/vendor/autoload_runtime.php:29                                                                                                           
   require_once() at /var/www/html/bin/console:17                                                                                               

Solution

  • This is a bug in Shopware 6.6.3.0, I reported it to the manufacturer and it is being taken care of.