Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d3449e6

Browse files
Merge branch '3.4'
* 3.4: bug #22814 [FrameworkBundle] FC with EventDispatcher 4.0 (xabbuh) [PhpUnitBridge] remove unused use statement do not used deprecated validator test case class do not mock a deprecated interface [DI] Added missing deprecation in changelog [Ldap] add a changelog file [Security][Serializer][DI] Add new arguments typehints in preparation for 4.0 [MonologBridge] Fix the Monlog ServerLogHandler from Hanging on Windows [DependencyInjection] Fix dumping of RewindableGenerator with empty IteratorArgument [DI][Serializer] Fix missing de(normalizer|coder) autoconfig Use 0.0.0.0 as the server log host default.
2 parents 339c653 + b6fced6 commit d3449e6

File tree

31 files changed

+103
-58
lines changed

31 files changed

+103
-58
lines changed

UPGRADE-3.3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Security
303303
* The `RoleInterface` has been deprecated. Extend the `Symfony\Component\Security\Core\Role\Role`
304304
class in your custom role implementations instead.
305305

306-
* The `LogoutUrlGenerator::registerListener()` method will expect a 6th `$context = null` argument in 4.0.
306+
* The `LogoutUrlGenerator::registerListener()` method will expect a 6th `string $context = null` argument in 4.0.
307307
Define the argument when overriding this method.
308308

309309
* The `AccessDecisionManager::setVoters()` method has been deprecated. Pass

UPGRADE-4.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Security
426426
* The `RoleInterface` has been removed. Extend the `Symfony\Component\Security\Core\Role\Role`
427427
class instead.
428428

429-
* The `LogoutUrlGenerator::registerListener()` method expects a 6th `$context = null` argument.
429+
* The `LogoutUrlGenerator::registerListener()` method expects a 6th `string $context = null` argument.
430430

431431
* The `AccessDecisionManager::setVoters()` method has been removed. Pass the
432432
voters to the constructor instead.

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@
3131
use Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapper;
3232
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
3333
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator;
34-
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
34+
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
3535
use Doctrine\ORM\Tools\SchemaTool;
3636

3737
/**
3838
* @author Bernhard Schussek <[email protected]>
39-
*
40-
* @todo use ConstraintValidatorTestCase when symfony/validator ~3.2 is required.
4139
*/
42-
class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
40+
class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
4341
{
4442
const EM_NAME = 'foo';
4543

src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public function handle(array $record)
5454

5555
$recordFormatted = $this->formatRecord($record);
5656

57-
if (!fwrite($this->socket, $recordFormatted)) {
58-
fclose($this->socket);
57+
if (-1 === stream_socket_sendto($this->socket, $recordFormatted)) {
58+
stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);
5959

6060
// Let's retry: the persistent connection might just be stale
6161
if ($this->socket = $this->createSocket()) {
62-
fwrite($this->socket, $recordFormatted);
62+
stream_socket_sendto($this->socket, $recordFormatted);
6363
}
6464
}
6565
} finally {

src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use PHPUnit\Framework\TestCase;
1717
use PHPUnit\Framework\TestSuite;
1818
use PHPUnit\Util\Blacklist;
19-
use PHPUnit\Util\Test;
2019
use Symfony\Bridge\PhpUnit\ClockMock;
2120
use Symfony\Bridge\PhpUnit\DnsMock;
2221

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@
4949
use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
5050
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
5151
use Symfony\Component\Serializer\Encoder\CsvEncoder;
52+
use Symfony\Component\Serializer\Encoder\DecoderInterface;
5253
use Symfony\Component\Serializer\Encoder\EncoderInterface;
5354
use Symfony\Component\Serializer\Encoder\YamlEncoder;
5455
use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory;
5556
use Symfony\Component\Serializer\Normalizer\DataUriNormalizer;
5657
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
58+
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
5759
use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer;
5860
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
5961
use Symfony\Component\Validator\ConstraintValidatorInterface;
@@ -285,8 +287,12 @@ public function load(array $configs, ContainerBuilder $container)
285287
->addTag('property_info.access_extractor');
286288
$container->registerForAutoconfiguration(EncoderInterface::class)
287289
->addTag('serializer.encoder');
290+
$container->registerForAutoconfiguration(DecoderInterface::class)
291+
->addTag('serializer.encoder');
288292
$container->registerForAutoconfiguration(NormalizerInterface::class)
289293
->addTag('serializer.normalizer');
294+
$container->registerForAutoconfiguration(DenormalizerInterface::class)
295+
->addTag('serializer.normalizer');
290296
$container->registerForAutoconfiguration(ConstraintValidatorInterface::class)
291297
->addTag('validator.constraint_validator');
292298
$container->registerForAutoconfiguration(ObjectInitializerInterface::class)

src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function configure()
4747
}
4848

4949
$this
50-
->addOption('host', null, InputOption::VALUE_REQUIRED, 'The server host', '0:9911')
50+
->addOption('host', null, InputOption::VALUE_REQUIRED, 'The server host', '0.0.0.0:9911')
5151
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The line format', ConsoleFormatter::SIMPLE_FORMAT)
5252
->addOption('date-format', null, InputOption::VALUE_REQUIRED, 'The date format', ConsoleFormatter::SIMPLE_DATE)
5353
->addOption('filter', null, InputOption::VALUE_REQUIRED, 'An expression to filter log. Example: "level > 200 or channel in [\'app\', \'doctrine\']"')

src/Symfony/Component/DependencyInjection/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ CHANGELOG
3737
* deprecated the ability to set or unset a private service with the `Container::set()` method
3838
* deprecated the ability to check for the existence of a private service with the `Container::has()` method
3939
* deprecated the ability to request a private service with the `Container::get()` method
40+
* deprecated support for generating a dumped `Container` without populating the method map
4041

4142
3.0.0
4243
-----

src/Symfony/Component/DependencyInjection/Compiler/Compiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ public function getLoggingFormatter()
7777
* @param string $type The type of the pass
7878
* @param int $priority Used to sort the passes
7979
*/
80-
public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, $priority = 0*/)
80+
public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/)
8181
{
8282
if (func_num_args() >= 3) {
8383
$priority = func_get_arg(2);
8484
} else {
8585
if (__CLASS__ !== get_class($this)) {
8686
$r = new \ReflectionMethod($this, __FUNCTION__);
8787
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
88-
@trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED);
88+
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED);
8989
}
9090
}
9191

src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ public function getPasses()
108108
*
109109
* @throws InvalidArgumentException when a pass type doesn't exist
110110
*/
111-
public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION/*, $priority = 0*/)
111+
public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/)
112112
{
113113
if (func_num_args() >= 3) {
114114
$priority = func_get_arg(2);
115115
} else {
116116
if (__CLASS__ !== get_class($this)) {
117117
$r = new \ReflectionMethod($this, __FUNCTION__);
118118
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
119-
@trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED);
119+
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED);
120120
}
121121
}
122122

0 commit comments

Comments
 (0)