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 0541b21

Browse filesBrowse files
committed
[DI] Fix tests on PHP 7.1
1 parent 4ef68e7 commit 0541b21
Copy full SHA for 0541b21

File tree

Expand file treeCollapse file tree

5 files changed

+57
-3
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+57
-3
lines changed

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/defaults.expected.yml

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/defaults.expected.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ services:
1515
- { name: 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
- { name: 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

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/defaults.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/defaults.php
-1Lines 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, ref('bar'))
1717
->bind('iterable $foo', tagged_iterator('foo'))
18-
->bind('object $baz', inline('Baz'))
1918
->public();
2019

2120
$s->set(Foo::class)->args([ref('bar')])->public();
+28Lines 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+
- { name: 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+
- { name: t, a: b }
24+
autowire: true
25+
arguments: [null, !tagged_iterator foo, !service { class: Baz }]
26+
calls:
27+
- [setFoo, ['@bar']]
28+
+23Lines 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, ref('bar'))
17+
->bind('iterable $foo', tagged_iterator('foo'))
18+
->bind('object $baz', inline('Baz'))
19+
->public();
20+
21+
$s->set(Foo::class)->args([ref('bar')])->public();
22+
$s->set('bar', Foo::class)->call('setFoo')->autoconfigure(false);
23+
};

‎src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ public function provideConfig()
7878
yield ['php7'];
7979
yield ['anonymous'];
8080
yield ['lazy_fqcn'];
81+
82+
if (70100 <= \PHP_VERSION_ID) {
83+
yield ['inline_binding'];
84+
}
8185
}
8286

8387
public function testAutoConfigureAndChildDefinitionNotAllowed()

0 commit comments

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