DoctrineFixturesBundle 从 Symfony 5.1 升级到 5.2 的问题
Problems with DoctrineFixturesBundle upgrading from Symfony 5.1 to 5.2
我正在将我的 Symfony 4.4 项目升级到 Symfony 5.4(当前的 LTS 版本)。我试过修改 composer.json
,直接强制到 5.4 版本,但是我发现了很多依赖问题,所以我慢慢地“解决”了这个迁移:我移动到 5.0,然后到 5.1,现在我'我正在尝试从 5.1 迁移到 5.2,但我有依赖性问题,我不知道如何解决它们。
问题:
Problem 1
- Conclusion: don't install doctrine/doctrine-fixtures-bundle 3.4.1 (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.3.5] | install one of doctrine/persistence[1.3.7, 1.3.8, 2.2.2, 2.2.3, 2.2.4, 2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.3.7] | install one of doctrine/persistence[2.2.1, ..., 2.3.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.2.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.2.2] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.2.1] (conflict analysis result)
- Conclusion: install doctrine/common v2.11.0 (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.3.8] | install one of doctrine/persistence[2.2.4, 2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence[2.2.4] | install one of doctrine/common[2.13.1, 2.13.3] (conflict analysis result)
- Conclusion: don't install doctrine/common[2.13.3] | install doctrine/persistence[2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/common[2.13.1] | install doctrine/persistence[2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence 2.3.0 (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.2.4] | install one of doctrine/common[2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.3.6] | install doctrine/persistence[2.2.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/persistence[1.2.0], doctrine/doctrine-fixtures-bundle[3.4.0] | install one of doctrine/persistence[1.3.7, 1.3.8, 2.2.0, ..., 2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence 2.2.0 (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.2.2] | install one of doctrine/common[2.13.0, 2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.2.1] | install one of doctrine/persistence[1.3.8], doctrine/common[2.13.0, 2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.2.0] | install one of doctrine/persistence[1.3.8], doctrine/common[2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.1.1] | install one of doctrine/persistence[1.3.8], doctrine/common[2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.1.0] | install one of doctrine/persistence[1.1.1, 1.3.5, 1.3.7, 1.3.8], doctrine/common[2.13.0, 2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install doctrine/orm[2.7.5] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8, 2.1.0, ..., 2.3.0], doctrine/common[2.13.0, 2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.3.0] | install one of doctrine/persistence[v1.1.0, 1.1.1, 1.2.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.0.0] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install doctrine/orm[2.7.4] | install one of doctrine/persistence[v1.1.0, 1.1.1, 1.2.0, 1.3.8, 2.2.4, 2.3.0], doctrine/common[2.13.1, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.1.0] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.0.1] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.2.2] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of symfony/doctrine-bridge[v5.2.10], doctrine/persistence[1.3.4] | install one of doctrine/persistence[2.1.1, ..., 2.3.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/persistence[v1.1.0], doctrine/doctrine-fixtures-bundle[3.4.0] | install one of doctrine/persistence[1.3.7, 1.3.8, 2.1.1, ..., 2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence 2.1.1 (conflict analysis result)
- Conclusion: don't install one of symfony/doctrine-bridge[v5.2.10], doctrine/persistence[1.3.6] | install one of doctrine/persistence[2.2.2, 2.2.3, 2.2.4, 2.3.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.2.4] | install one of doctrine/persistence[v1.1.0, 1.1.1, 1.2.0] (conflict analysis result)
- Root composer.json requires doctrine/common ^2 -> satisfiable by doctrine/common[2.1.3, ..., 2.13.3].
- Root composer.json requires doctrine/doctrine-fixtures-bundle ^3.4 -> satisfiable by doctrine/doctrine-fixtures-bundle[3.4.0, 3.4.1].
- doctrine/doctrine-fixtures-bundle 3.4.0 requires doctrine/persistence ^1.3.7|^2.0 -> satisfiable by doctrine/persistence[1.3.7, 1.3.8, 2.0.0, ..., 2.3.0].
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.1.0] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.0.1] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.0.0] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.1.1] | install one of doctrine/persistence[1.3.7, 2.1.1, ..., 2.2.3] (conflict analysis result)
我想问题出在软件包 doctrine/doctrine-fixtures-bundle
上,但我不确定,因为我发现很难解释错误消息。这是有问题的包裹吗?如果有,有什么办法可以升级吗,或者我应该删除它,升级应用程序然后重新安装?
我需要这个包,因为我在 运行 测试时用它来填充测试数据库,但也许有任何更新的包可以用于这项工作?
这是我的 composer.json
:
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"a2lix/translation-form-bundle": "^3.0",
"composer/package-versions-deprecated": "1.11.99.4",
"doctrine/annotations": "^1.0",
"doctrine/common": "^2",
"doctrine/doctrine-bundle": "^2",
"doctrine/doctrine-migrations-bundle": "^2",
"doctrine/orm": "^2",
"friendsofsymfony/jsrouting-bundle": "^2.6",
"gedmo/doctrine-extensions": "^2.4",
"knplabs/doctrine-behaviors": "^2.0",
"phpdocumentor/reflection-docblock": "^5.3",
"phpoffice/phpspreadsheet": "^1.13",
"ramsey/uuid-doctrine": "^1.6",
"sensio/framework-extra-bundle": "^5.1",
"stof/doctrine-extensions-bundle": "^1.4",
"stripe/stripe-php": "^7.39",
"symfony/apache-pack": "^1.0",
"symfony/asset": "5.2.*",
"symfony/console": "5.2.*",
"symfony/dotenv": "5.2.*",
"symfony/expression-language": "5.2.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.2.*",
"symfony/framework-bundle": "5.2.*",
"symfony/http-client": "5.2.*",
"symfony/intl": "5.2.*",
"symfony/mailer": "5.2.*",
"symfony/monolog-bundle": "^3.5",
"symfony/polyfill-uuid": "^1.15",
"symfony/process": "5.2.*",
"symfony/property-access": "5.2.*",
"symfony/property-info": "5.2.*",
"symfony/security-bundle": "5.2.*",
"symfony/serializer": "5.2.*",
"symfony/translation": "5.2.*",
"symfony/twig-bundle": "5.2.*",
"symfony/validator": "5.2.*",
"symfony/web-link": "5.2.*",
"symfony/yaml": "5.2.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0",
"vich/uploader-bundle": "^1.13"
},
"require-dev": {
"dama/doctrine-test-bundle": "^6.5",
"doctrine/doctrine-fixtures-bundle": "^3.4",
"symfony/browser-kit": "5.2.*",
"symfony/css-selector": "5.2.*",
"symfony/debug-bundle": "5.2.*",
"symfony/maker-bundle": "^1.15",
"symfony/phpunit-bridge": "^5.2",
"symfony/stopwatch": "5.2.*",
"symfony/web-profiler-bundle": "5.2.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\Tests\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"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": "5.2.*"
}
}
}
我不知道这能帮上什么忙,但这个应用程序最初是一个 Symfony 3.4 应用程序,几年前我升级到 Symfony 4.4,现在我正在努力迁移到 5.4...
问题是您在 v2 中需要 doctrine/common
。这取决于 v1 中的 doctrine/persistence
。将所有包更新到 Symfony 5.2 也会将 symfony/doctrine-bridge
更新到 5.2 - 这需要 v2 中的 doctrine/persistence
。
将 composer.json
中的 doctrine/common
更新到 v3 可能有助于解决问题。此外,由于您已经在使用 symfony/flex
,您可以删除 Symfony 包上的所有显式版本限制 - 像您已经做的那样在 extra
部分进一步定义 Symfony 版本就足够了。这使得更新所有 Symfony 包变得更容易,因为你只需要更改这一行
我正在将我的 Symfony 4.4 项目升级到 Symfony 5.4(当前的 LTS 版本)。我试过修改 composer.json
,直接强制到 5.4 版本,但是我发现了很多依赖问题,所以我慢慢地“解决”了这个迁移:我移动到 5.0,然后到 5.1,现在我'我正在尝试从 5.1 迁移到 5.2,但我有依赖性问题,我不知道如何解决它们。
问题:
Problem 1
- Conclusion: don't install doctrine/doctrine-fixtures-bundle 3.4.1 (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.3.5] | install one of doctrine/persistence[1.3.7, 1.3.8, 2.2.2, 2.2.3, 2.2.4, 2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.3.7] | install one of doctrine/persistence[2.2.1, ..., 2.3.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.2.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.2.2] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.2.1] (conflict analysis result)
- Conclusion: install doctrine/common v2.11.0 (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.3.8] | install one of doctrine/persistence[2.2.4, 2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence[2.2.4] | install one of doctrine/common[2.13.1, 2.13.3] (conflict analysis result)
- Conclusion: don't install doctrine/common[2.13.3] | install doctrine/persistence[2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/common[2.13.1] | install doctrine/persistence[2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence 2.3.0 (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.2.4] | install one of doctrine/common[2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.3.6] | install doctrine/persistence[2.2.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/persistence[1.2.0], doctrine/doctrine-fixtures-bundle[3.4.0] | install one of doctrine/persistence[1.3.7, 1.3.8, 2.2.0, ..., 2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence 2.2.0 (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.2.2] | install one of doctrine/common[2.13.0, 2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.2.1] | install one of doctrine/persistence[1.3.8], doctrine/common[2.13.0, 2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.2.0] | install one of doctrine/persistence[1.3.8], doctrine/common[2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.1.1] | install one of doctrine/persistence[1.3.8], doctrine/common[2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/orm[2.7.5], doctrine/persistence[2.1.0] | install one of doctrine/persistence[1.1.1, 1.3.5, 1.3.7, 1.3.8], doctrine/common[2.13.0, 2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install doctrine/orm[2.7.5] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8, 2.1.0, ..., 2.3.0], doctrine/common[2.13.0, 2.13.1, 2.13.2, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.3.0] | install one of doctrine/persistence[v1.1.0, 1.1.1, 1.2.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.0.0] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install doctrine/orm[2.7.4] | install one of doctrine/persistence[v1.1.0, 1.1.1, 1.2.0, 1.3.8, 2.2.4, 2.3.0], doctrine/common[2.13.1, 2.13.3] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.1.0] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.0.1] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.2.2] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of symfony/doctrine-bridge[v5.2.10], doctrine/persistence[1.3.4] | install one of doctrine/persistence[2.1.1, ..., 2.3.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/persistence[v1.1.0], doctrine/doctrine-fixtures-bundle[3.4.0] | install one of doctrine/persistence[1.3.7, 1.3.8, 2.1.1, ..., 2.3.0] (conflict analysis result)
- Conclusion: don't install doctrine/persistence 2.1.1 (conflict analysis result)
- Conclusion: don't install one of symfony/doctrine-bridge[v5.2.10], doctrine/persistence[1.3.6] | install one of doctrine/persistence[2.2.2, 2.2.3, 2.2.4, 2.3.0] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[2.12.0], doctrine/persistence[2.2.4] | install one of doctrine/persistence[v1.1.0, 1.1.1, 1.2.0] (conflict analysis result)
- Root composer.json requires doctrine/common ^2 -> satisfiable by doctrine/common[2.1.3, ..., 2.13.3].
- Root composer.json requires doctrine/doctrine-fixtures-bundle ^3.4 -> satisfiable by doctrine/doctrine-fixtures-bundle[3.4.0, 3.4.1].
- doctrine/doctrine-fixtures-bundle 3.4.0 requires doctrine/persistence ^1.3.7|^2.0 -> satisfiable by doctrine/persistence[1.3.7, 1.3.8, 2.0.0, ..., 2.3.0].
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.1.0] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.0.1] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install one of doctrine/common[v2.11.0], doctrine/persistence[2.0.0] | install one of doctrine/persistence[v1.1.0, ..., 1.3.8] (conflict analysis result)
- Conclusion: don't install doctrine/persistence[1.1.1] | install one of doctrine/persistence[1.3.7, 2.1.1, ..., 2.2.3] (conflict analysis result)
我想问题出在软件包 doctrine/doctrine-fixtures-bundle
上,但我不确定,因为我发现很难解释错误消息。这是有问题的包裹吗?如果有,有什么办法可以升级吗,或者我应该删除它,升级应用程序然后重新安装?
我需要这个包,因为我在 运行 测试时用它来填充测试数据库,但也许有任何更新的包可以用于这项工作?
这是我的 composer.json
:
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"a2lix/translation-form-bundle": "^3.0",
"composer/package-versions-deprecated": "1.11.99.4",
"doctrine/annotations": "^1.0",
"doctrine/common": "^2",
"doctrine/doctrine-bundle": "^2",
"doctrine/doctrine-migrations-bundle": "^2",
"doctrine/orm": "^2",
"friendsofsymfony/jsrouting-bundle": "^2.6",
"gedmo/doctrine-extensions": "^2.4",
"knplabs/doctrine-behaviors": "^2.0",
"phpdocumentor/reflection-docblock": "^5.3",
"phpoffice/phpspreadsheet": "^1.13",
"ramsey/uuid-doctrine": "^1.6",
"sensio/framework-extra-bundle": "^5.1",
"stof/doctrine-extensions-bundle": "^1.4",
"stripe/stripe-php": "^7.39",
"symfony/apache-pack": "^1.0",
"symfony/asset": "5.2.*",
"symfony/console": "5.2.*",
"symfony/dotenv": "5.2.*",
"symfony/expression-language": "5.2.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.2.*",
"symfony/framework-bundle": "5.2.*",
"symfony/http-client": "5.2.*",
"symfony/intl": "5.2.*",
"symfony/mailer": "5.2.*",
"symfony/monolog-bundle": "^3.5",
"symfony/polyfill-uuid": "^1.15",
"symfony/process": "5.2.*",
"symfony/property-access": "5.2.*",
"symfony/property-info": "5.2.*",
"symfony/security-bundle": "5.2.*",
"symfony/serializer": "5.2.*",
"symfony/translation": "5.2.*",
"symfony/twig-bundle": "5.2.*",
"symfony/validator": "5.2.*",
"symfony/web-link": "5.2.*",
"symfony/yaml": "5.2.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0",
"vich/uploader-bundle": "^1.13"
},
"require-dev": {
"dama/doctrine-test-bundle": "^6.5",
"doctrine/doctrine-fixtures-bundle": "^3.4",
"symfony/browser-kit": "5.2.*",
"symfony/css-selector": "5.2.*",
"symfony/debug-bundle": "5.2.*",
"symfony/maker-bundle": "^1.15",
"symfony/phpunit-bridge": "^5.2",
"symfony/stopwatch": "5.2.*",
"symfony/web-profiler-bundle": "5.2.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\Tests\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"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": "5.2.*"
}
}
}
我不知道这能帮上什么忙,但这个应用程序最初是一个 Symfony 3.4 应用程序,几年前我升级到 Symfony 4.4,现在我正在努力迁移到 5.4...
问题是您在 v2 中需要 doctrine/common
。这取决于 v1 中的 doctrine/persistence
。将所有包更新到 Symfony 5.2 也会将 symfony/doctrine-bridge
更新到 5.2 - 这需要 v2 中的 doctrine/persistence
。
将 composer.json
中的 doctrine/common
更新到 v3 可能有助于解决问题。此外,由于您已经在使用 symfony/flex
,您可以删除 Symfony 包上的所有显式版本限制 - 像您已经做的那样在 extra
部分进一步定义 Symfony 版本就足够了。这使得更新所有 Symfony 包变得更容易,因为你只需要更改这一行