Skip to content

Commit

Permalink
Merge branch '5.3' into 5.4
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nicolas-grekas committed Jan 26, 2022
2 parents 86e0776 + b9de28b commit 974580f
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Tests/Fixtures/config/defaults.expected.yml
Expand Up @@ -15,14 +15,14 @@ services:
- t: { a: b }
autowire: true
autoconfigure: true
arguments: ['@bar', !tagged_iterator foo, !service { class: Baz }]
arguments: ['@bar', !tagged_iterator foo]
bar:
class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo
public: true
tags:
- t: { a: b }
autowire: true
arguments: [null, !tagged_iterator foo, !service { class: Baz }]
arguments: [null, !tagged_iterator foo]
calls:
- [setFoo, ['@bar']]

1 change: 0 additions & 1 deletion Tests/Fixtures/config/defaults.php
Expand Up @@ -15,7 +15,6 @@
->tag('t', ['a' => 'b'])
->bind(Foo::class, service('bar'))
->bind('iterable $foo', tagged_iterator('foo'))
->bind('object $baz', inline_service('Baz'))
->public();

$s->set(Foo::class)->args([service('bar')])->public();
Expand Down
28 changes: 28 additions & 0 deletions Tests/Fixtures/config/inline_binding.expected.yml
@@ -0,0 +1,28 @@

services:
service_container:
class: Symfony\Component\DependencyInjection\ContainerInterface
public: true
synthetic: true
App\BarService:
class: App\BarService
public: true
arguments: [!service { class: FooClass }]
Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo:
class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo
public: true
tags:
- t: { a: b }
autowire: true
autoconfigure: true
arguments: ['@bar', !tagged_iterator foo, !service { class: Baz }]
bar:
class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo
public: true
tags:
- t: { a: b }
autowire: true
arguments: [null, !tagged_iterator foo, !service { class: Baz }]
calls:
- [setFoo, ['@bar']]

23 changes: 23 additions & 0 deletions Tests/Fixtures/config/inline_binding.php
@@ -0,0 +1,23 @@
<?php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;

return function (ContainerConfigurator $c) {
$c->import('basic.php');

$s = $c->services()->defaults()
->public()
->private()
->autoconfigure()
->autowire()
->tag('t', ['a' => 'b'])
->bind(Foo::class, service('bar'))
->bind('iterable $foo', tagged_iterator('foo'))
->bind('object $baz', inline_service('Baz'))
->public();

$s->set(Foo::class)->args([service('bar')])->public();
$s->set('bar', Foo::class)->call('setFoo')->autoconfigure(false);
};
1 change: 1 addition & 0 deletions Tests/Loader/PhpFileLoaderTest.php
Expand Up @@ -97,6 +97,7 @@ public function provideConfig()
yield ['php7'];
yield ['anonymous'];
yield ['lazy_fqcn'];
yield ['inline_binding'];
yield ['remove'];
yield ['config_builder'];
}
Expand Down

0 comments on commit 974580f

Please sign in to comment.