Skip to content

Commit 1a6cdfe

Browse files
Merge branch '3.4' into 4.0
* 3.4: [2.7] Fix issues found by PHPStan [Command] Fix upgrade guide example Add php_unit_dedicate_assert to PHPCS [WebProfilerBundle] Let fetch() cast URL to string improve FormType::getType exception message details [Intl] Update ICU data to 60.2 [Console] fix a bug when you are passing a default value and passing -n would ouput the index [FrameworkBundle] fix merge of 3.3 into 3.4 bumped Symfony version to 3.4.3 updated VERSION for 3.4.2 updated CHANGELOG for 3.4.2
2 parents 1dff784 + a8755cc commit 1a6cdfe

File tree

42 files changed

+75
-74
lines changed

Some content is hidden

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

42 files changed

+75
-74
lines changed

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ return PhpCsFixer\Config::create()
1010
'@Symfony:risky' => true,
1111
'array_syntax' => array('syntax' => 'long'),
1212
'protected_to_private' => false,
13+
'php_unit_dedicate_assert' => array('target' => '3.5'),
1314
))
1415
->setRiskyAllowed(true)
1516
->setFinder(

UPGRADE-4.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ HttpKernel
627627
# ...
628628

629629
# explicit commands registration
630-
AppBundle\Command:
630+
AppBundle\Command\:
631631
resource: '../../src/AppBundle/Command/*'
632632
tags: ['console.command']
633633
```

src/Symfony/Bridge/Doctrine/ManagerRegistry.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bridge\Doctrine;
1313

1414
use ProxyManager\Proxy\LazyLoadingInterface;
15-
use Psr\Container\ContainerInterface;
1615
use Symfony\Component\DependencyInjection\Container;
1716
use Doctrine\Common\Persistence\AbstractManagerRegistry;
1817

@@ -24,7 +23,7 @@
2423
abstract class ManagerRegistry extends AbstractManagerRegistry
2524
{
2625
/**
27-
* @var ContainerInterface
26+
* @var Container
2827
*/
2928
protected $container;
3029

@@ -58,7 +57,7 @@ function (&$wrappedInstance, LazyLoadingInterface $manager) use ($name) {
5857
$name = $this->aliases[$name];
5958
}
6059
if (isset($this->fileMap[$name])) {
61-
$wrappedInstance = $this->load($this->fileMap[$name], false);
60+
$wrappedInstance = $this->load($this->fileMap[$name]);
6261
} else {
6362
$method = $this->methodMap[$name] ?? 'get'.strtr($name, $this->underscoreMap).'Service'; // BC with DI v3.4
6463
$wrappedInstance = $this->{$method}(false);

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterMappingsPassTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ class RegisterMappingsPassTest extends TestCase
1515
*/
1616
public function testNoDriverParmeterException()
1717
{
18-
$container = $this->createBuilder(array(
19-
));
18+
$container = $this->createBuilder();
2019
$this->process($container, array(
2120
'manager.param.one',
2221
'manager.param.two',

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@
1919
use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface;
2020
use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader;
2121
use Symfony\Component\Form\ChoiceList\ArrayChoiceList;
22+
use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
2223

2324
/**
2425
* @author Bernhard Schussek <[email protected]>
2526
*/
2627
class DoctrineChoiceLoaderTest extends TestCase
2728
{
29+
/**
30+
* @var ChoiceListFactoryInterface|\PHPUnit_Framework_MockObject_MockObject
31+
*/
32+
private $factory;
33+
2834
/**
2935
* @var ObjectManager|\PHPUnit_Framework_MockObject_MockObject
3036
*/

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
use Symfony\Component\Form\Forms;
3232
use Symfony\Component\Form\Tests\Extension\Core\Type\BaseTypeTest;
3333
use Symfony\Component\Form\Tests\Extension\Core\Type\FormTypeTest;
34-
use Symfony\Component\PropertyAccess\PropertyAccess;
3534
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleAssociationToIntIdEntity;
3635
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity;
3736

@@ -1120,10 +1119,7 @@ public function testLoaderCaching()
11201119

11211120
$repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS);
11221121

1123-
$entityType = new EntityType(
1124-
$this->emRegistry,
1125-
PropertyAccess::createPropertyAccessor()
1126-
);
1122+
$entityType = new EntityType($this->emRegistry);
11271123

11281124
$entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry);
11291125

@@ -1183,10 +1179,7 @@ public function testLoaderCachingWithParameters()
11831179

11841180
$repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS);
11851181

1186-
$entityType = new EntityType(
1187-
$this->emRegistry,
1188-
PropertyAccess::createPropertyAccessor()
1189-
);
1182+
$entityType = new EntityType($this->emRegistry);
11901183

11911184
$entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry);
11921185

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Bridge\Doctrine\PropertyInfo\Tests;
12+
namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo;
1313

1414
use Doctrine\DBAL\Types\Type as DBALType;
1515
use Doctrine\ORM\EntityManager;

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function fileExcerpt($file, $line)
116116
{
117117
if (is_readable($file)) {
118118
if (extension_loaded('fileinfo')) {
119-
$finfo = new \Finfo();
119+
$finfo = new \finfo();
120120

121121
// Check if the file is an application/octet-stream (eg. Phar file) because highlight_file cannot parse these files
122122
if ('application/octet-stream' === $finfo->file($file, FILEINFO_MIME_TYPE)) {

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,6 @@ public function testEsiDisabled()
141141
$container = $this->createContainerFromFile('esi_disabled');
142142

143143
$this->assertFalse($container->hasDefinition('fragment.renderer.esi'), 'The ESI fragment renderer is not registered');
144-
}
145-
146-
public function testEsiInactive()
147-
{
148-
$container = $this->createContainerFromFile('default_config');
149-
150-
$this->assertFalse($container->hasDefinition('fragment.renderer.esi'));
151144
$this->assertFalse($container->hasDefinition('esi'));
152145
}
153146

@@ -164,6 +157,7 @@ public function testSsiDisabled()
164157
$container = $this->createContainerFromFile('ssi_disabled');
165158

166159
$this->assertFalse($container->hasDefinition('fragment.renderer.ssi'), 'The SSI fragment renderer is not registered');
160+
$this->assertFalse($container->hasDefinition('ssi'));
167161
}
168162

169163
public function testEsiAndSsiWithoutFragments()
@@ -175,14 +169,6 @@ public function testEsiAndSsiWithoutFragments()
175169
$this->assertTrue($container->hasDefinition('fragment.renderer.ssi'), 'The SSI fragment renderer is registered');
176170
}
177171

178-
public function testSsiInactive()
179-
{
180-
$container = $this->createContainerFromFile('default_config');
181-
182-
$this->assertFalse($container->hasDefinition('fragment.renderer.ssi'));
183-
$this->assertFalse($container->hasDefinition('ssi'));
184-
}
185-
186172
public function testEnabledProfiler()
187173
{
188174
$container = $this->createContainerFromFile('profiler');

src/Symfony/Bundle/SecurityBundle/Tests/Debug/TraceableFirewallListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Bundle\SecurityBundle\Tests;
12+
namespace Symfony\Bundle\SecurityBundle\Tests\Debug;
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener;

0 commit comments

Comments
 (0)