diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md index c6fad1eb5bcd5..f87a36fac430b 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG-3.4.md @@ -7,6 +7,27 @@ in 3.4 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.4.0...v3.4.1 +* 3.4.0-BETA3 (2017-11-05) + + * bug #24531 [HttpFoundation] Fix forward-compat of NativeSessionStorage with PHP 7.2 (sroze) + * bug #24828 [DI] Fix the "almost-circular refs" fix (nicolas-grekas) + * bug #24665 Fix dump panel hidden when closing a dump (julienfalque) + * bug #24802 [TwigBridge] [Bootstrap 4] Fix hidden errors (ostrolucky) + * bug #24816 [Serializer] Fix extra attributes when no group specified (ogizanagi) + * bug #24822 [DI] Fix "almost-circular" dependencies handling (nicolas-grekas) + * bug #24821 symfony/form auto-enables symfony/validator, even when not present (weaverryan) + * bug #24824 [FrameworkBundle][Config] fix: do not add resource checkers for no-debug (dmaicher) + * bug #24814 [Intl] Make intl-data tests pass and save language aliases again (jakzal) + * bug #24810 [Serializer] readd default argument value (xabbuh) + * bug #24809 [Config] Fix dump of config references for deprecated nodes (chalasr) + * bug #24796 [PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass (lyrixx) + * bug #24774 [HttpKernel] Let the storage manage the session starts (sroze) + * bug #24735 [VarDumper] fix trailling comma when dumping an exception (Simperfit) + * bug #24770 [Validator] Fix TraceableValidator is reset on data collector instantiation (ogizanagi) + * bug #24764 [HttpFoundation] add Early Hints to Reponse to fix test (Simperfit) + * bug #24759 Removes \n or space when $context/$extra are empty (kirkmadera) + * bug #24758 Throwing exception if redis and predis unavailable (aequasi) + * 3.4.0-BETA2 (2017-10-30) * bug #24728 [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless (arkste) diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php index 2a9da54961d39..f154083b29de6 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php @@ -21,11 +21,11 @@ */ class DoctrineValidationPass implements CompilerPassInterface { - /** - * @var string - */ private $managerType; + /** + * @param string $managerType + */ public function __construct($managerType) { $this->managerType = $managerType; diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php index 045f0edaedcf7..18f700a894193 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php @@ -113,7 +113,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface * present to enable the mapping. Set to false * to not do any check, optional. * @param string $configurationPattern Pattern for the Configuration service name - * @param string $registerAliasMethodName name of Configuration class method to + * @param string $registerAliasMethodName Name of Configuration class method to * register alias * @param string[] $aliasMap Map of alias to namespace */ @@ -178,7 +178,7 @@ protected function getChainDriverServiceName(ContainerBuilder $container) /** * Create the service definition for the metadata driver. * - * @param ContainerBuilder $container passed on in case an extending class + * @param ContainerBuilder $container Passed on in case an extending class * needs access to the container * * @return Definition|Reference the metadata driver to add to all chain drivers diff --git a/src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php b/src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php index e2eb6e664557b..9440147f23937 100644 --- a/src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php +++ b/src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php @@ -24,9 +24,6 @@ */ class DoctrineParserCache implements ParserCacheInterface { - /** - * @var Cache - */ private $cache; public function __construct(Cache $cache) diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php index 1212b1b9c8309..f23d878db2f63 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php @@ -24,24 +24,9 @@ */ class DoctrineChoiceLoader implements ChoiceLoaderInterface { - /** - * @var ObjectManager - */ private $manager; - - /** - * @var string - */ private $class; - - /** - * @var IdReader - */ private $idReader; - - /** - * @var null|EntityLoaderInterface - */ private $objectLoader; /** @@ -57,13 +42,10 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface * mapper implementations. * * @param ObjectManager $manager The object manager - * @param string $class The class name of the - * loaded objects - * @param IdReader $idReader the reader for the object - * IDs + * @param string $class The class name of the loaded objects + * @param IdReader $idReader The reader for the object IDs * @param null|EntityLoaderInterface $objectLoader The objects loader - * @param ChoiceListFactoryInterface $factory The factory for creating - * the loaded choice list + * @param ChoiceListFactoryInterface $factory The factory for creating the loaded choice list */ public function __construct($manager, $class, $idReader = null, $objectLoader = null, $factory = null) { diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php index 793e035f82c28..75798d279919e 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php @@ -24,29 +24,10 @@ */ class IdReader { - /** - * @var ObjectManager - */ private $om; - - /** - * @var ClassMetadata - */ private $classMetadata; - - /** - * @var bool - */ private $singleId; - - /** - * @var bool - */ private $intId; - - /** - * @var string - */ private $idField; /** diff --git a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php index ae7e0da5a0243..079ff8263fe29 100644 --- a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php +++ b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php @@ -27,9 +27,6 @@ */ class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface { - /** - * @var ClassMetadataFactory - */ private $classMetadataFactory; public function __construct(ClassMetadataFactory $classMetadataFactory) diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php index 95e8197c35fac..e03ef3c555b37 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php @@ -26,9 +26,6 @@ */ class UniqueEntityValidator extends ConstraintValidator { - /** - * @var ManagerRegistry - */ private $registry; public function __construct(ManagerRegistry $registry) diff --git a/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php b/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php index ab474c1f58e3b..dbf43d51ff4c3 100644 --- a/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php +++ b/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php @@ -117,12 +117,20 @@ public function format(array $record) $levelColor = self::$levelColorMap[$record['level']]; if ($this->options['multiline']) { - $context = $extra = "\n"; + $separator = "\n"; } else { - $context = $extra = ' '; + $separator = ' '; + } + + $context = $this->dumpData($record['context']); + if ($context) { + $context = $separator.$context; + } + + $extra = $this->dumpData($record['extra']); + if ($extra) { + $extra = $separator.$extra; } - $context .= $this->dumpData($record['context']); - $extra .= $this->dumpData($record['extra']); $formatted = strtr($this->options['format'], array( '%datetime%' => $record['datetime']->format($this->options['date_format']), diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php index 0a1603e646cbf..1c84ff32c0b74 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php @@ -12,6 +12,7 @@ namespace Symfony\Bridge\PhpUnit\Legacy; use PHPUnit\Framework\Test; +use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Warning; /** @@ -36,6 +37,10 @@ public function __construct(callable $sutFqcnResolver = null, $warningOnSutNotFo public function startTest($test) { + if (!$test instanceof TestCase) { + return; + } + $annotations = $test->getAnnotations(); $ignoredAnnotations = array('covers', 'coversDefaultClass', 'coversNothing'); diff --git a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php index e28301e09ae2d..7fb99404a404f 100644 --- a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php +++ b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php @@ -26,19 +26,8 @@ */ class ProxyDumper implements DumperInterface { - /** - * @var string - */ private $salt; - - /** - * @var LazyLoadingValueHolderGenerator - */ private $proxyGenerator; - - /** - * @var BaseGeneratorStrategy - */ private $classGenerator; /** diff --git a/src/Symfony/Bridge/Twig/Extension/StopwatchExtension.php b/src/Symfony/Bridge/Twig/Extension/StopwatchExtension.php index cb91ff428b0a2..48d99b8c7eac3 100644 --- a/src/Symfony/Bridge/Twig/Extension/StopwatchExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/StopwatchExtension.php @@ -23,10 +23,6 @@ class StopwatchExtension extends AbstractExtension { private $stopwatch; - - /** - * @var bool - */ private $enabled; public function __construct(Stopwatch $stopwatch = null, $enabled = true) diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php index c04ce13a1881b..1a60e67a2f945 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php @@ -30,9 +30,6 @@ */ class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor { - /** - * @var Scope - */ private $scope; public function __construct() diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig index 2407b16d9b99a..4997a94cf5dd0 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig @@ -2,6 +2,54 @@ {# Widgets #} +{% block money_widget -%} + {% if not valid %} + {% set group_class = ' form-control is-invalid' %} + {% set valid = true %} + {% endif %} + {{- parent() -}} +{%- endblock money_widget %} + +{% block datetime_widget -%} + {%- if widget != 'single_text' and not valid -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} + {% set valid = true %} + {%- endif -%} + {{- parent() -}} +{%- endblock datetime_widget %} + +{% block date_widget -%} + {%- if widget != 'single_text' and not valid -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} + {% set valid = true %} + {%- endif -%} + {{- parent() -}} +{%- endblock date_widget %} + +{% block time_widget -%} + {%- if widget != 'single_text' and not valid -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} + {% set valid = true %} + {%- endif -%} + {{- parent() -}} +{%- endblock time_widget %} + +{% block dateinterval_widget -%} + {%- if widget != 'single_text' and not valid -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} + {% set valid = true %} + {%- endif -%} + {{- parent() -}} +{%- endblock dateinterval_widget %} + +{% block percent_widget -%} +