From 16fd57c158d60ee547e3072af3156634c04de7b2 Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Wed, 20 Nov 2024 07:54:10 +0100 Subject: [PATCH 1/2] Reorganize directory structure --- {src/Resources/assets => assets}/sylius-logo.png | Bin .../admin_invoicing.yml => config/admin_routes.yaml | 0 .../config/config.yml => config/config.yaml | 0 .../config => config}/doctrine/BillingData.orm.xml | 0 .../config => config}/doctrine/Invoice.orm.xml | 0 .../doctrine/InvoiceSequence.orm.xml | 0 .../doctrine/InvoiceShopBillingData.orm.xml | 0 .../config => config}/doctrine/LineItem.orm.xml | 0 .../config => config}/doctrine/TaxItem.orm.xml | 0 {src/Resources/config => config}/services.xml | 2 +- .../config => config}/services/actions.xml | 0 {src/Resources/config => config}/services/cli.xml | 0 .../config => config}/services/converters.xml | 0 .../config => config}/services/fixtures.xml | 0 .../config => config}/services/generators.xml | 0 .../config => config}/services/listeners.xml | 0 .../services/listeners/workflow.xml | 0 {src/Resources/config => config}/services/ui.xml | 0 .../shop_invoicing.yml => config/shop_routes.yaml | 0 {src/Resources/config => config}/validation.xml | 0 docs/legacy_installation.md | 8 ++++---- spec/Generator/InvoicePdfFileGeneratorSpec.php | 4 ++-- .../SyliusInvoicingExtension.php | 4 ++-- src/SyliusInvoicingPlugin.php | 5 +++++ .../Invoice/Admin/_downloadButton.html.twig | 0 .../Invoice/Admin/_resendButton.html.twig | 0 .../Invoice/Download/pdf.html.twig | 0 .../Invoice/Download/pdfLayout.html.twig | 0 .../Invoice/Email/invoiceGenerated.html.twig | 0 .../Invoice/Show/_backButton.html.twig | 0 .../Invoice/Show/_billingData.html.twig | 0 .../Invoice/Show/_breadcrumb.html.twig | 0 .../Invoice/Show/_header.html.twig | 0 .../Invoice/Show/_shopBillingData.html.twig | 0 .../views => templates}/Invoice/show.html.twig | 0 .../Order/Admin/_invoices.html.twig | 0 .../Order/Admin/fetchInvoices.html.twig | 0 .../Order/Shop/_downloadButton.html.twig | 0 .../Order/Shop/_invoices.html.twig | 0 .../Order/Shop/fetchInvoices.html.twig | 0 tests/Application/config/packages/_sylius.yaml | 2 +- .../config/packages/sylius_invoicing.yaml | 2 +- .../config/routes/sylius_invoicing_plugin.yaml | 4 ++-- .../SyliusInvoicingExtensionTest.php | 2 +- .../translations => translations}/flashes.de.yml | 0 .../translations => translations}/flashes.en.yml | 0 .../translations => translations}/flashes.pl.yml | 0 .../translations => translations}/messages.de.yml | 0 .../translations => translations}/messages.en.yml | 0 .../translations => translations}/messages.fr.yml | 0 .../translations => translations}/messages.pl.yml | 0 .../translations => translations}/validators.de.yml | 0 .../translations => translations}/validators.en.yml | 0 .../translations => translations}/validators.pl.yml | 0 54 files changed, 19 insertions(+), 14 deletions(-) rename {src/Resources/assets => assets}/sylius-logo.png (100%) rename src/Resources/config/app/routing/admin_invoicing.yml => config/admin_routes.yaml (100%) rename src/Resources/config/config.yml => config/config.yaml (100%) rename {src/Resources/config => config}/doctrine/BillingData.orm.xml (100%) rename {src/Resources/config => config}/doctrine/Invoice.orm.xml (100%) rename {src/Resources/config => config}/doctrine/InvoiceSequence.orm.xml (100%) rename {src/Resources/config => config}/doctrine/InvoiceShopBillingData.orm.xml (100%) rename {src/Resources/config => config}/doctrine/LineItem.orm.xml (100%) rename {src/Resources/config => config}/doctrine/TaxItem.orm.xml (100%) rename {src/Resources/config => config}/services.xml (98%) rename {src/Resources/config => config}/services/actions.xml (100%) rename {src/Resources/config => config}/services/cli.xml (100%) rename {src/Resources/config => config}/services/converters.xml (100%) rename {src/Resources/config => config}/services/fixtures.xml (100%) rename {src/Resources/config => config}/services/generators.xml (100%) rename {src/Resources/config => config}/services/listeners.xml (100%) rename {src/Resources/config => config}/services/listeners/workflow.xml (100%) rename {src/Resources/config => config}/services/ui.xml (100%) rename src/Resources/config/app/routing/shop_invoicing.yml => config/shop_routes.yaml (100%) rename {src/Resources/config => config}/validation.xml (100%) rename {src/Resources/views => templates}/Invoice/Admin/_downloadButton.html.twig (100%) rename {src/Resources/views => templates}/Invoice/Admin/_resendButton.html.twig (100%) rename {src/Resources/views => templates}/Invoice/Download/pdf.html.twig (100%) rename {src/Resources/views => templates}/Invoice/Download/pdfLayout.html.twig (100%) rename {src/Resources/views => templates}/Invoice/Email/invoiceGenerated.html.twig (100%) rename {src/Resources/views => templates}/Invoice/Show/_backButton.html.twig (100%) rename {src/Resources/views => templates}/Invoice/Show/_billingData.html.twig (100%) rename {src/Resources/views => templates}/Invoice/Show/_breadcrumb.html.twig (100%) rename {src/Resources/views => templates}/Invoice/Show/_header.html.twig (100%) rename {src/Resources/views => templates}/Invoice/Show/_shopBillingData.html.twig (100%) rename {src/Resources/views => templates}/Invoice/show.html.twig (100%) rename {src/Resources/views => templates}/Order/Admin/_invoices.html.twig (100%) rename {src/Resources/views => templates}/Order/Admin/fetchInvoices.html.twig (100%) rename {src/Resources/views => templates}/Order/Shop/_downloadButton.html.twig (100%) rename {src/Resources/views => templates}/Order/Shop/_invoices.html.twig (100%) rename {src/Resources/views => templates}/Order/Shop/fetchInvoices.html.twig (100%) rename {src/Resources/translations => translations}/flashes.de.yml (100%) rename {src/Resources/translations => translations}/flashes.en.yml (100%) rename {src/Resources/translations => translations}/flashes.pl.yml (100%) rename {src/Resources/translations => translations}/messages.de.yml (100%) rename {src/Resources/translations => translations}/messages.en.yml (100%) rename {src/Resources/translations => translations}/messages.fr.yml (100%) rename {src/Resources/translations => translations}/messages.pl.yml (100%) rename {src/Resources/translations => translations}/validators.de.yml (100%) rename {src/Resources/translations => translations}/validators.en.yml (100%) rename {src/Resources/translations => translations}/validators.pl.yml (100%) diff --git a/src/Resources/assets/sylius-logo.png b/assets/sylius-logo.png similarity index 100% rename from src/Resources/assets/sylius-logo.png rename to assets/sylius-logo.png diff --git a/src/Resources/config/app/routing/admin_invoicing.yml b/config/admin_routes.yaml similarity index 100% rename from src/Resources/config/app/routing/admin_invoicing.yml rename to config/admin_routes.yaml diff --git a/src/Resources/config/config.yml b/config/config.yaml similarity index 100% rename from src/Resources/config/config.yml rename to config/config.yaml diff --git a/src/Resources/config/doctrine/BillingData.orm.xml b/config/doctrine/BillingData.orm.xml similarity index 100% rename from src/Resources/config/doctrine/BillingData.orm.xml rename to config/doctrine/BillingData.orm.xml diff --git a/src/Resources/config/doctrine/Invoice.orm.xml b/config/doctrine/Invoice.orm.xml similarity index 100% rename from src/Resources/config/doctrine/Invoice.orm.xml rename to config/doctrine/Invoice.orm.xml diff --git a/src/Resources/config/doctrine/InvoiceSequence.orm.xml b/config/doctrine/InvoiceSequence.orm.xml similarity index 100% rename from src/Resources/config/doctrine/InvoiceSequence.orm.xml rename to config/doctrine/InvoiceSequence.orm.xml diff --git a/src/Resources/config/doctrine/InvoiceShopBillingData.orm.xml b/config/doctrine/InvoiceShopBillingData.orm.xml similarity index 100% rename from src/Resources/config/doctrine/InvoiceShopBillingData.orm.xml rename to config/doctrine/InvoiceShopBillingData.orm.xml diff --git a/src/Resources/config/doctrine/LineItem.orm.xml b/config/doctrine/LineItem.orm.xml similarity index 100% rename from src/Resources/config/doctrine/LineItem.orm.xml rename to config/doctrine/LineItem.orm.xml diff --git a/src/Resources/config/doctrine/TaxItem.orm.xml b/config/doctrine/TaxItem.orm.xml similarity index 100% rename from src/Resources/config/doctrine/TaxItem.orm.xml rename to config/doctrine/TaxItem.orm.xml diff --git a/src/Resources/config/services.xml b/config/services.xml similarity index 98% rename from src/Resources/config/services.xml rename to config/services.xml index 9fffdd4b..a5e803ef 100644 --- a/src/Resources/config/services.xml +++ b/config/services.xml @@ -6,7 +6,7 @@ - @SyliusInvoicingPlugin/Resources/assets/sylius-logo.png + @SyliusInvoicingPlugin/assets/sylius-logo.png %env(default:default_logo_file:resolve:SYLIUS_INVOICING_LOGO_FILE)% diff --git a/src/Resources/config/services/actions.xml b/config/services/actions.xml similarity index 100% rename from src/Resources/config/services/actions.xml rename to config/services/actions.xml diff --git a/src/Resources/config/services/cli.xml b/config/services/cli.xml similarity index 100% rename from src/Resources/config/services/cli.xml rename to config/services/cli.xml diff --git a/src/Resources/config/services/converters.xml b/config/services/converters.xml similarity index 100% rename from src/Resources/config/services/converters.xml rename to config/services/converters.xml diff --git a/src/Resources/config/services/fixtures.xml b/config/services/fixtures.xml similarity index 100% rename from src/Resources/config/services/fixtures.xml rename to config/services/fixtures.xml diff --git a/src/Resources/config/services/generators.xml b/config/services/generators.xml similarity index 100% rename from src/Resources/config/services/generators.xml rename to config/services/generators.xml diff --git a/src/Resources/config/services/listeners.xml b/config/services/listeners.xml similarity index 100% rename from src/Resources/config/services/listeners.xml rename to config/services/listeners.xml diff --git a/src/Resources/config/services/listeners/workflow.xml b/config/services/listeners/workflow.xml similarity index 100% rename from src/Resources/config/services/listeners/workflow.xml rename to config/services/listeners/workflow.xml diff --git a/src/Resources/config/services/ui.xml b/config/services/ui.xml similarity index 100% rename from src/Resources/config/services/ui.xml rename to config/services/ui.xml diff --git a/src/Resources/config/app/routing/shop_invoicing.yml b/config/shop_routes.yaml similarity index 100% rename from src/Resources/config/app/routing/shop_invoicing.yml rename to config/shop_routes.yaml diff --git a/src/Resources/config/validation.xml b/config/validation.xml similarity index 100% rename from src/Resources/config/validation.xml rename to config/validation.xml diff --git a/docs/legacy_installation.md b/docs/legacy_installation.md index cc4fb2f8..2736f886 100644 --- a/docs/legacy_installation.md +++ b/docs/legacy_installation.md @@ -19,18 +19,18 @@ ```yaml imports: - - { resource: "@SyliusInvoicingPlugin/Resources/config/config.yml" } + - { resource: '@SyliusInvoicingPlugin/config/config.yaml' } ``` 1. Import routing: ```yaml 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.yml' prefix: /{_locale} requirements: _locale: ^[a-z]{2}(?:_[A-Z]{2})?$ diff --git a/spec/Generator/InvoicePdfFileGeneratorSpec.php b/spec/Generator/InvoicePdfFileGeneratorSpec.php index 2a9029ce..57d92508 100644 --- a/spec/Generator/InvoicePdfFileGeneratorSpec.php +++ b/spec/Generator/InvoicePdfFileGeneratorSpec.php @@ -34,7 +34,7 @@ function let( $fileLocator, $invoiceFileNameGenerator, 'invoiceTemplate.html.twig', - '@SyliusInvoicingPlugin/Resources/assets/sylius-logo.png', + '@SyliusInvoicingPlugin/assets/sylius-logo.png', ); } @@ -53,7 +53,7 @@ function it_creates_invoice_pdf_with_generated_content_and_filename_basing_on_in $invoiceFileNameGenerator->generateForPdf($invoice)->willReturn('2015_05_00004444.pdf'); $invoice->channel()->willReturn($channel); - $fileLocator->locate('@SyliusInvoicingPlugin/Resources/assets/sylius-logo.png')->willReturn('located-path/sylius-logo.png'); + $fileLocator->locate('@SyliusInvoicingPlugin/assets/sylius-logo.png')->willReturn('located-path/sylius-logo.png'); $twigToPdfGenerator ->generate('invoiceTemplate.html.twig', ['invoice' => $invoice, 'channel' => $channel, 'invoiceLogoPath' => 'located-path/sylius-logo.png']) diff --git a/src/DependencyInjection/SyliusInvoicingExtension.php b/src/DependencyInjection/SyliusInvoicingExtension.php index 3e3daa71..b52d668e 100644 --- a/src/DependencyInjection/SyliusInvoicingExtension.php +++ b/src/DependencyInjection/SyliusInvoicingExtension.php @@ -27,7 +27,7 @@ final class SyliusInvoicingExtension extends AbstractResourceExtension implement public function load(array $configs, ContainerBuilder $container): void { - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../../config')); $loader->load('services.xml'); /** @var ConfigurationInterface $configuration */ @@ -55,7 +55,7 @@ protected function getMigrationsNamespace(): string protected function getMigrationsDirectory(): string { - return '@SyliusInvoicingPlugin/Migrations'; + return '@SyliusInvoicingPlugin/src/Migrations'; } protected function getNamespacesOfMigrationsExecutedBefore(): array diff --git a/src/SyliusInvoicingPlugin.php b/src/SyliusInvoicingPlugin.php index a1ead044..f07a8314 100644 --- a/src/SyliusInvoicingPlugin.php +++ b/src/SyliusInvoicingPlugin.php @@ -29,4 +29,9 @@ public function build(ContainerBuilder $container): void $container->addCompilerPass(new SymfonyClockCompilerPass()); } + + public function getPath(): string + { + return \dirname(__DIR__); + } } diff --git a/src/Resources/views/Invoice/Admin/_downloadButton.html.twig b/templates/Invoice/Admin/_downloadButton.html.twig similarity index 100% rename from src/Resources/views/Invoice/Admin/_downloadButton.html.twig rename to templates/Invoice/Admin/_downloadButton.html.twig diff --git a/src/Resources/views/Invoice/Admin/_resendButton.html.twig b/templates/Invoice/Admin/_resendButton.html.twig similarity index 100% rename from src/Resources/views/Invoice/Admin/_resendButton.html.twig rename to templates/Invoice/Admin/_resendButton.html.twig diff --git a/src/Resources/views/Invoice/Download/pdf.html.twig b/templates/Invoice/Download/pdf.html.twig similarity index 100% rename from src/Resources/views/Invoice/Download/pdf.html.twig rename to templates/Invoice/Download/pdf.html.twig diff --git a/src/Resources/views/Invoice/Download/pdfLayout.html.twig b/templates/Invoice/Download/pdfLayout.html.twig similarity index 100% rename from src/Resources/views/Invoice/Download/pdfLayout.html.twig rename to templates/Invoice/Download/pdfLayout.html.twig diff --git a/src/Resources/views/Invoice/Email/invoiceGenerated.html.twig b/templates/Invoice/Email/invoiceGenerated.html.twig similarity index 100% rename from src/Resources/views/Invoice/Email/invoiceGenerated.html.twig rename to templates/Invoice/Email/invoiceGenerated.html.twig diff --git a/src/Resources/views/Invoice/Show/_backButton.html.twig b/templates/Invoice/Show/_backButton.html.twig similarity index 100% rename from src/Resources/views/Invoice/Show/_backButton.html.twig rename to templates/Invoice/Show/_backButton.html.twig diff --git a/src/Resources/views/Invoice/Show/_billingData.html.twig b/templates/Invoice/Show/_billingData.html.twig similarity index 100% rename from src/Resources/views/Invoice/Show/_billingData.html.twig rename to templates/Invoice/Show/_billingData.html.twig diff --git a/src/Resources/views/Invoice/Show/_breadcrumb.html.twig b/templates/Invoice/Show/_breadcrumb.html.twig similarity index 100% rename from src/Resources/views/Invoice/Show/_breadcrumb.html.twig rename to templates/Invoice/Show/_breadcrumb.html.twig diff --git a/src/Resources/views/Invoice/Show/_header.html.twig b/templates/Invoice/Show/_header.html.twig similarity index 100% rename from src/Resources/views/Invoice/Show/_header.html.twig rename to templates/Invoice/Show/_header.html.twig diff --git a/src/Resources/views/Invoice/Show/_shopBillingData.html.twig b/templates/Invoice/Show/_shopBillingData.html.twig similarity index 100% rename from src/Resources/views/Invoice/Show/_shopBillingData.html.twig rename to templates/Invoice/Show/_shopBillingData.html.twig diff --git a/src/Resources/views/Invoice/show.html.twig b/templates/Invoice/show.html.twig similarity index 100% rename from src/Resources/views/Invoice/show.html.twig rename to templates/Invoice/show.html.twig diff --git a/src/Resources/views/Order/Admin/_invoices.html.twig b/templates/Order/Admin/_invoices.html.twig similarity index 100% rename from src/Resources/views/Order/Admin/_invoices.html.twig rename to templates/Order/Admin/_invoices.html.twig diff --git a/src/Resources/views/Order/Admin/fetchInvoices.html.twig b/templates/Order/Admin/fetchInvoices.html.twig similarity index 100% rename from src/Resources/views/Order/Admin/fetchInvoices.html.twig rename to templates/Order/Admin/fetchInvoices.html.twig diff --git a/src/Resources/views/Order/Shop/_downloadButton.html.twig b/templates/Order/Shop/_downloadButton.html.twig similarity index 100% rename from src/Resources/views/Order/Shop/_downloadButton.html.twig rename to templates/Order/Shop/_downloadButton.html.twig diff --git a/src/Resources/views/Order/Shop/_invoices.html.twig b/templates/Order/Shop/_invoices.html.twig similarity index 100% rename from src/Resources/views/Order/Shop/_invoices.html.twig rename to templates/Order/Shop/_invoices.html.twig diff --git a/src/Resources/views/Order/Shop/fetchInvoices.html.twig b/templates/Order/Shop/fetchInvoices.html.twig similarity index 100% rename from src/Resources/views/Order/Shop/fetchInvoices.html.twig rename to templates/Order/Shop/fetchInvoices.html.twig diff --git a/tests/Application/config/packages/_sylius.yaml b/tests/Application/config/packages/_sylius.yaml index 389cb69f..71fdda2e 100644 --- a/tests/Application/config/packages/_sylius.yaml +++ b/tests/Application/config/packages/_sylius.yaml @@ -5,7 +5,7 @@ imports: - { resource: "@SyliusShopBundle/Resources/config/app/config.yml" } - - { resource: "@SyliusInvoicingPlugin/Resources/config/config.yml" } + - { resource: "@SyliusInvoicingPlugin/config/config.yaml" } - { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" } parameters: diff --git a/tests/Application/config/packages/sylius_invoicing.yaml b/tests/Application/config/packages/sylius_invoicing.yaml index 0075ab3b..93b2ba94 100644 --- a/tests/Application/config/packages/sylius_invoicing.yaml +++ b/tests/Application/config/packages/sylius_invoicing.yaml @@ -1,2 +1,2 @@ imports: - - { resource: "@SyliusInvoicingPlugin/Resources/config/config.yml" } + - { resource: "@SyliusInvoicingPlugin/config/config.yaml" } diff --git a/tests/Application/config/routes/sylius_invoicing_plugin.yaml b/tests/Application/config/routes/sylius_invoicing_plugin.yaml index b8fbd60f..0a4f2018 100644 --- a/tests/Application/config/routes/sylius_invoicing_plugin.yaml +++ b/tests/Application/config/routes/sylius_invoicing_plugin.yaml @@ -1,9 +1,9 @@ sylius_invoicing_plugin_admin: - resource: "@SyliusInvoicingPlugin/Resources/config/app/routing/admin_invoicing.yml" + resource: "@SyliusInvoicingPlugin/config/admin_routes.yaml" prefix: /admin 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})?$ diff --git a/tests/DependencyInjection/SyliusInvoicingExtensionTest.php b/tests/DependencyInjection/SyliusInvoicingExtensionTest.php index 2bb7fdea..ef108fb5 100644 --- a/tests/DependencyInjection/SyliusInvoicingExtensionTest.php +++ b/tests/DependencyInjection/SyliusInvoicingExtensionTest.php @@ -41,7 +41,7 @@ public function it_autoconfigures_prepending_doctrine_migration_with_proper_migr $doctrineMigrationsExtensionConfig[0]['migrations_paths']['Sylius\InvoicingPlugin\Migrations'] )); self::assertSame( - '@SyliusInvoicingPlugin/Migrations', + '@SyliusInvoicingPlugin/src/Migrations', $doctrineMigrationsExtensionConfig[0]['migrations_paths']['Sylius\InvoicingPlugin\Migrations'] ); diff --git a/src/Resources/translations/flashes.de.yml b/translations/flashes.de.yml similarity index 100% rename from src/Resources/translations/flashes.de.yml rename to translations/flashes.de.yml diff --git a/src/Resources/translations/flashes.en.yml b/translations/flashes.en.yml similarity index 100% rename from src/Resources/translations/flashes.en.yml rename to translations/flashes.en.yml diff --git a/src/Resources/translations/flashes.pl.yml b/translations/flashes.pl.yml similarity index 100% rename from src/Resources/translations/flashes.pl.yml rename to translations/flashes.pl.yml diff --git a/src/Resources/translations/messages.de.yml b/translations/messages.de.yml similarity index 100% rename from src/Resources/translations/messages.de.yml rename to translations/messages.de.yml diff --git a/src/Resources/translations/messages.en.yml b/translations/messages.en.yml similarity index 100% rename from src/Resources/translations/messages.en.yml rename to translations/messages.en.yml diff --git a/src/Resources/translations/messages.fr.yml b/translations/messages.fr.yml similarity index 100% rename from src/Resources/translations/messages.fr.yml rename to translations/messages.fr.yml diff --git a/src/Resources/translations/messages.pl.yml b/translations/messages.pl.yml similarity index 100% rename from src/Resources/translations/messages.pl.yml rename to translations/messages.pl.yml diff --git a/src/Resources/translations/validators.de.yml b/translations/validators.de.yml similarity index 100% rename from src/Resources/translations/validators.de.yml rename to translations/validators.de.yml diff --git a/src/Resources/translations/validators.en.yml b/translations/validators.en.yml similarity index 100% rename from src/Resources/translations/validators.en.yml rename to translations/validators.en.yml diff --git a/src/Resources/translations/validators.pl.yml b/translations/validators.pl.yml similarity index 100% rename from src/Resources/translations/validators.pl.yml rename to translations/validators.pl.yml From 213e98c1c7c795422a5a86a2df3baeb239d144f9 Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Wed, 20 Nov 2024 10:41:10 +0100 Subject: [PATCH 2/2] Add a note about moving configuration files --- UPGRADE.md | 31 +++++++++++++++++++++++++++++++ docs/legacy_installation.md | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/UPGRADE.md b/UPGRADE.md index ed9530b8..52fad818 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -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. diff --git a/docs/legacy_installation.md b/docs/legacy_installation.md index 2736f886..1bb01948 100644 --- a/docs/legacy_installation.md +++ b/docs/legacy_installation.md @@ -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})?$