From a765ce26a037c05bc4858f5818350aad2575a34e Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Sun, 6 Jan 2019 21:24:33 +1300 Subject: [PATCH 1/2] DOCS Add a reference to new cwp-constraint upograder flag. --- docs/en/03_Upgrading/index.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/en/03_Upgrading/index.md b/docs/en/03_Upgrading/index.md index cdef87793..f64a92015 100644 --- a/docs/en/03_Upgrading/index.md +++ b/docs/en/03_Upgrading/index.md @@ -143,6 +143,7 @@ upgrade-code all --namespace="App\\Web" --psr4 ``` * `--recipe-core-constraint` defines your SilverStripe release version (optional, will default to the most recent stable release). +* `--cwp-constraint` can be used instead `--recipe-core-constraint` when upgrading a CWP project. * `--namespace` allows you to specify how your project will be namespaced (optional). * `--psr4` allows you to specify that your project structure respect the PSR-4 standard and to use sub-namespaces. * `--skip-add-namespace` allows you to skip the `add-namespace` command. @@ -187,7 +188,9 @@ You can upgrade the `composer.json` file with this command: upgrade-code recompose --write ``` -You can add a `--recipe-core-constraint` flag to target a specific version of `silverstripe/recipe-core`. By default, the project will be upgraded to the latest stable version. You can use the `--strict` option if you want to use more conservative version constraints. Omit the `--write` flag to preview your changes. +You can add a `--recipe-core-constraint` flag to target a specific version of `silverstripe/recipe-core`. By default, the project will be upgraded to the latest stable version. If you are upgrading a CWP project, you can use `--cwp-constraint` instead to target a specific version of `cwp/cwp-core`. + +You can use the `--strict` option if you want to use more conservative version constraints. Omit the `--write` flag to preview your changes. Your upgraded `composer.json` file will look like this. ```json From b6e3ff85c72a0acf88f60db8009e9909337890e3 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Thu, 17 Jan 2019 16:20:14 +1300 Subject: [PATCH 2/2] DOCS Add some extra info about the --strict flag for the upgrader --- docs/en/03_Upgrading/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/03_Upgrading/index.md b/docs/en/03_Upgrading/index.md index f64a92015..366139d48 100644 --- a/docs/en/03_Upgrading/index.md +++ b/docs/en/03_Upgrading/index.md @@ -190,7 +190,9 @@ upgrade-code recompose --write You can add a `--recipe-core-constraint` flag to target a specific version of `silverstripe/recipe-core`. By default, the project will be upgraded to the latest stable version. If you are upgrading a CWP project, you can use `--cwp-constraint` instead to target a specific version of `cwp/cwp-core`. -You can use the `--strict` option if you want to use more conservative version constraints. Omit the `--write` flag to preview your changes. +The upgrader uses [carret version constraint](https://getcomposer.org/doc/articles/versions.md#caret-version-range-) by default. This will cause composer to install compatible minor releases. You can use the `--strict` option if you want to use the more conservative [tilde version constraints](https://getcomposer.org/doc/articles/versions.md#tilde-version-range-). + +Omit the `--write` flag to preview your changes. Your upgraded `composer.json` file will look like this. ```json