开始使用shopware应用程序时出错

Got error while starting with shopware app

提问人:Moss 提问时间:10/5/2023 更新时间:10/5/2023 访问量:33

问:

我是购物和symfony的新手,我正在尝试按照本文档开发一个应用程序。 https://developer.shopware.com/docs/guides/plugins/apps/starter/product-translator.html。 使用 composer 创建新项目后,我尝试并出现此错误composer require shopware/app-bundle

The service "Shopware\App\SDK\Shop\ShopRepositoryInterface" has a dependency on a non-existent service "Doctrine\Persistence\ManagerRegistry"

我没有创建一个 doctrine.yaml 文件,我手动创建了一个,这个错误消失了,得到了另一个

Cannot autowire service "Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface": argument "$serverRequestFactory" of method "Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory::__construct()" references  
   interface "Psr\Http\Message\ServerRequestFactoryInterface" but no such service exists. Did you create a class that implements this interface? 

将我的 composer.json 文件粘贴到此处。我错过了什么?

{
    "type": "project",
    "license": "proprietary",
    "minimum-stability": "stable",
    "prefer-stable": true,
    "require": {
        "php": ">=8.1",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "shopware/app-bundle": "*",
        "symfony/console": "6.3.*",
        "symfony/dotenv": "6.3.*",
        "symfony/flex": "^2",
        "symfony/framework-bundle": "6.3.*",
        "symfony/runtime": "6.3.*",
        "symfony/yaml": "6.3.*"
    },
    "config": {
        "allow-plugins": {
            "php-http/discovery": true,
            "symfony/flex": true,
            "symfony/runtime": true
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php73": "*",
        "symfony/polyfill-php74": "*",
        "symfony/polyfill-php80": "*",
        "symfony/polyfill-php81": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "6.3.*"
        }
    }
}

       
doctrine-orm shopware6-app

评论

0赞 Alex 10/7/2023
我无法使用 php8.1 在 Ubuntu 22.04 上重现该问题。按照文档的步骤操作对我有用。在作曲家需要的时候,问一些问题。D你对他们都说“是”吗?是为我创建的。您能否在空文件夹中重试并提供一些有关系统的信息。symfony/flexconfig/packages/doctrine.yaml

答: 暂无答案