Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e87f86b

Browse filesBrowse files
committed
feature #35076 [DI] added possibility to define services with abstract arguments (Islam93)
This PR was merged into the 5.1-dev branch. Discussion ---------- [DI] added possibility to define services with abstract arguments | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #31769 | License | MIT | Doc PR | n/a feature caused by rfc #31769 from issues list I hope, this PR will be useful Abstract argument have to replaced by one of compiler passes or exception will be thrown. Example: This service definition ```xml ... <service id="App\Test\Test"> <argument key="$a" type="abstract">should be defined by TestPass</argument> </service> ... ``` or this for yaml ```yaml App\Test\Test: arguments: $a: !abstract should be defined by TestPass ``` causes exception like `Argument "$a" of service "App\Test\Test" is abstract (should be defined by TestPass), did you forget to define it?` if argument was not replaced by compiler pass ```php ... public function process(ContainerBuilder $container) { $test = $container->getDefinition(Test::class); $test->setArgument('$a', 'test'); } ... ``` Commits ------- 62fefaa [DI] added possibility to define services with abstract arguments
2 parents 8a87490 + 62fefaa commit e87f86b
Copy full SHA for e87f86b
Expand file treeCollapse file tree

19 files changed

+229
-3
lines changed
+44Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\DependencyInjection\Argument;
13+
14+
/**
15+
* Represents an abstract service argument, which have to be set by a compiler pass or a DI extension.
16+
*/
17+
final class AbstractArgument
18+
{
19+
private $serviceId;
20+
private $argKey;
21+
private $text;
22+
23+
public function __construct(string $serviceId, string $argKey, string $text = '')
24+
{
25+
$this->serviceId = $serviceId;
26+
$this->argKey = $argKey;
27+
$this->text = $text;
28+
}
29+
30+
public function getServiceId(): string
31+
{
32+
return $this->serviceId;
33+
}
34+
35+
public function getArgumentKey(): string
36+
{
37+
return $this->argKey;
38+
}
39+
40+
public function getText(): string
41+
{
42+
return $this->text;
43+
}
44+
}

‎src/Symfony/Component/DependencyInjection/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
* added support to autowire public typed properties in php 7.4
88
* added support for defining method calls, a configurator, and property setters in `InlineServiceConfigurator`
9+
* added possibility to define abstract service arguments
910

1011
5.0.0
1112
-----

‎src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/ContainerBuilder.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Symfony\Component\Config\Resource\GlobResource;
2121
use Symfony\Component\Config\Resource\ReflectionClassResource;
2222
use Symfony\Component\Config\Resource\ResourceInterface;
23+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
2324
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
2425
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
2526
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
@@ -1215,6 +1216,8 @@ private function doResolveServices($value, array &$inlineServices = [], bool $is
12151216
$value = $this->getParameter((string) $value);
12161217
} elseif ($value instanceof Expression) {
12171218
$value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this]);
1219+
} elseif ($value instanceof AbstractArgument) {
1220+
throw new RuntimeException(sprintf('Argument "%s" of service "%s" is abstract%s, did you forget to define it?', $value->getArgumentKey(), $value->getServiceId(), $value->getText() ? ' ('.$value->getText().')' : ''));
12181221
}
12191222

12201223
return $value;

‎src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Composer\Autoload\ClassLoader;
1515
use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader;
16+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1617
use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
1718
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
1819
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
@@ -1739,6 +1740,8 @@ private function dumpValue($value, bool $interpolate = true): string
17391740

17401741
return $code;
17411742
}
1743+
} elseif ($value instanceof AbstractArgument) {
1744+
throw new RuntimeException(sprintf('Argument "%s" of service "%s" is abstract%s, did you forget to define it?', $value->getArgumentKey(), $value->getServiceId(), $value->getText() ? ' ('.$value->getText().')' : ''));
17421745
} elseif (\is_object($value) || \is_resource($value)) {
17431746
throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
17441747
}

‎src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\DependencyInjection\Dumper;
1313

