Skip to content

Commit d731a27

Browse files
Merge branch '2.8' into 3.3
* 2.8: [2.7] Fix issues found by PHPStan Add php_unit_dedicate_assert to PHPCS 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
2 parents da5326a + 44db4d1 commit d731a27

File tree

35 files changed

+65
-51
lines changed

35 files changed

+65
-51
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(

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/TwigBundle/Tests/Functional/CacheWarmingTest.php

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

12-
namespace Symfony\Bundle\TwigBundle\Tests;
12+
namespace Symfony\Bundle\TwigBundle\Tests\Functional;
1313

1414
use Symfony\Component\HttpKernel\Kernel;
1515
use Symfony\Component\Config\Loader\LoaderInterface;
1616
use Symfony\Component\Filesystem\Filesystem;
1717
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
18+
use Symfony\Bundle\TwigBundle\Tests\TestCase;
1819
use Symfony\Bundle\TwigBundle\TwigBundle;
1920

2021
class CacheWarmingTest extends TestCase

src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php

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

12-
namespace Symfony\Bundle\TwigBundle\Tests;
12+
namespace Symfony\Bundle\TwigBundle\Tests\Functional;
1313

1414
use Symfony\Component\HttpKernel\Kernel;
1515
use Symfony\Component\Config\Loader\LoaderInterface;
1616
use Symfony\Component\Filesystem\Filesystem;
1717
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
18+
use Symfony\Bundle\TwigBundle\Tests\TestCase;
1819
use Symfony\Bundle\TwigBundle\TwigBundle;
1920

2021
class NoTemplatingEntryTest extends TestCase

src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@
1212
namespace Symfony\Component\Config\Tests\Definition\Builder;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder as CustomNodeBuilder;
15+
use Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder as CustomNodeBuilder;
1616
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
1717

18-
require __DIR__.'/../../Fixtures/Builder/NodeBuilder.php';
19-
require __DIR__.'/../../Fixtures/Builder/BarNodeDefinition.php';
20-
require __DIR__.'/../../Fixtures/Builder/VariableNodeDefinition.php';
21-
2218
class TreeBuilderTest extends TestCase
2319
{
2420
public function testUsingACustomNodeBuilder()
@@ -28,11 +24,11 @@ public function testUsingACustomNodeBuilder()
2824

2925
$nodeBuilder = $root->children();
3026

31-
$this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder', $nodeBuilder);
27+
$this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder);
3228

3329
$nodeBuilder = $nodeBuilder->arrayNode('deeper')->children();
3430

35-
$this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder', $nodeBuilder);
31+
$this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder);
3632
}
3733

3834
public function testOverrideABuiltInNodeType()
@@ -42,7 +38,7 @@ public function testOverrideABuiltInNodeType()
4238

4339
$definition = $root->children()->variableNode('variable');
4440

45-
$this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\VariableNodeDefinition', $definition);
41+
$this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\VariableNodeDefinition', $definition);
4642
}
4743

4844
public function testAddANodeType()
@@ -52,7 +48,7 @@ public function testAddANodeType()
5248

5349
$definition = $root->children()->barNode('variable');
5450

55-
$this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\BarNodeDefinition', $definition);
51+
$this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\BarNodeDefinition', $definition);
5652
}
5753

5854
public function testCreateABuiltInNodeTypeWithACustomNodeBuilder()

src/Symfony/Component/Config/Tests/Fixtures/Builder/BarNodeDefinition.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\Component\Config\Tests\Definition\Builder;
12+
namespace Symfony\Component\Config\Tests\Fixtures\Builder;
1313

1414
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
1515
use Symfony\Component\Config\Tests\Fixtures\BarNode;

0 commit comments

Comments
 (0)