Skip to content

Commit 23ab648

Browse files
#4 Update services according to Symfony best practices. Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly. Services must be prefixed with the bundle alias instead of using fully qualified class names => cleverage_soap_process
1 parent 654f7de commit 23ab648

File tree

9 files changed

+33
-27
lines changed

9 files changed

+33
-27
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ v2.0
33

44
## BC breaks
55

6+
* [#4](https://github.com/cleverage/soap-process-bundle/issues/4) Update services according to Symfony best practices.
7+
Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly.
8+
Services must be prefixed with the bundle alias instead of using fully qualified class names => `cleverage_soap_process`
9+
10+
611
### Changes
712

813
* [#2](https://github.com/cleverage/soap-process-bundle/issues/2) Add Makefile & .docker for local standalone usage

config/services/registry.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
services:
2+
cleverage_soap_process.registry.client:
3+
class: CleverAge\SoapProcessBundle\Registry\ClientRegistry
4+
public: false

config/services/task.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
cleverage_soap_process.task.request:
3+
class: CleverAge\SoapProcessBundle\Task\RequestTask
4+
public: false
5+
arguments:
6+
- '@monolog.logger'
7+
- '@cleverage_soap_process.registry.client'
8+
tags:
9+
- { name: monolog.logger, channel: cleverage_process_task }

config/services/transformer.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
cleverage_soap_process.transformer.request:
3+
class: CleverAge\SoapProcessBundle\Transformer\RequestTransformer
4+
public: false
5+
arguments:
6+
- '@cleverage_soap_process.registry.client'
7+
tags:
8+
- { name: cleverage.transformer }
9+
- { name: monolog.logger, channel: cleverage_process_transformer }

src/CleverAgeSoapProcessBundle.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
use Symfony\Component\DependencyInjection\ContainerBuilder;
1919
use Symfony\Component\HttpKernel\Bundle\Bundle;
2020

21-
/**
22-
* Class CleverAgeSoapProcessBundle.
23-
*
24-
* @author Valentin Clavreul <[email protected]>
25-
* @author Vincent Chalnot <[email protected]>
26-
* @author Madeline Veyrenc <[email protected]>
27-
*/
2821
class CleverAgeSoapProcessBundle extends Bundle
2922
{
3023
/**
@@ -40,4 +33,9 @@ public function build(ContainerBuilder $container): void
4033
)
4134
);
4235
}
36+
37+
public function getPath(): string
38+
{
39+
return \dirname(__DIR__);
40+
}
4341
}

src/DependencyInjection/CleverAgeSoapProcessExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CleverAgeSoapProcessExtension extends Extension
2828
{
2929
public function load(array $configs, ContainerBuilder $container): void
3030
{
31-
$this->findServices($container, __DIR__.'/../Resources/config/services');
31+
$this->findServices($container, __DIR__.'/../../config/services');
3232
}
3333

3434
/**

src/Resources/config/services/registry.yaml

-3
This file was deleted.

src/Resources/config/services/task.yaml

-8
This file was deleted.

src/Resources/config/services/transformer.yaml

-8
This file was deleted.

0 commit comments

Comments
 (0)