Skip to content

Commit

Permalink
Merge branch '1.3'
Browse files Browse the repository at this point in the history
* 1.3:
  Change application's version to v1.3.1-DEV
  Do not specify that this package is replacing polyfills
  Change application's version to v1.3.0
  Change application's version to v1.3.1-DEV
  Change application's version to v1.3.0
  Throw out incenteev/composer-parameter-handler as well
  Add missing security-checker
  Make Flex recipes to be based on Sylius possible
  Change application's version to v1.3.1-DEV
  Update changelog for v1.3.0
  Change application's version to v1.3.0
  Improve upgrade instructions for 1.3 release
  Fixed Symfony docs links in UPGRADE-1.3.md
  • Loading branch information
pamil committed Oct 1, 2018
2 parents 1fa30aa + ef99c9b commit c5472df
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG-1.3.md
@@ -1,6 +1,6 @@
# CHANGELOG FOR `1.3.X`

## v1.3.0-BETA (2018-09-24)
## v1.3.0, v1.3.0-BETA (2018-09-27, 2018-09-24)

#### TL;DR

Expand Down
73 changes: 58 additions & 15 deletions UPGRADE-1.3.md
@@ -1,27 +1,70 @@
# UPGRADE FROM `v1.2.X` TO `v1.3.0`

## Configuration
* MongoDB and PHPCR drivers have been deprecated in `ResourceBundle` and `GridBundle`.

* **Sylius 1.3** requires **PHP 7.2**, then following configuration should be changed:
* `composer.json`:
* `"php": "^7.1"` -> `"php": "^7.2"`
* `"config.platform.php": "7.1.18"` -> `"config.platform.php": "7.2.4"`
* `.travis.yml` (if you're using Travis CI):
* leave only configuration for `PHP 7.2`
* Refering to any file from `vendor/sylius/sylius/app` directory has been deprecated.

* Copy [.env.dist from Sylius 1.3](https://github.com/Sylius/Sylius-Standard/blob/1.3/.env.dist) to your application root:
* Basing on this file create env files for your environments (`.env`, `.env.test` etc.)
* Add `.env` and `.env.test` files to `.gitignore` (or any other not-dist files you've created in a previous step)
* Configure environmental variables (especially `DATABASE_URL`)
## Application

* If you want to reuse Sylius Behat contexts, it could be required to run
`composer require friends-of-behat/page-object-extension —-dev` which is now used in Sylius test suite
* Run `composer config config.platform.php 7.2.4`

## Catalog structure change
* Run `composer require sylius/sylius:~1.3.0 sylius-labs/sensio-distribution-bundle:^6.0 incenteev/composer-parameter-handler:^2.1 --no-update`

* Add the following code in your `behat.yml(.dist)` file:

```yaml
default:
extensions:
FriendsOfBehat\SymfonyExtension:
env_file: ~

cached:
extensions:
FriendsOfBehat\SymfonyExtension:
env_file: ~
```

If you have any of those nodes, don't duplicate them.

* Incorporate changes from the following files into your application:

* [`package.json`](https://github.com/Sylius/Sylius-Standard/blob/1.3/package.json) ([see diff](https://github.com/Sylius/Sylius-Standard/compare/1.2...1.3#diff-e56633f72ecc521128b3db6586074d2c))
* [`.babelrc`](https://github.com/Sylius/Sylius-Standard/blob/1.3/.babelrc) ([see diff](https://github.com/Sylius/Sylius-Standard/compare/1.2...1.3#diff-b9cfc7f2cdf78a7f4b91a753d10865a2))
* [`.eslintrc.js`](https://github.com/Sylius/Sylius-Standard/blob/1.3/.eslintrc.js) ([see diff](https://github.com/Sylius/Sylius-Standard/compare/1.2...1.3#diff-e4403a877d80de653400d88d85e4801a))

* Update PHP and JS dependencies by running `composer update` and `yarn upgrade`

* Clear cache by running `bin/console cache:clear`

* Install assets by `bin/console assets:install web` and `yarn build`

### Optional

#### Travis CI

* Remove the build for PHP 7.1.

#### Behat

* If you want to reuse Sylius contexts, run `composer require friends-of-behat/page-object-extension —-dev` to add a new development dependency.

#### Showing products from descendant taxons

* See [the Github issue](https://github.com/Sylius/Sylius/issues/6604) for the details.

* This feature can be enabled by adding the following config to your application:

```yaml
sylius_shop:
product_grid:
include_all_descendants: true
```

## Directory structure change

**Sylius 1.3** uses new directory structure, introduced in **Symfony 4**. Even though it's not required,
we strongly encourage you to follow this convention. Take a look at
[official Symfony upgrade documentation](symfony.com/doc/current/setup/flex.html#upgrading-existing-applications-to-flex),
[official Symfony upgrade documentation](https://symfony.com/doc/current/setup/flex.html#upgrading-existing-applications-to-flex),
to know what exactly should be done.

#### Remember!
Expand Down
9 changes: 2 additions & 7 deletions composer.json
Expand Up @@ -34,7 +34,6 @@
"friendsofsymfony/rest-bundle": "^2.1",
"fzaninotto/faker": "^1.6",
"gedmo/doctrine-extensions": "^2.4.12",
"incenteev/composer-parameter-handler": "^2.1",
"jms/serializer-bundle": "^2.0",
"knplabs/knp-gaufrette-bundle": "^0.5",
"knplabs/knp-menu-bundle": "^2.1",
Expand All @@ -50,7 +49,6 @@
"stof/doctrine-extensions-bundle": "^1.2",
"swiftmailer/swiftmailer": "^6.0",
"sylius-labs/association-hydrator": "^1.1",
"sylius-labs/sensio-distribution-bundle": "^6.0",
"symfony/asset": "^3.4|^4.1",
"symfony/config": "^3.4|^4.1",
"symfony/console": "^3.4|^4.1",
Expand Down Expand Up @@ -118,6 +116,7 @@
"phpstan/phpstan-symfony": "^0.10",
"phpstan/phpstan-webmozart-assert": "^0.10",
"phpunit/phpunit": "^6.5",
"sensiolabs/security-checker": "^4.1",
"stripe/stripe-php": "^4.1",
"sylius-labs/coding-standard": "^2.0",
"symfony/browser-kit": "^3.4|^4.1",
Expand Down Expand Up @@ -177,11 +176,7 @@
"sylius/theme-bundle": "self.version",
"sylius/ui-bundle": "self.version",
"sylius/user": "self.version",
"sylius/user-bundle": "self.version",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
"sylius/user-bundle": "self.version"
},
"conflict": {
"symfony/symfony": "3.4.7 || 4.0.7"
Expand Down
1 change: 0 additions & 1 deletion src/Sylius/Bundle/CoreBundle/Application/Kernel.php
Expand Up @@ -108,7 +108,6 @@ public function registerBundles(): array
];

if (in_array($this->getEnvironment(), ['dev', 'test', 'test_cached'], true)) {
$bundles[] = new \Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new \Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new \Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
}
Expand Down

0 comments on commit c5472df

Please sign in to comment.