1414
use Symfony\Component\DependencyInjection\Alias;
15+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1516
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
1617
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
1718
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
@@ -312,6 +313,14 @@ private function convertParameters(array $parameters, string $type, \DOMElement
312313
$element->setAttribute('type', 'binary');
313314
$text = $this->document->createTextNode(self::phpToXml(base64_encode($value)));
314315
$element->appendChild($text);
316+
} elseif ($value instanceof AbstractArgument) {
317+
$argKey = $value->getArgumentKey();
318+
if (!is_numeric($argKey)) {
319+
$element->setAttribute('key', $argKey);
320+
}
321+
$element->setAttribute('type', 'abstract');
322+
$text = $this->document->createTextNode(self::phpToXml($value->getText()));
323+
$element->appendChild($text);
315324
} else {
316325
if (\in_array($value, ['null', 'true', 'false'], true)) {
317326
$element->setAttribute('type', 'string');

‎src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\DependencyInjection\Dumper;
1313

1414
use Symfony\Component\DependencyInjection\Alias;
15+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1516
use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
1617
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
1718
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
@@ -284,6 +285,8 @@ private function dumpValue($value)
284285
return $this->getExpressionCall((string) $value);
285286
} elseif ($value instanceof Definition) {
286287
return new TaggedValue('service', (new Parser())->parse("_:\n".$this->addService('_', $value), Yaml::PARSE_CUSTOM_TAGS)['_']['_']);
288+
} elseif ($value instanceof AbstractArgument) {
289+
return new TaggedValue('abstract', $value->getText());
287290
} elseif (\is_object($value) || \is_resource($value)) {
288291
throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
289292
}

‎src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\Config\Util\XmlUtils;
1515
use Symfony\Component\DependencyInjection\Alias;
16+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1617
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
1718
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
1819
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
@@ -537,6 +538,10 @@ private function getArgumentsAsPhp(\DOMElement $node, string $name, string $file
537538
}
538539
$arguments[$key] = $value;
539540
break;
541+
case 'abstract':
542+
$serviceId = $node->getAttribute('id');
543+
$arguments[$key] = new AbstractArgument($serviceId, (string) $key, $arg->nodeValue);
544+
break;
540545
case 'string':
541546
$arguments[$key] = $arg->nodeValue;
542547
break;

‎src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\DependencyInjection\Loader;
1313

1414
use Symfony\Component\DependencyInjection\Alias;
15+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1516
use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
1617
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
1718
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
@@ -446,7 +447,7 @@ private function parseDefinition(string $id, $service, string $file, array $defa
446447
}
447448

448449
if (isset($service['arguments'])) {
449-
$definition->setArguments($this->resolveServices($service['arguments'], $file));
450+
$definition->setArguments($this->resolveServices($service['arguments'], $file, false, $id));
450451
}
451452

452453
if (isset($service['properties'])) {
@@ -722,7 +723,7 @@ private function validate($content, string $file): ?array
722723
*
723724
* @return array|string|Reference|ArgumentInterface
724725
*/
725-
private function resolveServices($value, string $file, bool $isParameter = false)
726+
private function resolveServices($value, string $file, bool $isParameter = false, string $serviceId = '', string $argKey = '')
726727
{
727728
if ($value instanceof TaggedValue) {
728729
$argument = $value->getValue();
@@ -795,13 +796,16 @@ private function resolveServices($value, string $file, bool $isParameter = false
795796

796797
return new Reference($id);
797798
}
799+
if ('abstract' === $value->getTag()) {
800+
return new AbstractArgument($serviceId, $argKey, $value->getValue());
801+
}
798802

799803
throw new InvalidArgumentException(sprintf('Unsupported tag "!%s".', $value->getTag()));
800804
}
801805

802806
if (\is_array($value)) {
803807
foreach ($value as $k => $v) {
804-
$value[$k] = $this->resolveServices($v, $file, $isParameter);
808+
$value[$k] = $this->resolveServices($v, $file, $isParameter, $serviceId, $k);
805809
}
806810
} elseif (\is_string($value) && 0 === strpos($value, '@=')) {
807811
if (!class_exists(Expression::class)) {

‎src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@
260260

261261
<xsd:simpleType name="argument_type">
262262
<xsd:restriction base="xsd:string">
263+
<xsd:enumeration value="abstract" />
263264
<xsd:enumeration value="collection" />
264265
<xsd:enumeration value="service" />
265266
<xsd:enumeration value="expression" />
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\DependencyInjection\Tests\Argument;
13+
14+
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
16+
17+
class AbstractArgumentTest extends TestCase
18+
{
19+
public function testAbstractArgumentGetters()
20+
{
21+
$argument = new AbstractArgument('foo', '$bar', 'should be defined by Pass');
22+
$this->assertSame('foo', $argument->getServiceId());
23+
$this->assertSame('$bar', $argument->getArgumentKey());
24+
$this->assertSame('should be defined by Pass', $argument->getText());
25+
}
26+
}

‎src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Symfony\Component\Config\Resource\FileResource;
2323
use Symfony\Component\Config\Resource\ResourceInterface;
2424
use Symfony\Component\DependencyInjection\Alias;
25+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
2526
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
2627
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
2728
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
@@ -41,6 +42,7 @@
4142
use Symfony\Component\DependencyInjection\Tests\Compiler\Wither;
4243
use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
4344
use Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition;
45+
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooWithAbstractArgument;
4446
use Symfony\Component\DependencyInjection\Tests\Fixtures\ScalarFactory;
4547
use Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy;
4648
use Symfony\Component\DependencyInjection\TypedReference;
@@ -542,6 +544,18 @@ public function testCreateServiceWithExpression()
542544
$this->assertEquals('foobar', $builder->get('foo')->arguments['foo']);
543545
}
544546

547+
public function testCreateServiceWithAbstractArgument()
548+
{
549+
$this->expectException(RuntimeException::class);
550+
$this->expectExceptionMessage('Argument "$baz" of service "foo" is abstract (should be defined by Pass), did you forget to define it?');
551+
552+
$builder = new ContainerBuilder();
553+
$builder->register('foo', FooWithAbstractArgument::class)
554+
->addArgument(new AbstractArgument('foo', '$baz', 'should be defined by Pass'));
555+
556+
$builder->get('foo');
557+
}
558+
545559
public function testResolveServices()
546560
{
547561
$builder = new ContainerBuilder();

‎src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Psr\Container\ContainerInterface;
1616
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
1717
use Symfony\Component\Config\FileLocator;
18+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1819
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
1920
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
2021
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
@@ -33,6 +34,7 @@
3334
use Symfony\Component\DependencyInjection\Tests\Compiler\Foo;
3435
use Symfony\Component\DependencyInjection\Tests\Compiler\Wither;
3536
use Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition;
37+
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooWithAbstractArgument;
3638
use Symfony\Component\DependencyInjection\Tests\Fixtures\ScalarFactory;
3739
use Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator;
3840
use Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber;
@@ -1363,6 +1365,24 @@ public function testMultipleDeprecatedAliasesWorking()
13631365
$this->assertInstanceOf(\stdClass::class, $container->get('deprecated1'));
13641366
$this->assertInstanceOf(\stdClass::class, $container->get('deprecated2'));
13651367
}
1368+
1369+
public function testDumpServiceWithAbstractArgument()
1370+
{
1371+
$this->expectException(RuntimeException::class);
1372+
$this->expectExceptionMessage('Argument "$baz" of service "Symfony\Component\DependencyInjection\Tests\Fixtures\FooWithAbstractArgument" is abstract (should be defined by Pass), did you forget to define it?');
1373+
1374+
$container = new ContainerBuilder();
1375+
1376+
$container->register(FooWithAbstractArgument::class, FooWithAbstractArgument::class)
1377+
->setArgument('$baz', new AbstractArgument(FooWithAbstractArgument::class, '$baz', 'should be defined by Pass'))
1378+
->setArgument('$bar', 'test')
1379+
->setPublic(true);
1380+
1381+
$container->compile();
1382+
1383+
$dumper = new PhpDumper($container);
1384+
$dumper->dump();
1385+
}
13661386
}
13671387

13681388
class Rot13EnvVarProcessor implements EnvVarProcessorInterface

‎src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Config\FileLocator;
16+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1617
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
1718
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
1819
use Symfony\Component\DependencyInjection\ContainerBuilder;
1920
use Symfony\Component\DependencyInjection\ContainerInterface;
2021
use Symfony\Component\DependencyInjection\Dumper\XmlDumper;
2122
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
2223
use Symfony\Component\DependencyInjection\Reference;
24+
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooWithAbstractArgument;
2325

2426
class XmlDumperTest extends TestCase
2527
{
@@ -237,4 +239,15 @@ public function testDumpAbstractServices()
237239

238240
$this->assertEquals(file_get_contents(self::$fixturesPath.'/xml/services_abstract.xml'), $dumper->dump());
239241
}
242+
243+
public function testDumpServiceWithAbstractArgument()
244+
{
245+
$container = new ContainerBuilder();
246+
$container->register(FooWithAbstractArgument::class, FooWithAbstractArgument::class)
247+
->setArgument('$baz', new AbstractArgument(FooWithAbstractArgument::class, '$baz', 'should be defined by Pass'))
248+
->setArgument('$bar', 'test');
249+
250+
$dumper = new XmlDumper($container);
251+
$this->assertStringEqualsFile(self::$fixturesPath.'/xml/services_with_abstract_argument.xml', $dumper->dump());
252+
}
240253
}

‎src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Config\FileLocator;
16+
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
1617
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
1718
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
1819
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -21,6 +22,7 @@
2122
use Symfony\Component\DependencyInjection\Dumper\YamlDumper;
2223
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
2324
use Symfony\Component\DependencyInjection\Reference;
25+
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooWithAbstractArgument;
2426
use Symfony\Component\Yaml\Parser;
2527
use Symfony\Component\Yaml\Yaml;
2628

@@ -117,6 +119,17 @@ public function testTaggedArguments()
117119
$this->assertStringEqualsFile(self::$fixturesPath.'/yaml/services_with_tagged_argument.yml', $dumper->dump());
118120
}
119121

122+
public function testDumpServiceWithAbstractArgument()
123+
{
124+
$container = new ContainerBuilder();
125+
$container->register(FooWithAbstractArgument::class, FooWithAbstractArgument::class)
126+
->setArgument('$baz', new AbstractArgument(FooWithAbstractArgument::class, '$baz', 'should be defined by Pass'))
127+
->setArgument('$bar', 'test');
128+
129+
$dumper = new YamlDumper($container);
130+
$this->assertStringEqualsFile(self::$fixturesPath.'/yaml/services_with_abstract_argument.yml', $dumper->dump());
131+
}
132+
120133
private function assertEqualYamlStructure(string $expected, string $yaml, string $message = '')
121134
{
122135
$parser = new Parser();
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace Symfony\Component\DependencyInjection\Tests\Fixtures;
4+
5+
class FooWithAbstractArgument
6+
{
7+
/** @var string */
8+
private $baz;
9+
10+
/** @var string */
11+
private $bar;
12+
13+
public function __construct(string $baz, string $bar)
14+
{
15+
$this->baz = $baz;
16+
$this->bar = $bar;
17+
}
18+
}
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<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 https://symfony.com/schema/dic/services/services-1.0.xsd">
3+
<services>
4+
<service id="Symfony\Component\DependencyInjection\Tests\Fixtures\FooWithAbstractArgument">
5+
<argument key="$baz" type="abstract">should be defined by FooCompilerPass</argument>
6+
<argument key="$bar">test</argument>
7+
</service>
8+
</services>
9+
</container>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.