Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension Manager not working animore in 0.4.2 #183

Open
jonashrem opened this issue Oct 17, 2021 · 2 comments
Open

Extension Manager not working animore in 0.4.2 #183

jonashrem opened this issue Oct 17, 2021 · 2 comments

Comments

@jonashrem
Copy link

when I try to run a custom extension, I get this error in sw-cli-tools 0.4.2

the same one worked just fine in 0.2.0


Fatal error: Uncaught Error: Class 'MAXCLUSTER\Shopware\Bootstrap' not found in phar:///usr/bin/sw/src/Application/ExtensionManager.php:63
Stack trace:
#0 phar:///usr/bin/sw/src/Application/ExtensionManager.php(126): ShopwareCli\Application\ExtensionManager->bootstrapExtension('MAXCLUSTER\\Shop...')
#1 phar:///usr/bin/sw/src/Application/ExtensionManager.php(51): ShopwareCli\Application\ExtensionManager->discoverVendorFolder('/var/www/share/...', 'MAXCLUSTER')
#2 phar:///usr/bin/sw/src/Application.php(153): ShopwareCli\Application\ExtensionManager->discoverExtensions(Array)
#3 phar:///usr/bin/sw/src/Application.php(59): ShopwareCli\Application->loadExtensions(false)
#4 phar:///usr/bin/sw/vendor/symfony/console/Application.php(149): ShopwareCli\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 phar:///usr/bin/sw/bin/sw(18): Symfony\Component\Console\Application->run()
#6 /usr/bin/sw(14): require('phar:///usr/bin...')
#7 {main}
  thrown in phar:///usr/bin/sw/src/Application/ExtensionManager.php on line 63

The class in ~/.config/sw-cli-tools/extensions/MAXCLUSTER/Shopware/Bootstrap.php looks like this:

<?php
namespace MAXCLUSTER\Shopware;

...


class Bootstrap implements ConsoleAwareExtension
{
...
    public function setContainer(ContainerBuilder $container)
    {
        $this->populateContainer($container);
    }

    public function getConsoleCommands()
    {
...
    }

    private function populateContainer(ContainerBuilder $container)
    {
    }



@mitelg
Copy link
Contributor

mitelg commented Oct 18, 2021

we are also using extensions, but they are working fine 🤔

@jonashrem
Copy link
Author

@mitelg here is a minimal example, that triggers the error for me when installing it in extension folder.

Afterwards, I get the error from earlier when I start sw-cli-tools 0.4.2 (without parameters). In 0.3.0 this works fine.

extensions.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants