Skip to content

Commit 16fd57c

Browse files
committed
Reorganize directory structure
1 parent dc2ec13 commit 16fd57c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+19
-14
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/Resources/config/services.xml config/services.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</imports>
77

88
<parameters>
9-
<parameter key="default_logo_file">@SyliusInvoicingPlugin/Resources/assets/sylius-logo.png</parameter>
9+
<parameter key="default_logo_file">@SyliusInvoicingPlugin/assets/sylius-logo.png</parameter>
1010
<parameter key="sylius.invoicing.template.logo_file">%env(default:default_logo_file:resolve:SYLIUS_INVOICING_LOGO_FILE)%</parameter>
1111
</parameters>
1212

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/legacy_installation.md

+4-4

spec/Generator/InvoicePdfFileGeneratorSpec.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function let(
3434
$fileLocator,
3535
$invoiceFileNameGenerator,
3636
'invoiceTemplate.html.twig',
37-
'@SyliusInvoicingPlugin/Resources/assets/sylius-logo.png',
37+
'@SyliusInvoicingPlugin/assets/sylius-logo.png',
3838
);
3939
}
4040

@@ -53,7 +53,7 @@ function it_creates_invoice_pdf_with_generated_content_and_filename_basing_on_in
5353
$invoiceFileNameGenerator->generateForPdf($invoice)->willReturn('2015_05_00004444.pdf');
5454
$invoice->channel()->willReturn($channel);
5555

56-
$fileLocator->locate('@SyliusInvoicingPlugin/Resources/assets/sylius-logo.png')->willReturn('located-path/sylius-logo.png');
56+
$fileLocator->locate('@SyliusInvoicingPlugin/assets/sylius-logo.png')->willReturn('located-path/sylius-logo.png');
5757

5858
$twigToPdfGenerator
5959
->generate('invoiceTemplate.html.twig', ['invoice' => $invoice, 'channel' => $channel, 'invoiceLogoPath' => 'located-path/sylius-logo.png'])

src/DependencyInjection/SyliusInvoicingExtension.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class SyliusInvoicingExtension extends AbstractResourceExtension implement
2727

2828
public function load(array $configs, ContainerBuilder $container): void
2929
{
30-
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
30+
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
3131
$loader->load('services.xml');
3232

3333
/** @var ConfigurationInterface $configuration */
@@ -55,7 +55,7 @@ protected function getMigrationsNamespace(): string
5555

5656
protected function getMigrationsDirectory(): string
5757
{
58-
return '@SyliusInvoicingPlugin/Migrations';
58+
return '@SyliusInvoicingPlugin/src/Migrations';
5959
}
6060

6161
protected function getNamespacesOfMigrationsExecutedBefore(): array

src/SyliusInvoicingPlugin.php

+5
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,9 @@ public function build(ContainerBuilder $container): void
2929

3030
$container->addCompilerPass(new SymfonyClockCompilerPass());
3131
}
32+
33+
public function getPath(): string
34+
{
35+
return \dirname(__DIR__);
36+
}
3237
}
File renamed without changes.

tests/Application/config/packages/_sylius.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ imports:
55

66
- { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }
77

8-
- { resource: "@SyliusInvoicingPlugin/Resources/config/config.yml" }
8+
- { resource: "@SyliusInvoicingPlugin/config/config.yaml" }
99

1010
- { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" }
1111
parameters:
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
imports:
2-
- { resource: "@SyliusInvoicingPlugin/Resources/config/config.yml" }
2+
- { resource: "@SyliusInvoicingPlugin/config/config.yaml" }
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
sylius_invoicing_plugin_admin:
2-
resource: "@SyliusInvoicingPlugin/Resources/config/app/routing/admin_invoicing.yml"
2+
resource: "@SyliusInvoicingPlugin/config/admin_routes.yaml"
33
prefix: /admin
44

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

tests/DependencyInjection/SyliusInvoicingExtensionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function it_autoconfigures_prepending_doctrine_migration_with_proper_migr
4141
$doctrineMigrationsExtensionConfig[0]['migrations_paths']['Sylius\InvoicingPlugin\Migrations']
4242
));
4343
self::assertSame(
44-
'@SyliusInvoicingPlugin/Migrations',
44+
'@SyliusInvoicingPlugin/src/Migrations',
4545
$doctrineMigrationsExtensionConfig[0]['migrations_paths']['Sylius\InvoicingPlugin\Migrations']
4646
);
4747

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)