我已经安装了sylius

composer create-project -s dev sylius/sylius
cd sylius
app/console sylius:install


我添加了我自己的捆绑包,该捆绑包扩展了SyliusWebBundle和其他一些东西。当然我有更改parameter.yml等。

如何更新Sylius的某些部分?通过composer更新来更新供应商,但是src文件夹中的SyliusBundles呢?

最佳答案

这是我的解决方案(可能有点傻):

在安装Sylius之后,就像您提到的住所一样,我这样更改了composer.json

"require": {
    "php":                                  ">=5.3.3",

    "doctrine/doctrine-bundle":             "1.2.*@dev",
    "doctrine/orm":                         "~2.3",
    "friendsofsymfony/rest-bundle":         "~1.0",
    "friendsofsymfony/user-bundle":         "2.0.*@dev",
    "hwi/oauth-bundle":                     "0.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "jms/serializer-bundle":                "0.12.*",
    "jms/translation-bundle":               "1.1.*",
    "knplabs/knp-gaufrette-bundle":         "*@dev",
    "knplabs/knp-snappy-bundle":            "*@dev",
    "knplabs/gaufrette":                    "0.2.*@dev",
    "liip/doctrine-cache-bundle":           "*",
    "liip/imagine-bundle":                  "~0.9",
    "mathiasverraes/money":                 "*@dev",
    "sensio/distribution-bundle":           "2.3.*",
    "sensio/generator-bundle":              "~2.3",
    "stof/doctrine-extensions-bundle":      "1.1.*",
    "symfony/assetic-bundle":               "2.3.*",
    "symfony/intl":                         "~2.3",
    "symfony/monolog-bundle":               "2.3.*",
    "symfony/swiftmailer-bundle":           "2.3.*",
    "symfony/symfony":                      "~2.3",
    "twig/extensions":                      "1.0.*",
    "white-october/pagerfanta-bundle":      "1.0.*@dev",
    "pagerfanta/pagerfanta":                "1.0.*@dev",
    "payum/payum":                          "0.7.*",
    "payum/payum-bundle":                   "~0.7.1",
    "symfony-cmf/block-bundle":             "1.0.*",
    "symfony-cmf/content-bundle":           "1.0.*",
    "symfony-cmf/routing-bundle":           "1.1.*",
    "symfony-cmf/menu-bundle":              "1.0.*",
    "doctrine/migrations":                  "dev-master",
    "doctrine/doctrine-migrations-bundle":  "dev-master",

    "sylius/resource-bundle":               "1.0.*@dev",
    "sylius/flow-bundle":                   "1.0.*@dev",
    "sylius/product-bundle":                "1.0.*@dev",
    "sylius/variable-product-bundle":       "1.0.*@dev",
    "sylius/money-bundle":                  "1.0.*@dev",
    "sylius/order-bundle":                  "1.0.*@dev",
    "sylius/cart-bundle":                   "1.0.*@dev",
    "sylius/taxation-bundle":               "1.0.*@dev",
    "sylius/shipping-bundle":               "1.0.*@dev",
    "sylius/addressing-bundle":             "1.0.*@dev",
    "sylius/promotions-bundle":             "1.0.*@dev",
    "sylius/inventory-bundle":              "1.0.*@dev",
    "sylius/taxonomies-bundle":             "1.0.*@dev",
    "sylius/settings-bundle":               "1.0.*@dev",
    "sylius/payments-bundle":               "1.0.*@dev",
    "sylius/payum-bundle":                  "1.0.*@dev",
    "sylius/omnipay-bundle":                "1.0.*@dev",
    "sylius/core-bundle":                   "1.0.*@dev",
    "sylius/installer-bundle":              "1.0.*@dev"
},
"require-dev": {
    "behat/behat":                       "2.4.*@stable",
    "behat/symfony2-extension":          "*",
    "behat/mink-extension":              "*",
    "behat/mink-browserkit-driver":      "*",
    "behat/mink-goutte-driver":          "*",
    "behat/mink-selenium2-driver":       "*",
    "doctrine/doctrine-fixtures-bundle": "2.2.*",
    "fzaninotto/faker":                  "1.2.*",
    "phpspec/phpspec":                   "2.0.*@dev"
},


之后,请转到src/Sylius/Bundle并删除除WebBundle以外的所有捆绑软件(因为CMF捆绑软件SymfonyCMF incompatibility issue会有一些麻烦)。

现在,您可以使用compose update更新Sylius捆绑软件,并且仍然可以使用捆绑软件扩展它们。

09-30 18:28