Skip to content

Commit

Permalink
PR review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 authored and pamil committed Jan 31, 2019
1 parent 41cbb08 commit fcce64e
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions UPGRADE-1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ for more details:
imports:
- { resource: "services_test.yaml" }
```
* Remove all `__symfony__` prefixes in your Behat services
* Remove all `<tag name="fob.context_service" />` tags from your Behat services
* Make your Behat services public by default with `<defaults public="true" />`
* Change `contexts_services` in your suite definitions to `contexts`
* If you use our Travis CI configuration, follow [these](https://github.com/Sylius/Sylius-Standard/pull/322/files#diff-354f30a63fb0907d4ad57269548329e3)
and [these](https://github.com/Sylius/Sylius-Standard/pull/323/files#diff-354f30a63fb0907d4ad57269548329e3) changes introduced in `.travis.yml` file

Expand All @@ -48,43 +52,25 @@ and [these](https://github.com/Sylius/Sylius-Standard/pull/323/files#diff-354f30

# UPGRADE FROM `v1.2.X` TO `v1.4.0`

The first step is changing your required php version to `^7.2` and then upgrading Sylius with Composer

- `composer require sylius/sylius:~1.4.0`
Firstly, check out the [Sylius 1.3 upgrade guide](https://github.com/Sylius/Sylius/blob/master/UPGRADE-1.3.md) to update Sylius version step by step.
To upgrade to Sylius 1.4 follow instructions from [the previous section](https://github.com/Sylius/Sylius/blob/master/UPGRADE-1.4.md#upgrade-from-v13x-to-v140) with following changes:

### Doctrine migrations

* Change base `AbstractMigration` namespace to `Doctrine\Migrations\AbstractMigration`
* Add `: void` return types to both `up` and `down` functions
* Copy [this](https://github.com/Sylius/Sylius-Standard/blob/1.4/src/Migrations/Version20190109095211.php) and [this](https://github.com/Sylius/Sylius-Standard/blob/1.4/src/Migrations/Version20190109160409.php) migration to your migrations folder or run `doctrine:migrations:diff` to generate new migration with changes from **Sylius**
* Change namespaces of copied migrations to `Sylius\Migrations`

---
### Dotenv

### Behat
* These changes are not required, but can be done as well, if you've changed application directory structure in `1.2.x` to `1.3` update

If you're using Behat and want to be up-to-date with our configuration, introduce following changes (you can also take a look at [SymfonyExtension UPGRADE file](https://github.com/FriendsOfBehat/SymfonyExtension/blob/master/UPGRADE-2.0.md))
for more details:
### Behat

* Update required extensions with `composer require friends-of-behat/symfony-extension:^2.0 friends-of-behat/page-object-extension:^0.3 --dev`
* Remove extensions that are not needed with `composer remove friends-of-behat/context-service-extension friends-of-behat/cross-container-extension friends-of-behat/service-container-extension --dev`
* Update your `behat.yml` - look at the diff [here](https://github.com/Sylius/Sylius-Standard/pull/322/files#diff-7bde54db60a6e933518d8b61b929edce)
* Add `\FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle()` to your bundles lists in `AppKernel.php` (preferably only in `test` environment)
* Import Sylius Behat services in `app/config/config_test.yml` and your own Behat services as well:
```yaml
imports:
- { resource: "../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" }
```
* Remove all `__symfony__` prefixes in your Behat services
* Remove all `<tag name="fob.context_service" />` tags from your Behat services
* Make your Behat services public by default with `<defaults public="true" />`
* Change `contexts_services` in your suite definitions to `contexts`
* If you use our Travis CI configuration, follow [these changes](https://github.com/Sylius/Sylius-Standard/pull/322/files#diff-354f30a63fb0907d4ad57269548329e3) changes introduced in `.travis.yml` file

> BEWARE!

This upgrade sections shows only how to use Sylius 1.4 with your application that was based on Sylius 1.2. We strongly encourage you to switch to Symfony 4 directory structure, which was explained
in a [proper section in UPGRADE-1.3 file](https://github.com/Sylius/Sylius/blob/master/UPGRADE-1.3.md#directory-structure-change).

---
---
Expand Down

0 comments on commit fcce64e

Please sign in to comment.