Skip to content

Commit 974580f

Browse files
Merge branch '5.3' into 5.4
* 5.3: Fix Choice constraint with associative choices array [Form] UrlType should not add protocol to emails Silence isatty warnings during tty detection [Serializer] Fix AbstractObjectNormalizer not considering pseudo type false [Notifier] Fix encoding of messages with FreeMobileTransport [Cache] workaround PHP crash [Console] Fix PHP 8.1 deprecation in ChoiceQuestion [Notifier] smsapi-notifier - correct encoding Replaced full CoC text with link to documentation Making the parser stateless [Console] fix restoring stty mode on CTRL+C fix merge (bis) fix merge [Process] Avoid calling fclose on an already closed resource [GHA] test tty group [DI] Fix tests on PHP 7.1
2 parents 86e0776 + b9de28b commit 974580f

File tree

5 files changed

+54
-3
lines changed

5 files changed

+54
-3
lines changed

Tests/Fixtures/config/defaults.expected.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ services:
1515
- t: { a: b }
1616
autowire: true
1717
autoconfigure: true
18-
arguments: ['@bar', !tagged_iterator foo, !service { class: Baz }]
18+
arguments: ['@bar', !tagged_iterator foo]
1919
bar:
2020
class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo
2121
public: true
2222
tags:
2323
- t: { a: b }
2424
autowire: true
25-
arguments: [null, !tagged_iterator foo, !service { class: Baz }]
25+
arguments: [null, !tagged_iterator foo]
2626
calls:
2727
- [setFoo, ['@bar']]
2828

Tests/Fixtures/config/defaults.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
->tag('t', ['a' => 'b'])
1616
->bind(Foo::class, service('bar'))
1717
->bind('iterable $foo', tagged_iterator('foo'))
18-
->bind('object $baz', inline_service('Baz'))
1918
->public();
2019

2120
$s->set(Foo::class)->args([service('bar')])->public();
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
services:
3+
service_container:
4+
class: Symfony\Component\DependencyInjection\ContainerInterface
5+
public: true
6+
synthetic: true
7+
App\BarService:
8+
class: App\BarService
9+
public: true
10+
arguments: [!service { class: FooClass }]
11+
Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo:
12+
class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo
13+
public: true
14+
tags:
15+
- t: { a: b }
16+
autowire: true
17+
autoconfigure: true
18+
arguments: ['@bar', !tagged_iterator foo, !service { class: Baz }]
19+
bar:
20+
class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo
21+
public: true
22+
tags:
23+
- t: { a: b }
24+
autowire: true
25+
arguments: [null, !tagged_iterator foo, !service { class: Baz }]
26+
calls:
27+
- [setFoo, ['@bar']]
28+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
4+
5+
use Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;
6+
7+
return function (ContainerConfigurator $c) {
8+
$c->import('basic.php');
9+
10+
$s = $c->services()->defaults()
11+
->public()
12+
->private()
13+
->autoconfigure()
14+
->autowire()
15+
->tag('t', ['a' => 'b'])
16+
->bind(Foo::class, service('bar'))
17+
->bind('iterable $foo', tagged_iterator('foo'))
18+
->bind('object $baz', inline_service('Baz'))
19+
->public();
20+
21+
$s->set(Foo::class)->args([service('bar')])->public();
22+
$s->set('bar', Foo::class)->call('setFoo')->autoconfigure(false);
23+
};

Tests/Loader/PhpFileLoaderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public function provideConfig()
9797
yield ['php7'];
9898
yield ['anonymous'];
9999
yield ['lazy_fqcn'];
100+
yield ['inline_binding'];
100101
yield ['remove'];
101102
yield ['config_builder'];
102103
}

0 commit comments

Comments
 (0)