Skip to content

Commit

Permalink
Symfony 4 compatiblity (#8)
Browse files Browse the repository at this point in the history
* Symfony 4 compatiblity

* "ovh" service is now explicitely public.

* Added an alias to Ovh\Api for autowiring.

* Fix tests
  • Loading branch information
bpolaszek authored and dunglas committed Jun 21, 2018
1 parent 5c88dea commit 0cdf311
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<argument>%coop_tilleuls_ovh.consumer_key%</argument>
</service>

<service id="ovh" alias="coop_tilleuls_ovh.api" />
<service id="ovh" alias="coop_tilleuls_ovh.api" public="true" />
<service id="Ovh\Api" alias="coop_tilleuls_ovh.api" />
</services>

</container>
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
],
"require": {
"php": ">=5.5",
"symfony/dependency-injection" : "~2.3|~3.0",
"symfony/config" : "~2.3|~3.0",
"symfony/http-kernel": "~2.3|~3.0",
"symfony/dependency-injection" : "~2.3|~3.0|~4.0",
"symfony/config" : "~2.3|~3.0|~4.0",
"symfony/http-kernel": "~2.3|~3.0|~4.0",
"ovh/ovh": "~2.0"
},
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function it_loads(ContainerBuilder $container)
$container->hasExtension('http://symfony.com/schema/dic/services')->shouldBeCalled();
$container->setDefinition('coop_tilleuls_ovh.api', Argument::type('Symfony\Component\DependencyInjection\Definition'))->shouldBeCalled();
$container->setAlias('ovh', Argument::type('Symfony\Component\DependencyInjection\Alias'))->shouldBeCalled();
$container->setAlias('Ovh\Api', Argument::type('Symfony\Component\DependencyInjection\Alias'))->shouldBeCalled();

$configs = array(
array(
Expand Down

0 comments on commit 0cdf311

Please sign in to comment.