Skip to content

Commit 2fa3932

Browse files
authored
Merge pull request #451 from mpysiak/SYL-3914-refactor-directory-structure
[Maintenance] Refactor directory structure
2 parents 7245aca + e0c0c28 commit 2fa3932

File tree

113 files changed

+18
-13
lines changed

Some content is hidden

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

113 files changed

+18
-13
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/Resources/config/app/config.yml config/app/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
imports:
2-
- { resource: "@SyliusRefundPlugin/Resources/config/app/twig_hooks/**/*.yaml" }
3-
- { resource: "@SyliusRefundPlugin/Resources/config/app/integrations.php" }
2+
- { resource: "@SyliusRefundPlugin/config/app/twig_hooks/**/*.yaml" }
3+
- { resource: "@SyliusRefundPlugin/config/app/integrations.php" }
44

55
parameters:
66
sylius_refund.credit_memo_save_path: "%kernel.project_dir%/private/credit_memos/"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
sylius_refund_admin:
2-
resource: "@SyliusRefundPlugin/Resources/config/admin_routing.yml"
2+
resource: "@SyliusRefundPlugin/config/admin_routing.yml"
33
prefix: '/%sylius_admin.path_name%'
44

55
sylius_refund_shop:
6-
resource: "@SyliusRefundPlugin/Resources/config/shop_routing.yml"
6+
resource: "@SyliusRefundPlugin/config/shop_routing.yml"
77
prefix: /{_locale}
88
requirements:
99
_locale: ^[a-z]{2}(?:_[A-Z]{2})?$

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</imports>
2222

2323
<parameters>
24-
<parameter key="sylius_refund.default_logo_file">@SyliusRefundPlugin/Resources/assets/sylius-logo.png</parameter>
24+
<parameter key="sylius_refund.default_logo_file">@SyliusRefundPlugin/assets/sylius-logo.png</parameter>
2525
<parameter key="sylius_refund.template.logo_file">%env(default:sylius_refund.default_logo_file:resolve:SYLIUS_REFUND_LOGO_FILE)%</parameter>
2626
</parameters>
2727

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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

spec/Generator/CreditMemoPdfFileGeneratorSpec.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function let(
3535
$creditMemoRepository,
3636
$fileLocator,
3737
'creditMemoTemplate.html.twig',
38-
'@SyliusRefundPlugin/Resources/assets/sylius-logo.png',
38+
'@SyliusRefundPlugin/assets/sylius-logo.png',
3939
$twigToPdfGenerator,
4040
$creditMemoFileNameGenerator,
4141
);
@@ -59,7 +59,7 @@ function it_creates_credit_memo_pdf_with_generated_content_and_file_name_basing_
5959
$creditMemoFileNameGenerator->generateForPdf($creditMemo)->willReturn('2015_05_00004444.pdf');
6060

6161
$fileLocator
62-
->locate('@SyliusRefundPlugin/Resources/assets/sylius-logo.png')
62+
->locate('@SyliusRefundPlugin/assets/sylius-logo.png')
6363
->willReturn('located-path/sylius-logo.png');
6464

6565
$twigToPdfGenerator

src/DependencyInjection/SyliusRefundExtension.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function load(array $configs, ContainerBuilder $container): void
3838

3939
$configs = $this->processConfiguration($configuration, $configs);
4040

41-
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
41+
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
4242
$loader->load('services.xml');
4343

4444
$this->tagsAutoconfiguration($container, [
@@ -70,7 +70,7 @@ protected function getMigrationsNamespace(): string
7070

7171
protected function getMigrationsDirectory(): string
7272
{
73-
return '@SyliusRefundPlugin/Migrations';
73+
return '@SyliusRefundPlugin/src/Migrations';
7474
}
7575

7676
/** @return string[] */

src/SyliusRefundPlugin.php

+5
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@
1919
final class SyliusRefundPlugin extends Bundle
2020
{
2121
use SyliusPluginTrait;
22+
23+
public function getPath(): string
24+
{
25+
return \dirname(__DIR__);
26+
}
2227
}
File renamed without changes.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import '../../../../src/Resources/assets/entrypoint';
1+
import '../../../../assets/entrypoint';
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
imports:
2-
- { resource: "@SyliusRefundPlugin/Resources/config/app/config.yml" }
2+
- { resource: "@SyliusRefundPlugin/config/app/config.yml" }

tests/Application/config/routes.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sylius_refund:
2-
resource: "@SyliusRefundPlugin/Resources/config/routing.yml"
2+
resource: "@SyliusRefundPlugin/config/routing.yml"

tests/DependencyInjection/SyliusRefundExtensionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function it_autoconfigures_prepending_doctrine_migration_with_proper_migr
3939
$doctrineMigrationsExtensionConfig[0]['migrations_paths']['Sylius\RefundPlugin\Migrations']
4040
));
4141
self::assertSame(
42-
'@SyliusRefundPlugin/Migrations',
42+
'@SyliusRefundPlugin/src/Migrations',
4343
$doctrineMigrationsExtensionConfig[0]['migrations_paths']['Sylius\RefundPlugin\Migrations']
4444
);
4545

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)