Skip to content

Commit

Permalink
Add a note about moving configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee committed Nov 20, 2024
1 parent 16fd57c commit 213e98c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,37 @@
1. Support for Sylius 1.12 has been dropped, upgrade your application to [Sylius 1.13](https://github.com/Sylius/Sylius/blob/1.13/UPGRADE-1.13.md).
or [Sylius 1.14](https://github.com/Sylius/Sylius/blob/1.14/UPGRADE-1.14.md).

1. The directories structure has been updated to the current Symfony recommendations:
- `@SyliusInvoicingPlugin/Resources/assets` -> `@SyliusInvoicingPlugin/assets`
- `@SyliusInvoicingPlugin/Resources/config` -> `@SyliusInvoicingPlugin/config`
- `@SyliusInvoicingPlugin/Resources/translations` -> `@SyliusInvoicingPlugin/translations`
- `@SyliusInvoicingPlugin/Resources/views` -> `@SyliusInvoicingPlugin/templates`

You need to adjust the import of configuration file in your end application:
```diff
imports:
- - { resource: "@SyliusInvoicingPlugin/Resources/config/config.yml" }
+ - { resource: '@SyliusInvoicingPlugin/config/config.yaml' }
```

And the routes configuration paths:
```diff
sylius_invoicing_plugin_admin:
- resource: "@SyliusInvoicingPlugin/Resources/config/app/routing/admin_invoicing.yml"
- prefix: /admin
+ resource: '@SyliusInvoicingPlugin/config/admin_routes.yaml'
+ prefix: '/%sylius_admin.path_name%'

sylius_invoicing_plugin_shop:
- resource: "@SyliusInvoicingPlugin/Resources/config/app/routing/shop_invoicing.yml"
+ resource: '@SyliusInvoicingPlugin/config/shop_routes.yaml'
prefix: /{_locale}
requirements:
_locale: ^[a-z]{2}(?:_[A-Z]{2})?$
```

And the paths to assets and templates if you are using them.

1. The deprecated method `Sylius\InvoicingPlugin\Entity\InvoiceInterface::orderNumber()` has been removed,
use `Sylius\InvoicingPlugin\Entity\InvoiceInterface::order()` instead.

Expand Down
2 changes: 1 addition & 1 deletion docs/legacy_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
prefix: '/%sylius_admin.path_name%'
sylius_invoicing_plugin_shop:
resource: '@SyliusInvoicingPlugin/config/shop_routes.yml'
resource: '@SyliusInvoicingPlugin/config/shop_routes.yaml'
prefix: /{_locale}
requirements:
_locale: ^[a-z]{2}(?:_[A-Z]{2})?$
Expand Down

0 comments on commit 213e98c

Please sign in to comment.