Skip to content

Commit 12a269a

Browse files
Merge branch '4.0'
* 4.0: [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 4.0.3 updated VERSION for 4.0.2 updated CHANGELOG for 4.0.2 bumped Symfony version to 3.4.3 updated VERSION for 3.4.2 updated CHANGELOG for 3.4.2
2 parents 5f72ecf + 1a6cdfe commit 12a269a

File tree

30 files changed

+94
-59
lines changed

30 files changed

+94
-59
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(

CHANGELOG-4.0.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,42 @@ in 4.0 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.0.0...v4.0.1
99

10+
* 4.0.2 (2017-12-15)
11+
12+
* bug #25489 [FrameworkBundle] remove esi/ssi renderers if inactive (dmaicher)
13+
* bug #25502 Fixing wrong class_exists on interface (weaverryan)
14+
* bug #25427 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher (mpdude)
15+
* bug #25480 [FrameworkBundle] add missing validation options to XSD file (xabbuh)
16+
* bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)
17+
* bug #25425 When available use AnnotationRegistry::registerUniqueLoader (jrjohnson)
18+
* bug #25474 [DI] Optimize Container::get() for perf (nicolas-grekas)
19+
* bug #24594 [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files (BjornTwachtmann)
20+
* bug #25233 [TwigBridge][Form] Fix hidden currency element with Bootstrap 3 theme (julienfalque)
21+
* bug #25413 [HttpKernel] detect deprecations thrown by container initialization during tests (nicolas-grekas)
22+
* bug #25408 [Debug] Fix catching fatal errors in case of nested error handlers (nicolas-grekas)
23+
* bug #25330 [HttpFoundation] Support 0 bit netmask in IPv6 (`::/0`) (stephank)
24+
* bug #25378 [VarDumper] Fixed file links leave blank pages when ide is configured (antalaron)
25+
* bug #25410 [HttpKernel] Fix logging of post-terminate errors/exceptions (nicolas-grekas)
26+
* bug #25409 [Bridge/Doctrine] Drop "memcache" type (nicolas-grekas)
27+
* bug #25417 [Process] Dont rely on putenv(), it fails on ZTS PHP (nicolas-grekas)
28+
* bug #25333 [DI] Impossible to set an environment variable and then an array as container parameter (Phantas0s)
29+
* bug #25447 [Process] remove false-positive BC breaking exception on Windows (nicolas-grekas)
30+
* bug #25381 [DI] Add context to service-not-found exceptions thrown by service locators (nicolas-grekas)
31+
* bug #25438 [Yaml] empty lines don't count for indent detection (xabbuh)
32+
* bug #25412 Extend Argon2i support check to account for sodium_compat (mbabker)
33+
* bug #25392 [HttpFoundation] Fixed default user-agent (3.X -> 4.X) (lyrixx)
34+
* bug #25389 [Yaml] fix some edge cases with indented blocks (xabbuh)
35+
* bug #25396 [Form] Fix debug:form command definition (yceruto)
36+
* bug #25398 [HttpFoundation] don't prefix cookies with "Set-Cookie:" (pableu)
37+
* bug #25354 [DI] Fix non-string class handling in PhpDumper (nicolas-grekas, sroze)
38+
* bug #25340 [Serializer] Unset attributes when creating child context (dunglas)
39+
* bug #25325 [Yaml] do not evaluate PHP constant names (xabbuh)
40+
* bug #25380 [FrameworkBundle][Cache] register system cache clearer only if it's used (xabbuh)
41+
* bug #25323 [ExpressionLanguage] throw an SyntaxError instead of an undefined index notice (Simperfit)
42+
* bug #25363 [HttpKernel] Disable inlining on PHP 5 (nicolas-grekas)
43+
* bug #25364 [DependencyInjection] Prevent a loop in aliases within the `findDefinition` method (sroze)
44+
* bug #25337 Remove Exclusive Lock That Breaks NFS Caching (brianfreytag)
45+
1046
* 4.0.1 (2017-12-05)
1147

1248
* bug #25304 [Bridge/PhpUnit] Prefer $_SERVER['argv'] over $argv (ricknox)

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');

0 commit comments

Comments
 (0)