英文:
There is no extension able to load the configuration for "web_profiler" Shopware 6.5.2.1
问题
我正在使用Shopware 6.5.2.1,通过Dockware安装。在安装了我的插件后,我遇到了以下错误
没有扩展能够加载配置文件 "web_profiler"(位于 "/var/www/html/vendor/shopware/core/Profiling/Resources/config/packages/dev/web_profiler.yaml")。在 "/var/www/html/vendor/shopware/core/Profiling/Resources/config/packages/dev/web_profiler.yaml" 中查找了命名空间 "web_profiler",找到了 "framework"、"twig"、"monolog"、"debug"、"shopware"、"elasticsearch"、"storefront"。 (加载自资源 "/var/www/html/vendor/shopware/core/Profiling/Resources/config/packages/dev/web_profiler.yaml" 的位置)。
我无法执行任何操作(进入管理界面,插件刷新,清除缓存等)。
这是我的composer.json的require-dev片段:
"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"
}
看起来我安装了web-profiler。但是我在我的插件中没有使用web profiler。
编辑:这是由于在require-dev中的 "shopware/dev-tools": "^1.0.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").
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.
答案1
得分: 0
检查config/bundles.php
中是否注册了WebProfilerBundle
。
if (InstalledVersions::isInstalled('symfony/web-profiler-bundle')) {
$bundles[Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class] = ['dev' => true, 'test' => true, 'phpstan_dev' => true];
}
return $bundles;
英文:
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;
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论