Search code examples
symfonyshopwareshopware6

There is no extension able to load the configuration for "web_profiler" Shopware 6.5.2.1


I am using Shopware 6.5.2.1. installed with Dockware. After installation of my plugin I've got following error

There is no extension able to load the configuration for "web_profiler" (in "/var/www/html/vendor/shopware/core/Profiling/Resources/config/packages/dev/web_profiler.yaml"). Looked for namespace "web_profiler", found ""framework", "twig", "monolog", "debug", "shopware", "elasticsearch", "storefront"" in /var/www/html/vendor/shopware/core/Profiling/Resources/config/packages/dev/web_profiler.yaml (which is loaded in resource "/var/www/html/vendor/shopware/core/Profiling/Resources/config/packages/dev/web_profiler.yaml").

error screenshot

I can't do anything (go to admin, plugin:refresh, clear:cache etc.)

This is my composer.json require-dev fragment


    "require-dev": {
        "ext-tokenizer": "*",
        "ext-xmlwriter": "*",
        "bamarni/composer-bin-plugin": "~1.8.2",
        "brianium/paratest": "^6.6",
        "dg/bypass-finals": "^1.3",
        "jdorn/sql-formatter": "~1.2.17",
        "johnkary/phpunit-speedtrap": "~4.0.0",
        "league/construct-finder": "^1.1",
        "nikic/php-parser": "~4.15.0",
        "opis/json-schema": "~2.3.0",
        "phpbench/phpbench": "^1.2",
        "phpdocumentor/reflection-docblock": "~5.3.0",
        "phpdocumentor/type-resolver": "~1.7.1",
        "phpstan/extension-installer": "^1.3.0",
        "phpstan/phpstan": "1.10.15",
        "phpstan/phpstan-deprecation-rules": "1.1.3",
        "phpstan/phpstan-doctrine": "1.3.40",
        "phpstan/phpstan-phpunit": "1.3.11",
        "phpstan/phpstan-symfony": "1.3.2",
        "phpunit/phpunit": "~9.6",
        "shopware/dev-tools": "^1.0.1",
        "smalot/pdfparser": "~2.2.2",
        "symfony/browser-kit": "~6.3.0",
        "symfony/css-selector": "~6.3.0",
        "symfony/dom-crawler": "~6.3.0",
        "symfony/expression-language": "~6.3.0",
        "symfony/phpunit-bridge": "~6.1.0",
        "symfony/var-dumper": "~6.3.0",
        "symfony/profiler-pack": "^1.0",
        "symplify/phpstan-rules": "12.0.2",
        "tomasvotruba/type-coverage": "^0.1.3",
        "symfony/dependency-injection": "~6.3.0",
        "symfony/stopwatch": "~6.3.0",
        "symfony/web-profiler-bundle": "~6.3.0"
    }

It look's that I have web-profiler installed. I don't use web profiler in my plugin.

Edit: This is caused by "shopware/dev-tools": "^1.0.1", in require-dev.


Solution

  • Check that the WebProfilerBundle is registered in config/bundles.php

    if (InstalledVersions::isInstalled('symfony/web-profiler-bundle')) {
        $bundles[Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class] = ['dev' => true, 'test' => true, 'phpstan_dev' => true];
    }
    return $bundles;