Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update sylius/standard

I have installed sylius with

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

I have added my own Bundle which extends SyliusWebBundle and some other things. Of course I have change parameters.yml etc.

How can I update parts of Sylius? Vendors are updated via composer update, but what about SyliusBundles in src folder?

like image 948
Tom Avatar asked Mar 20 '23 22:03

Tom


1 Answers

Here is my solution (may be a little silly):

after the the installation of Sylius, as you mentioned abode, i changed composer.json like this:

"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"
},

after that go to src/Sylius/Bundle and delete all the bundles except WebBundle (because there are some troubles with CMF bundles SymfonyCMF incompatibility issue).

Now you can update Sylius bundles with compose update and still can extend them with your bundles.

like image 54
Phlip Avatar answered Mar 23 '23 13:03

Phlip