Skip to content

Commit def1eab

Browse files
committed
[UC-23] Update UPGRADE.md to reflect the removal of GA4 and DataFeed plugin dependencies
1 parent e739523 commit def1eab

1 file changed

Lines changed: 7 additions & 118 deletions

File tree

UPGRADE.md

Lines changed: 7 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,11 @@
1-
# UPGRADE FROM `v1.3.X` TO `v1.4.0`
1+
# UPGRADE FROM `1.0` TO `1.1`
22

3-
First step is upgrading Sylius with composer
3+
### Dependencies
44

5-
- `composer require sylius/sylius:~1.4.0`
5+
1. Removed `bitbag/google-analytics-4-plugin` dependency (see “Behavioral changes”).
6+
2. Removed `bitbag/sylius-feed-plugin` dependency (see “Behavioral changes”).
67

7-
### Test application database
8+
### Behavioral changes
89

9-
#### Migrations
10-
11-
If you provide migrations with your plugin, take a look at following changes:
12-
13-
* Change base `AbstractMigration` namespace to `Doctrine\Migrations\AbstractMigration`
14-
* Add `: void` return types to both `up` and `down` functions
15-
16-
#### Schema update
17-
18-
If you don't use migrations, just run `(cd tests/Application && bin/console doctrine:schema:update --force)` to update the test application's database schema.
19-
20-
### Dotenv
21-
22-
* `composer require symfony/dotenv:^4.2 --dev`
23-
* Follow [Symfony dotenv update guide](https://symfony.com/doc/current/configuration/dot-env-changes.html) to incorporate required changes in `.env` files structure. Remember - they should be done on `tests/Application/` level! Optionally, you can take a look at [corresponding PR](https://github.com/Sylius/PluginSkeleton/pull/156/) introducing these changes in **PluginSkeleton** (this PR also includes changes with Behat - see below)
24-
25-
Don't forget to clear the cache (`tests/Application/bin/console cache:clear`) to be 100% everything is loaded properly.
26-
27-
### Test application kernel
28-
29-
The kernel of the test application needs to be replaced with this [file](https://github.com/Sylius/PluginSkeleton/blob/1.4/tests/Application/Kernel.php).
30-
The location of the kernel is: `tests/Application/Kernel.php` (replace the content with the content of the file above).
31-
The container cleanup method is removed in the new version and keeping it will cause problems with for example the `TagAwareAdapter` which will call `commit()` on its pool from its destructor. If its pool is `TraceableAdapter` with pool `ArrayAdapter`, then the pool property of `TraceableAdapter` will be nullified before the destructor is executed and cause an error.
32-
33-
---
34-
35-
### Behat
36-
37-
If you're using Behat and want to be up-to-date with our configuration
38-
39-
* Update required extensions with `composer require friends-of-behat/symfony-extension:^2.0 friends-of-behat/page-object-extension:^0.3 --dev`
40-
* Remove extensions that are not needed yet with `composer remove friends-of-behat/context-service-extension friends-of-behat/cross-container-extension friends-of-behat/service-container-extension --dev`
41-
* Update your `behat.yml` - look at the diff [here](https://github.com/Sylius/Sylius-Standard/pull/322/files#diff-7bde54db60a6e933518d8b61b929edce)
42-
* Add `SymfonyExtensionBundle` to your `tests/Application/config/bundles.php`:
43-
```php
44-
return [
45-
//...
46-
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true],
47-
];
48-
```
49-
* If you use our Travis CI configuration, follow [these changes](https://github.com/Sylius/PluginSkeleton/pull/156/files#diff-354f30a63fb0907d4ad57269548329e3) introduced in `.travis.yml` file
50-
* Create `tests/Application/config/services_test.yaml` file with the following code and add these your own Behat services as well:
51-
```yaml
52-
imports:
53-
- { resource: "../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" }
54-
```
55-
* Remove all `__symfony__` prefixes in your Behat services
56-
* Remove all `<tag name="fob.context_service" />` tags from your Behat services
57-
* Make your Behat services public by default with `<defaults public="true" />`
58-
* Change `contexts_services ` in your suite definitions to `contexts`
59-
* Take a look at [SymfonyExtension UPGRADE guide](https://github.com/FriendsOfBehat/SymfonyExtension/blob/master/UPGRADE-2.0.md) if you have any more problems
60-
61-
### Phpstan
62-
63-
* Fix the container XML path parameter in the `phpstan.neon` file as done [here](https://github.com/Sylius/PluginSkeleton/commit/37fa614dbbcf8eb31b89eaf202b4bd4d89a5c7b3)
64-
65-
# UPGRADE FROM `v1.2.X` TO `v1.4.0`
66-
67-
Firstly, check out the [PluginSkeleton 1.3 upgrade guide](https://github.com/Sylius/PluginSkeleton/blob/1.4/UPGRADE-1.3.md) to update Sylius version step by step.
68-
To upgrade to Sylius 1.4 follow instructions from [the previous section](https://github.com/Sylius/PluginSkeleton/blob/1.4/UPGRADE-1.4.md#upgrade-from-v13x-to-v140) with following changes:
69-
70-
### Doctrine migrations
71-
72-
* Change namespaces of copied migrations to `Sylius\Migrations`
73-
74-
### Dotenv
75-
76-
* 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
77-
78-
### Behat
79-
80-
* Add `\FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle()` to your bundles lists in `tests/Application/AppKernel.php` (preferably only in `test` environment)
81-
* Import Sylius Behat services in `tests/Application/config/config_test.yml` and your own Behat services as well:
82-
```yaml
83-
imports:
84-
- { resource: "../../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" }
85-
```
86-
* Specify test application's kernel path in `behat.yml`:
87-
```yaml
88-
FriendsOfBehat\SymfonyExtension:
89-
kernel:
90-
class: AppKernel
91-
path: tests/Application/app/AppKernel.php
92-
```
93-
94-
95-
# UPGRADE FROM `v1.2.X` TO `v1.3.0`
96-
97-
## Application
98-
99-
* Run `composer require sylius/sylius:~1.3.0 --no-update`
100-
101-
* Add the following code in your `behat.yml(.dist)` file:
102-
103-
```yaml
104-
default:
105-
extensions:
106-
FriendsOfBehat\SymfonyExtension:
107-
env_file: ~
108-
```
109-
110-
* Incorporate changes from the following files into plugin's test application:
111-
112-
* [`tests/Application/package.json`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/package.json) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-726e1353c14df7d91379c0dea6b30eef))
113-
* [`tests/Application/.babelrc`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/.babelrc) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-a2527d9d8ad55460b2272274762c9386))
114-
* [`tests/Application/.eslintrc.js`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/.eslintrc.js) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-396c8c412b119deaa7dd84ae28ae04ca))
115-
116-
* Update PHP and JS dependencies by running `composer update` and `(cd tests/Application && yarn upgrade)`
117-
118-
* Clear cache by running `(cd tests/Application && bin/console cache:clear)`
119-
120-
* Install assets by `(cd tests/Application && bin/console assets:install web)` and `(cd tests/Application && yarn build)`
121-
122-
* optionally, remove the build for PHP 7.1. in `.travis.yml`
10+
1. If you don’t provide an alternative to `bitbag/google-analytics-4-plugin`, you lose automatic dataLayer pushes for Google Analytics 4.
11+
2. No product feed is generated by default.

0 commit comments

Comments
 (0)