如何更新sylius / standard

时间:2014-01-18 17:32:53

标签: symfony-2.3 sylius

我已经用

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

我添加了自己的Bundle,扩展了SyliusWebBundle和其他一些东西。当然我有更改parameters.yml等。

如何更新Sylius的部分内容?供应商通过composer update更新,但src文件夹中的SyliusBundles呢?

2 个答案:

答案 0 :(得分:4)

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

在安装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捆绑包,但仍然可以使用捆绑包扩展它们。

答案 1 :(得分:3)

现在已经解决了SymfonyCMF Phlip在他的回答中提到的问题,这意味着您现在可以将WebBundle集成到您的包控件中。除了Phlip列出的捆绑包之外,我还需要添加knplabs/gaufrette以成功将Sylius转移到Composer(从src/vendor/)。

composer.json中的更新包列表:

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

    "doctrine/doctrine-bundle":             "~1.3@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",
    "liip/doctrine-cache-bundle":           "*",
    "liip/imagine-bundle":                  "~0.9",
    "mathiasverraes/money":                 "*@dev",
    "sensio/distribution-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",
    "symfony/expression-language":          "~2.4",
    "twig/extensions":                      "1.0.*",
    "white-october/pagerfanta-bundle":      "1.0.*@dev",
    "pagerfanta/pagerfanta":                "1.0.*@dev",
    "payum/payum":                          "~0.7.2",
    "payum/payum-bundle":                   "~0.7.3",
    "symfony-cmf/block-bundle":             "1.0.*",
    "symfony-cmf/content-bundle":           "1.0.*",
    "symfony-cmf/routing-bundle":           "1.1.*",
    "symfony-cmf/menu-bundle":              "1.0.*",

    "knplabs/gaufrette":                    "0.2.*@dev",
    "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",
    "sylius/web-bundle":                    "1.0.*@dev"
},

在此之后,您可以删除src/Sylius文件夹并使用composer update更新项目。