8000 Merge branch '4.3' into 4.4 · symfony/symfony@32389f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 32389f8

Browse files
Merge branch '4.3' into 4.4
* 4.3: Disable phpunit typehint patch on 4.3 branch Fix deprecation on 4.3
2 parents 11fab74 + f773217 commit 32389f8

File tree

360 files changed

+773
-672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

360 files changed

+773
-672
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ env:
1919
global:
2020
- MIN_PHP=7.1.3
2121
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/shims/php
22-
- SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
2322
- MESSENGER_AMQP_DSN=amqp://localhost/%2f/messages
2423
- MESSENGER_REDIS_DSN=redis://127.0.0.1:7001/messages
2524

@@ -30,6 +29,9 @@ matrix:
3029
env: deps=high
3130
- php: 7.3
3231
env: deps=low
32+
- php: 7.4snapshot
33+
allow_failures:
34+
- php: 7.4snapshot
3335
fast_finish: true
3436

3537
cache:

src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ContainerAwareEventManagerTest extends TestCase
2020
private $container;
2121
private $evm;
2222

23-
protected function setUp()
23+
protected function setUp(): void
2424
{
2525
$this->container = new Container();
2626
$this->evm = new ContainerAwareEventManager($this->container);

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class DoctrineExtensionTest extends TestCase
2626
*/
2727
private $extension;
2828

29-
protected function setUp()
29+
protected function setUp(): void
3030
{
3131
parent::setUp();
3232

src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class DoctrineChoiceLoaderTest extends TestCase
7373
*/
7474
private $obj3;
7575

76-
protected function setUp()
76+
protected function setUp(): void
7777
{
7878
$this->factory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock();
7979
$this->om = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')->getMock();

src/Symfony/Bridge/Doctrine/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CollectionToArrayTransformerTest extends TestCase
2525
*/
2626
private $transformer;
2727

28-
protected function setUp()
28+
protected function setUp(): void
2929
{
3030
$this->transformer = new CollectionToArrayTransformer();
3131
}

src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MergeDoctrineCollectionListenerTest extends TestCase
2828
private $factory;
2929
private $form;
3030

31-
protected function setUp()
31+
protected function setUp(): void
3232
{
3333
$this->collection = new ArrayCollection(['test']);
3434
$this->dispatcher = new EventDispatcher();
@@ -37,7 +37,7 @@ protected function setUp()
3737
->getForm();
3838
}
3939

40-
protected function tearDown()
40+
protected function tearDown(): void
4141
{
4242
$this->collection = null;
4343
$this->dispatcher = null;

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function getExtensions()
5050
];
5151
}
5252

53-
protected function setUp()
53+
protected function setUp(): void
5454
{
5555
$this->em = DoctrineTestHelper::createTestEntityManager();
5656

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class EntityTypeTest extends BaseTypeTest
6060

6161
protected static $supportedFeatureSetVersion = 304;
6262

63-
protected function setUp()
63+
protected function setUp(): void
6464
{
6565
$this->em = DoctrineTestHelper::createTestEntityManager();
6666
$this->emRegistry = $this->createRegistryMock('default', $this->em);
@@ -90,7 +90,7 @@ protected function setUp()
9090
}
9191
}
9292

93-
protected function tearDown()
93+
protected function tearDown(): void
9494
{
9595
parent::tearDown();
9696

src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class ManagerRegistryTest extends TestCase
1919
{
20-
public static function setUpBeforeClass()
20+
public static function setUpBeforeClass(): void
2121
{
2222
if (!class_exists('PHPUnit_Framework_TestCase')) {
2323
self::markTestSkipped('proxy-manager-bridge is not yet compatible with namespaced phpunit versions.');

src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
5858

5959
protected $repositoryFactory;
6060

61-
protected function setUp()
61+
protected function setUp(): void
6262
{
6363
$this->repositoryFactory = new TestRepositoryFactory();
6464

src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
*/
2222
class ClockMockTest extends TestCase
2323
{
24-
public static function setUpBeforeClass()
24+
public static function setUpBeforeClass(): void
2525
{
2626
ClockMock::register(__CLASS__);
2727
}
2828

29-
protected function setUp()
29+
protected function setUp(): void
3030
{
3131
ClockMock::withClockMock(1234567890.125);
3232
}

src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class DnsMockTest extends TestCase
1818
{
19-
protected function tearDown()
19+
protected function tearDown(): void
2020
{
2121
DnsMock::withMockedHosts(array());
2222
}

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class RuntimeInstantiatorTest extends TestCase
3030
/**
3131
* {@inheritdoc}
3232
*/
33-
protected function setUp()
33+
protected function setUp(): void
3434
{
3535
$this->instantiator = new RuntimeInstantiator();
3636
}

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/Fixtures/proxy-implem.php

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<?php
22

3-
class SunnyInterface_1eff735 implements \ProxyManager\Proxy\VirtualProxyInterface, \Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper\DummyInterface, \Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper\SunnyInterface
3+
class SunnyInterface_%s implements \ProxyManager\Proxy\VirtualProxyInterface, \Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper\DummyInterface, \Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper\SunnyInterface
44
{
55

6-
private $valueHolder1eff735 = null;
6+
private $valueHolder%s = null;
77

8-
private $initializer1eff735 = null;
8+
private $initializer%s = null;
99

10-
private static $publicProperties1eff735 = [
11-
10+
private static $publicProperties%s = [
11+
%S
1212
];
1313

1414
public function dummy()
1515
{
16-
$this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, 'dummy', array(), $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
16+
$this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, 'dummy', array(), $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
1717

18-
if ($this->valueHolder1eff735 === $returnValue = $this->valueHolder1eff735->dummy()) {
18+
if ($this->valueHolder%s === $returnValue = $this->valueHolder%s->dummy()) {
1919
$returnValue = $this;
2020
}
2121

@@ -24,9 +24,9 @@ public function dummy()
2424

2525
public function & dummyRef()
2626
{
27-
$this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, 'dummyRef', array(), $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
27+
$this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, 'dummyRef', array(), $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
2828

29-
if ($this->valueHolder1eff735 === $returnValue = &$this->valueHolder1eff735->dummyRef()) {
29+
if ($this->valueHolder%s === $returnValue = &$this->valueHolder%s->dummyRef()) {
3030
$returnValue = $this;
3131
}
3232

@@ -35,9 +35,9 @@ public function & dummyRef()
3535

3636
public function sunny()
3737
{
38-
$this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, 'sunny', array(), $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
38+
$this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, 'sunny', array(), $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
3939

40-
if ($this->valueHolder1eff735 === $returnValue = $this->valueHolder1eff735->sunny()) {
40+
if ($this->valueHolder%s === $returnValue = $this->valueHolder%s->sunny()) {
4141
$returnValue = $this;
4242
}
4343

@@ -49,9 +49,9 @@ public static function staticProxyConstructor($initializer)
4949
static $reflection;
5050

5151
$reflection = $reflection ?? new \ReflectionClass(__CLASS__);
52-
$instance = $reflection->newInstanceWithoutConstructor();
52+
$instance%w= $reflection->newInstanceWithoutConstructor();
5353

54-
$instance->initializer1eff735 = $initializer;
54+
$instance->initializer%s = $initializer;
5555

5656
return $instance;
5757
}
@@ -60,21 +60,21 @@ public function __construct()
6060
{
6161
static $reflection;
6262

63-
if (! $this->valueHolder1eff735) {
63+
if (! $this->valueHolder%s) {
6464
$reflection = $reflection ?? new \ReflectionClass(__CLASS__);
65-
$this->valueHolder1eff735 = $reflection->newInstanceWithoutConstructor();
65+
$this->valueHolder%s = $reflection->newInstanceWithoutConstructor();
6666
}
6767
}
6868

6969
public function & __get($name)
7070
{
71-
$this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, '__get', ['name' => $name], $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
71+
$this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, '__get', ['name' => $name], $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
7272

73-
if (isset(self::$publicProperties1eff735[$name])) {
74-
return $this->valueHolder1eff735->$name;
73+
if (isset(self::$publicProperties%s[$name])) {
74+
return $this->valueHolder%s->$name;
7575
}
7676

77-
$targetObject = $this->valueHolder1eff735;
77+
$targetObject = $this->valueHolder%s;
7878

7979
$backtrace = debug_backtrace(false);
8080
trigger_error(
@@ -92,73 +92,73 @@ public function & __get($name)
9292

9393
public function __set($name, $value)
9494
{
95-
$this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, '__set', array('name' => $name, 'value' => $value), $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
95+
$this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, '__set', array('name' => $name, 'value' => $value), $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
9696

97-
$targetObject = $this->valueHolder1eff735;
97+
$targetObject = $this->valueHolder%s;
9898

9999
return $targetObject->$name = $value;
100100
}
101101

102102
public function __isset($name)
103103
{
104-
$this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, '__isset', array('name' => $name), $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
104+
$this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, '__isset', array('name' => $name), $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
105105

106-
$targetObject = $this->valueHolder1eff735;
106+
$targetObject = $this->valueHolder%s;
107107

108108
return isset($targetObject->$name);
109109
}
110110

111111
public function __unset($name)
112112
{
113-
$this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, '__unset', array('name' => $name), $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
113+
$this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, '__unset', array('name' => $name), $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
114114

115-
$targetObject = $this->valueHolder1eff735;
115+
$targetObject = $this->valueHolder%s;
116116

117117
unset($targetObject->$name);
118118
return;
119119
}
120120

121121
public function __clone()
122122
{
123-
$this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, '__clone', array(), $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
123+
$this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, '__clone', array(), $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
124124

125-
$this->valueHolder1eff735 = clone $this->valueHolder1eff735;
125+
$this->valueHolder%s = clone $this->valueHolder%s;
126126
}
127127

128128
public function __sleep()
129129
{
130-
$this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, '__sleep', array(), $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
130+
$this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, '__sleep', array(), $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
131131

132-
return array('valueHolder1eff735');
132+
return array('valueHolder%s');
133133
}
134134

135135
public function __wakeup()
136136
{
137137
}
138138

139-
public function setProxyInitializer(\Closure $initializer = null)
139+
public function setProxyInitializer(\Closure $initializer = null)%S
140140
{
141-
$this->initializer1eff735 = $initializer;
141+
$this->initializer%s = $initializer;
142142
}
143143

144-
public function getProxyInitializer()
144+
public function getProxyInitializer()%S
145145
{
146-
return $this->initializer1eff735;
146+
return $this->initializer%s;
147147
}
148148

149149
public function initializeProxy() : bool
150150
{
151-
return $this->initializer1eff735 && ($this->initializer1eff735->__invoke($valueHolder1eff735, $this, 'initializeProxy', array(), $this->initializer1eff735) || 1) && $this->valueHolder1eff735 = $valueHolder1eff735;
151+
return $this->initializer%s && ($this->initializer%s->__invoke($valueHolder%s, $this, 'initializeProxy', array(), $this->initializer%s) || 1) && $this->valueHolder%s = $valueHolder%s;
152152
}
153153

154154
public function isProxyInitialized() : bool
155155
{
156-
return null !== $this->valueHolder1eff735;
156+
return null !== $this->valueHolder%s;
157157
}
158158

159-
public function getWrappedValueHolderValue()
159+
public function getWrappedValueHolderValue()%S
160160
{
161-
return $this->valueHolder1eff735;
161+
return $this->valueHolder%s;
162162
}
163163

164164

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ProxyDumperTest extends TestCase
3232
/**
3333
* {@inheritdoc}
3434
*/
35-
protected function setUp()
35+
protected function setUp(): void
3636
{
3737
$this->dumper = new ProxyDumper();
3838
}
@@ -168,12 +168,12 @@ protected function createProxy(\$class, \Closure \$factory)
168168
EOPHP;
169169

170170
$implem = preg_replace('#\n /\*\*.*?\*/#s', '', $implem);
171-
$implem = str_replace('getWrappedValueHolderValue() : ?object', 'getWrappedValueHolderValue()', $implem);
172171
$implem = str_replace("array(\n \n );", "[\n \n ];", $implem);
173-
$this->assertStringEqualsFile(__DIR__.'/Fixtures/proxy-implem.php', $implem);
172+
173+
$this->assertStringMatchesFormatFile(__DIR__.'/Fixtures/proxy-implem.php', $implem);
174174
$this->assertStringEqualsFile(__DIR__.'/Fixtures/proxy-factory.php', $factory);
175175

176-
require_once __DIR__.'/Fixtures/proxy-implem.php';
176+
eval(preg_replace('/^<\?php/', '', $implem));
177177
$factory = require __DIR__.'/Fixtures/proxy-factory.php';
178178

179179
$foo = $factory->getFooService();

src/Symfony/Bridge/Twig/Tests/AppVariableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AppVariableTest extends TestCase
1515
*/
1616
protected $appVariable;
1717

18-
protected function setUp()
18+
protected function setUp(): void
1919
{
2020
$this->appVariable = new AppVariable();
2121
}

src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ private function createFile($content): string
8787
return $filename;
8888
}
8989

90-
protected function setUp()
90+
protected function setUp(): void
9191
{
9292
$this->files = [];
9393
}
9494

95-
protected function tearDown()
95+
protected function tearDown(): void
9696
{
9797
foreach ($this->files as $file) {
9898
if (file_exists($file)) {

src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3Hori
3333
*/
3434
private $renderer;
3535

36-
protected function setUp()
36+
protected function setUp(): void
3737
{
3838
parent::setUp();
3939

0 commit comments

Comments
 (0)
0