Skip to content

Commit

Permalink
Update UPGRADE and README notes
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee committed Feb 15, 2021
1 parent c0f0245 commit 1183daf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,22 @@ It is used by `KnpSnappyBundle` and can be configured according to [their documm

> Remember to allow community recipes with `composer config extra.symfony.allow-contrib true` or during plugin installation process

2. Apply migration to your database:
2. If you install the plugin on Sylius 1.9 or higher, exclude duplicated migrations:

```bash
bin/console doctrine:migration:sync-metadata-storage
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201130071338' --add
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201204071301' --add
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201208105207' --add
```

3. Apply migration to your database:

```bash
bin/console doctrine:migrations:migrate
```

3. Copy Sylius templates overridden in plugin to your templates directory (e.g `templates/bundles/`):
4. Copy Sylius templates overridden in plugin to your templates directory (e.g `templates/bundles/`):

```bash
mkdir -p templates/bundles/SyliusAdminBundle/
Expand Down
9 changes: 9 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201208105207' --add
```

1. If you upgrade also Sylius to 1.9 version, exclude duplicated migrations:

```bash
bin/console doctrine:migration:sync-metadata-storage
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201130071338' --add
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201204071301' --add
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201208105207' --add
```

1. Add traits that enhance Adjustment and Shipment models from Sylius. These traits are not covered by
the backward compatibility promise and it will be removed after update Sylius to 1.9. It is a duplication of a logic
from Sylius to provide proper adjustments handling.
Expand Down
16 changes: 12 additions & 4 deletions docs/legacy_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,29 @@
options: []
````
6. Copy plugin migrations to your migrations directory (e.g. `src/Migrations`) and apply them to your database:
6. If you install the plugin on Sylius 1.9 or higher, exclude duplicated migrations:
```bash
bin/console doctrine:migration:sync-metadata-storage
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201130071338' --add
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201204071301' --add
bin/console doctrine:migrations:version 'Sylius\RefundPlugin\Migrations\Version20201208105207' --add
```
7. Apply migrations to your database:
```bash
cp -R vendor/sylius/refund-plugin/migrations/* src/Migrations
bin/console doctrine:migrations:migrate
```
7. Copy Sylius templates overridden in plugin to your templates directory (e.g `templates/bundles/`):
8. Copy Sylius templates overridden in plugin to your templates directory (e.g `templates/bundles/`):
```bash
mkdir -p templates/bundles/SyliusAdminBundle/
cp -R vendor/sylius/refund-plugin/src/Resources/views/SyliusAdminBundle/* templates/bundles/SyliusAdminBundle/
```
8. Clear cache:
9. Clear cache:
```bash
bin/console cache:clear
Expand Down

0 comments on commit 1183daf

Please sign in to comment.