Skip to content

Commit

Permalink
chore(sf): rollback directory structure to avoid bc breaks keep it in…
Browse files Browse the repository at this point in the history
…stead for a new major version
  • Loading branch information
maxperei committed Jan 23, 2025
1 parent 3ec8dcb commit a2280dd
Show file tree
Hide file tree
Showing 34 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@

```yaml
imports:
- { resource: "@SynoliaSyliusGDPRPlugin/config/gdpr.yaml" }
- { resource: "@SynoliaSyliusGDPRPlugin/Resources/config/app/config.yaml" }
```
3. Create routing in `config/routes/gdpr.yaml` file:
```yaml
synolia_gdpr:
resource: "@SynoliaSyliusGDPRPlugin/config/routes/attributes.yaml"
resource: "@SynoliaSyliusGDPRPlugin/Resources/config/routes.yaml"
prefix: '/%sylius_admin.path_name%'
```
Expand Down
2 changes: 0 additions & 2 deletions config/gdpr.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion install/Application/config/packages/gdpr.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
imports:
- { resource: "@SynoliaSyliusGDPRPlugin/config/gdpr.yaml" }
- { resource: "@SynoliaSyliusGDPRPlugin/Resources/config/app/config.yaml" }
2 changes: 1 addition & 1 deletion install/Application/config/routes/gdpr.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
synolia_gdpr:
resource: "@SynoliaSyliusGDPRPlugin/config/routes/attributes.yaml"
resource: "@SynoliaSyliusGDPRPlugin/Resources/config/routes.yaml"
prefix: '/%sylius_admin.path_name%'
4 changes: 2 additions & 2 deletions src/DependencyInjection/SynoliaSyliusGDPRExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class SynoliaSyliusGDPRExtension extends Extension
public function load(array $configs, ContainerBuilder $container): void
{
$config = $this->processConfiguration($this->getConfiguration([], $container), $configs);
$loader = new YamlFileLoader($container, new FileLocator(\dirname(__DIR__, 2) . '/config'));
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));

$loader->load('services.yaml');

Expand Down Expand Up @@ -79,7 +79,7 @@ private function retrieveMappings(array $configs, bool $disableDefaultMappings =
'anonymization' => [
'mappings' => [
'paths' => [
\dirname(__DIR__, 2) . '/config/mappings/',
__DIR__ . '/../Resources/config/mappings/',
],
],
],
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/config/app/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports:
- { resource: "@SynoliaSyliusGDPRPlugin/Resources/config/packages/ui.yaml" }
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.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
controllers:
resource:
path: ../../src/Controller/
path: ../../Controller/
namespace: Synolia\SyliusGDPRPlugin\Controller
type: attribute
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.
5 changes: 3 additions & 2 deletions config/services.yaml → src/Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ services:
_defaults:
autowire: true
autoconfigure: true
public: false

Synolia\SyliusGDPRPlugin\:
resource: '../src/*'
exclude: '../src/{SynoliaSyliusGDPRPlugin.php}'
resource: '../../*'
exclude: '../../{SynoliaSyliusGDPRPlugin.php}'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions src/SynoliaSyliusGDPRPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ public function build(ContainerBuilder $container): void
$container->addCompilerPass(new RegisterAnonymizationLoader());
$container->addCompilerPass(new RegisterAdvancedActionsFormDataProcessorsPass());
}

public function getPath(): string
{
return \dirname(__DIR__);
}
}

0 comments on commit a2280dd

Please sign in to comment.