Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DI] change name to tag + add XMl support + adding yaml/xml tests
- Loading branch information
Anthony MARTIN
committed
Feb 21, 2019
1 parent
020afbc
commit 57937e4
Showing
17 changed files
with
219 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/Symfony/Component/DependencyInjection/Tests/Fixtures/BarTagClass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures; | ||
|
||
class BarTagClass | ||
{ | ||
public static function getDefaultFooName() | ||
{ | ||
return 'bar_tag_class'; | ||
} | ||
|
||
public static function getFooBar() | ||
{ | ||
return 'bar_tab_class_with_defaultmethod'; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/Symfony/Component/DependencyInjection/Tests/Fixtures/FooBarTaggedClass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures; | ||
|
||
class FooBarTaggedClass | ||
{ | ||
private $param; | ||
|
||
public function __construct($param = []) | ||
{ | ||
$this->param = $param; | ||
} | ||
|
||
public function getParam() | ||
{ | ||
return $this->param; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/Symfony/Component/DependencyInjection/Tests/Fixtures/FooTagClass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures; | ||
|
||
class FooTagClass | ||
{ | ||
public static function getDefaultFooName() | ||
{ | ||
return 'foo_tag_class'; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...mfony/Component/DependencyInjection/Tests/Fixtures/xml/services_with_tagged_arguments.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<service id="service_container" class="Symfony\Component\DependencyInjection\ContainerInterface" public="true" synthetic="true"/> | ||
<service id="foo" class="Foo"> | ||
<tag name="foo_tag"/> | ||
</service> | ||
<service id="foo_tagged_iterator" class="Bar" public="true"> | ||
<argument type="tagged" tag="foo_tag" index-by="barfoo" default-index-method="foobar"/> | ||
</service> | ||
<service id="Psr\Container\ContainerInterface" alias="service_container" public="false"/> | ||
<service id="Symfony\Component\DependencyInjection\ContainerInterface" alias="service_container" public="false"/> | ||
</services> | ||
</container> |
19 changes: 19 additions & 0 deletions
19
...mfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_with_tagged_argument.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
services: | ||
service_container: | ||
class: Symfony\Component\DependencyInjection\ContainerInterface | ||
public: true | ||
synthetic: true | ||
foo_service: | ||
class: Foo | ||
tags: | ||
- { name: foo } | ||
foo_service_tagged: | ||
class: Bar | ||
arguments: [!tagged { tag: foo, index_by: barfoo, default_index_method: foobar }] | ||
Psr\Container\ContainerInterface: | ||
alias: service_container | ||
public: false | ||
Symfony\Component\DependencyInjection\ContainerInterface: | ||
alias: service_container | ||
public: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters