Merge branch '4.2'

* 4.2:
  fix merge
  [FrameworkBundle] fix xsd
  [FrameworkBundle] update xsd to match the 4.2 configuration
  [FrameworkBundle] Update the xsd to match the actual session configuration
  [Form] CsrfValidationListener marks the token as invalid if it is not a string
  [Routing] fix perf issue when dumping large number of routes
  Fix wrong value in file id attribute for Xliff 2.0
  [VarDumper] Fixed phpDoc
  [PhpUnitBridge] fix PHP  5.3 compat
  [Messenger] Fix DataCollector template
  [Filesystem] Fixed some docblocks and typos
  bumped Symfony version to 4.2.4
  updated VERSION for 4.2.3
  updated CHANGELOG for 4.2.3
  bumped Symfony version to 3.4.23
  updated VERSION for 3.4.22
  update CONTRIBUTORS for 3.4.22
  updated CHANGELOG for 3.4.22
  fix some minor typos
  do not overwrite the constraint being evaluated
This commit is contained in:
Nicolas Grekas 2019-02-07 19:43:24 +01:00
commit 7f3f75d85d
16 changed files with 239 additions and 122 deletions

View File

@ -7,6 +7,40 @@ in 4.2 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/v4.2.0...v4.2.1
* 4.2.3 (2019-02-03)
* bug #30050 [Cache] fix pruning pdo cache for vendors that throw on execute (bendavies)
* bug #30046 [DI] Fix dumping Doctrine-like service graphs (nicolas-grekas)
* bug #30028 [Form] fix some docblocks and type checks (xabbuh)
* bug #30037 Disable Twig in the profiler menu when Twig is not used (javiereguiluz)
* bug #30026 [VarDumper] dont implement Serializable in Stub (nicolas-grekas)
* bug #30034 [Config] ensure moving away from Serializable wont break cache:clear (nicolas-grekas)
* bug #29532 [Messenger] fixed RabbitMQ arguments not passed as integer values (thePanz)
* bug #30013 [Routing] dont redirect routes with greedy trailing vars with no explicit slash (nicolas-grekas)
* bug #30006 [Security] don't do nested calls to serialize() (nicolas-grekas, Renan)
* bug #30007 [FrameworkBundle] Support use of hyphen in asset package name (damaya, XuruDragon)
* bug #30004 Fix format strings for deprecation notices (TysonAndre)
* bug #29984 [VarDumper] Fixed search bar (ro0NL)
* bug #29764 [HttpFoundation] Check file exists before unlink (adam-mospan)
* bug #29783 [HttpFoundation] MemcachedSessionHandler::close() must close connection (grachevko)
* bug #29794 Always pass $key to NullAdapter->createCacheItem (TysonAndre)
* bug #29844 [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0' (mrthehud)
* bug #29869 [Debug][ErrorHandler] Preserve our error handler when a logger sets another one (fancyweb)
* bug #29900 [Cache] PDO-based cache pool table autocreation does not work (errogaht)
* bug #29926 [Form] Changed UrlType input type to text when default_protocol is not null (MatTheCat)
* bug #29961 [Translation] Concatenated translation messages (Stadly)
* bug #29847 [Cache] fix used variable name (xabbuh)
* bug #29920 [Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends (fancyweb)
* bug #29922 Avoid dots in generated class names (derrabus)
* bug #29863 [Security] Do not mix password_*() API with libsodium one (chalasr)
* bug #29894 [DependencyInjection] the string "0" is a valid service identifier (xabbuh)
* bug #29885 Update MimeType extensions (fabpot)
* bug #29875 [TwigBridge] fix compatibility with Twig >= 2.6.1 (xabbuh)
* bug #29873 [Debug] remove return type hint for PHP 5 compatibility (xabbuh)
* bug #29837 Fix SwiftMailerHandler to support Monolog's latest reset functionality (Seldaek)
* bug #29853 Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused" (mmarynich)
* bug #29833 [DebugClassLoader] expose proxyfied findFile() method (fancyweb)
* 4.2.2 (2019-01-06)
* bug #29494 [HttpFoundation] Fix request uri when it starts with double slashes (alquerci)

View File

@ -10,15 +10,15 @@ Symfony is the result of the work of many people who made the code better
- Christian Flothmann (xabbuh)
- Tobias Schultze (tobion)
- Christophe Coevoet (stof)
- Robin Chalas (chalas_r)
- Jordi Boggiano (seldaek)
- Victor Berchet (victor)
- Robin Chalas (chalas_r)
- Kévin Dunglas (dunglas)
- Maxime Steinhausser (ogizanagi)
- Jakub Zalas (jakubzalas)
- Johannes S (johannes)
- Kris Wallsmith (kriswallsmith)
- Ryan Weaver (weaverryan)
- Kris Wallsmith (kriswallsmith)
- Javier Eguiluz (javier.eguiluz)
- Roland Franssen (ro0)
- Grégoire Pineau (lyrixx)
@ -61,14 +61,14 @@ Symfony is the result of the work of many people who made the code better
- Kevin Bond (kbond)
- Pierre du Plessis (pierredup)
- Henrik Bjørnskov (henrikbjorn)
- Alexander M. Turek (derrabus)
- Miha Vrhovnik
- Diego Saint Esteben (dii3g0)
- Alexander M. Turek (derrabus)
- Konstantin Kudryashov (everzet)
- Bilal Amarni (bamarni)
- Mathieu Piot (mpiot)
- Florin Patan (florinpatan)
- Gábor Egyed (1ed)
- Mathieu Piot (mpiot)
- Titouan Galopin (tgalopin)
- Vladimir Reznichenko (kalessil)
- Michel Weimerskirch (mweimerskirch)
@ -82,11 +82,11 @@ Symfony is the result of the work of many people who made the code better
- Issei Murasawa (issei_m)
- Arnout Boks (aboks)
- Deni
- Grégoire Paris (greg0ire)
- Henrik Westphal (snc)
- Dariusz Górecki (canni)
- Douglas Greenshields (shieldo)
- Grégoire Paris (greg0ire)
- Valentin Udaltsov (vudaltsov)
- Douglas Greenshields (shieldo)
- Dariusz Ruminski
- Lee McDermott
- Brandon Turner
@ -109,12 +109,13 @@ Symfony is the result of the work of many people who made the code better
- Brice BERNARD (brikou)
- Baptiste Clavié (talus)
- marc.weistroff
- Tomáš Votruba (tomas_votruba)
- David Buchmann (dbu)
- lenar
- Alexander Schwenn (xelaris)
- Włodzimierz Gajda (gajdaw)
- Chris Wilkinson (thewilkybarkid)
- Tomáš Votruba (tomas_votruba)
- Jérôme Vasseur (jvasseur)
- Peter Kokot (maastermedia)
- Jacob Dreesen (jdreesen)
- Florian Voutzinos (florianv)
@ -124,7 +125,6 @@ Symfony is the result of the work of many people who made the code better
- Daniel Wehner (dawehner)
- excelwebzone
- Gordon Franke (gimler)
- Jérôme Vasseur (jvasseur)
- Javier Spagnoletti (phansys)
- Fabien Pennequin (fabienpennequin)
- Eric GELOEN (gelo)
@ -144,6 +144,7 @@ Symfony is the result of the work of many people who made the code better
- Daniel Gomes (danielcsgomes)
- Gabriel Caruso
- Hidenori Goto (hidenorigoto)
- Thomas Calvet (fancyweb)
- Arnaud Kleinpeter (nanocom)
- Jannik Zschiesche (apfelbox)
- Guilherme Blanco (guilhermeblanco)
@ -175,6 +176,7 @@ Symfony is the result of the work of many people who made the code better
- Amal Raghav (kertz)
- Jonathan Ingram (jonathaningram)
- Artur Kotyrba
- Tyson Andre
- GDIBass
- SpacePossum
- jeremyFreeAgent (Jérémy Romey) (jeremyfreeagent)
@ -182,7 +184,6 @@ Symfony is the result of the work of many people who made the code better
- Matthieu Napoli (mnapoli)
- Florent Mata (fmata)
- Warnar Boekkooi (boekkooi)
- Thomas Calvet (fancyweb)
- Dmitrii Chekaliuk (lazyhammer)
- Clément JOBEILI (dator)
- Daniel Espendiller
@ -198,6 +199,7 @@ Symfony is the result of the work of many people who made the code better
- Mathieu Lemoine (lemoinem)
- Christian Schmidt
- Andreas Hucks (meandmymonkey)
- Tom Van Looy (tvlooy)
- Noel Guilbert (noel)
- Yanick Witschi (toflar)
- Marek Štípek (maryo)
@ -205,6 +207,7 @@ Symfony is the result of the work of many people who made the code better
- bronze1man
- sun (sun)
- Larry Garfield (crell)
- George Mponos (gmponos)
- Michaël Perrin (michael.perrin)
- Nikolay Labinskiy (e-moe)
- Martin Schuhfuß (usefulthink)
@ -227,17 +230,16 @@ Symfony is the result of the work of many people who made the code better
- Justin Hileman (bobthecow)
- Blanchon Vincent (blanchonvincent)
- Michele Orselli (orso)
- Tom Van Looy (tvlooy)
- Sven Paulus (subsven)
- Rui Marinho (ruimarinho)
- Eugene Wissner
- Pascal Montoya
- George Mponos (gmponos)
- Julien Brochet (mewt)
- Leo Feyer
- Tristan Darricau (nicofuma)
- Marcel Beerta (mazen)
- Pavel Batanov (scaytrase)
- Samuel NELA (snela)
- Loïc Faugeron
- Hidde Wieringa (hiddewie)
- Marco Pivetta (ocramius)
@ -282,7 +284,6 @@ Symfony is the result of the work of many people who made the code better
- GordonsLondon
- Jan Sorgalla (jsor)
- Ray
- Tyson Andre
- Chekote
- Thomas Adam
- Viktor Bocharskyi (bocharsky_bw)
@ -290,7 +291,6 @@ Symfony is the result of the work of many people who made the code better
- Diego Agulló (aeoris)
- Andreas Schempp (aschempp)
- jdhoek
- Samuel NELA (snela)
- Massimiliano Arione (garak)
- Bob den Otter (bopp)
- Frank de Jonge (frenkynet)
@ -301,6 +301,7 @@ Symfony is the result of the work of many people who made the code better
- Colin O'Dell (colinodell)
- Giorgio Premi
- Jan Schädlich (jschaedl)
- Ben Davies (bendavies)
- Beau Simensen (simensen)
- Michael Hirschler (mvhirsch)
- Robert Kiss (kepten)
@ -313,6 +314,7 @@ Symfony is the result of the work of many people who made the code better
- Peter Kruithof (pkruithof)
- Michael Holm (hollo)
- Remon van de Kamp (rpkamp)
- Mathieu Lechat
- Marc Weistroff (futurecat)
- Christian Schmidt
- MatTheCat
@ -356,7 +358,6 @@ Symfony is the result of the work of many people who made the code better
- Ricard Clau (ricardclau)
- Mark Challoner (markchalloner)
- Gennady Telegin (gtelegin)
- Ben Davies (bendavies)
- Erin Millard
- Artur Melo (restless)
- Matthew Lewinski (lewinski)
@ -379,11 +380,11 @@ Symfony is the result of the work of many people who made the code better
- Felix Labrecque
- Yaroslav Kiliba
- Terje Bråten
- Mathieu Lechat
- Robbert Klarenbeek (robbertkl)
- JhonnyL
- David Badura (davidbadura)
- hossein zolfi (ocean)
- Alexander Schranz (alexander-schranz)
- Clément Gautier (clementgautier)
- Sanpi
- Eduardo Gulias (egulias)
@ -483,7 +484,6 @@ Symfony is the result of the work of many people who made the code better
- Marek Pietrzak
- Luc Vieillescazes (iamluc)
- franek (franek)
- Alexander Schranz (alexander-schranz)
- Christian Wahler
- Gintautas Miselis
- Rob Bast
@ -606,6 +606,7 @@ Symfony is the result of the work of many people who made the code better
- Sebastian Blum
- aubx
- Marvin Butkereit
- Renan
- Ricky Su (ricky)
- Gildas Quéméner (gquemener)
- Charles-Henri Bruyand
@ -675,6 +676,7 @@ Symfony is the result of the work of many people who made the code better
- Michael Devery (mickadoo)
- Antoine Corcy
- Sascha Grossenbacher
- Emanuele Panzeri (thepanz)
- Szijarto Tamas
- Robin Lehrmann (robinlehrmann)
- Catalin Dan
@ -713,6 +715,7 @@ Symfony is the result of the work of many people who made the code better
- Mark Sonnabaum
- Massimiliano Braglia (massimilianobraglia)
- Richard Quadling
- Raphaëll Roussel
- jochenvdv
- Arturas Smorgun (asarturas)
- Alexander Volochnev (exelenz)
@ -731,6 +734,7 @@ Symfony is the result of the work of many people who made the code better
- Pascal Helfenstein
- Anthony GRASSIOT (antograssiot)
- Baldur Rensch (brensch)
- Anthony MARTIN (xurudragon)
- Pierre Rineau
- Vladyslav Petrovych
- Alex Xandra Albert Sim
@ -738,6 +742,7 @@ Symfony is the result of the work of many people who made the code better
- Sergey Yastrebov
- Trent Steel (trsteel88)
- Yuen-Chi Lian
- Tarjei Huse (tarjei)
- Besnik Br
- Jose Gonzalez
- Oleksii Zhurbytskyi
@ -764,6 +769,7 @@ Symfony is the result of the work of many people who made the code better
- John Bohn (jbohn)
- Marc Morera (mmoreram)
- Saif Eddin Gmati (azjezz)
- Stadly
- Andrew Hilobok (hilobok)
- Noah Heck (myesain)
- Christian Soronellas (theunic)
@ -853,6 +859,7 @@ Symfony is the result of the work of many people who made the code better
- Jelle Kapitein
- Benoît Bourgeois
- mantulo
- Stefan Kruppa
- corphi
- grizlik
- Derek ROTH
@ -885,6 +892,7 @@ Symfony is the result of the work of many people who made the code better
- Forfarle (forfarle)
- Harry Walter (haswalt)
- Johnson Page (jwpage)
- Michael Käfer (michael_kaefer)
- Ruben Gonzalez (rubenruateltek)
- Michael Roterman (wtfzdotnet)
- Arno Geurts
@ -950,6 +958,7 @@ Symfony is the result of the work of many people who made the code better
- Franz Wilding (killerpoke)
- ProgMiner
- Oleg Golovakhin (doc_tr)
- Joost van Driel
- Icode4Food (icode4food)
- Radosław Benkel
- kevin.nadin
@ -996,6 +1005,7 @@ Symfony is the result of the work of many people who made the code better
- Wojciech Sznapka
- Gavin Staniforth
- Ariel J. Birnbaum
- Pablo Borowicz
- Mathieu Santostefano
- Arjan Keeman
- Máximo Cuadros (mcuadros)
@ -1031,6 +1041,7 @@ Symfony is the result of the work of many people who made the code better
- Sergey Novikov (s12v)
- Marcos Quesada (marcos_quesada)
- Matthew Vickery (mattvick)
- MARYNICH Mikhail (mmarynich-ext)
- Viktor Novikov (panzer_commander)
- Paul Mitchum (paul-m)
- Angel Koilov (po_taka)
@ -1085,6 +1096,7 @@ Symfony is the result of the work of many people who made the code better
- Andrew Tch
- Alexander Cheprasov
- Rodrigo Díez Villamuera (rodrigodiez)
- James Hudson
- e-ivanov
- Einenlum
- Jochen Bayer (jocl)
@ -1095,6 +1107,7 @@ Symfony is the result of the work of many people who made the code better
- wizhippo
- Mathias STRASSER (roukmoute)
- Thomason, James
- Gordienko Vladislav
- Viacheslav Sychov
- Alexandre Quercia (alquerci)
- Helmut Hummel (helhum)
@ -1157,7 +1170,6 @@ Symfony is the result of the work of many people who made the code better
- Vacheslav Silyutin
- Juan Traverso
- Alain Flaus (halundra)
- Tarjei Huse (tarjei)
- tsufeki
- Philipp Strube
- Clement Herreman (clemherreman)
@ -1240,6 +1252,7 @@ Symfony is the result of the work of many people who made the code better
- Berat Doğan
- Guillaume LECERF
- Juanmi Rodriguez Cerón
- renanbr
- Andy Raines
- Anthony Ferrara
- Geoffrey Pécro (gpekz)
@ -1290,7 +1303,6 @@ Symfony is the result of the work of many people who made the code better
- WedgeSama
- Felds Liscia
- Chihiro Adachi (chihiro-adachi)
- Emanuele Panzeri (thepanz)
- Raphaëll Roussel
- Tadcka
- Beth Binkovitz
@ -1404,6 +1416,7 @@ Symfony is the result of the work of many people who made the code better
- Gavin Staniforth
- Alessandro Tagliapietra (alex88)
- Biji (biji)
- Alex Teterin (errogaht)
- Gunnar Lium (gunnarlium)
- Tiago Garcia (tiagojsag)
- Artiom
@ -1446,6 +1459,7 @@ Symfony is the result of the work of many people who made the code better
- Paul Seiffert (seiffert)
- Vasily Khayrulin (sirian)
- Stefan Koopmanschap (skoop)
- Stas Soroka (stasyan)
- Stefan Hüsges (tronsha)
- Jake Bishop (yakobeyak)
- Dan Blows
@ -1546,6 +1560,7 @@ Symfony is the result of the work of many people who made the code better
- Muhammed Akbulut
- Aaron Somi
- Michał Dąbrowski (defrag)
- Konstantin Grachev (grachevko)
- Simone Fumagalli (hpatoio)
- Brian Graham (incognito)
- Kevin Vergauwen (innocenzo)
@ -1635,6 +1650,7 @@ Symfony is the result of the work of many people who made the code better
- Darryl Hein (xmmedia)
- Sadicov Vladimir (xtech)
- Kevin EMO (zarcox)
- Andrzej
- Alexander Zogheb
- Rémi Blaise
- Nicolas Séverin
@ -1869,6 +1885,7 @@ Symfony is the result of the work of many people who made the code better
- Şəhriyar İmanov
- Alexis BOYER
- Kaipi Yann
- adam-mospan
- Sam Williams
- Guillaume Aveline
- Adrian Philipp
@ -1906,7 +1923,6 @@ Symfony is the result of the work of many people who made the code better
- Shude
- Ondřej Führer
- Sema
- Michael Käfer
- Elan Ruusamäe
- Thorsten Hallwas
- Michael Squires
@ -2074,9 +2090,9 @@ Symfony is the result of the work of many people who made the code better
- drublic
- Andreas Streichardt
- Pascal Hofmann
- Stefan Kruppa
- smokeybear87
- Gustavo Adrian
- damaya
- Kevin Weber
- Ben Scott
- Dionysis Arvanitis

View File

@ -35,7 +35,6 @@
</xsd:choice>
<xsd:attribute name="http-method-override" type="xsd:boolean" />
<xsd:attribute name="trusted-proxies" type="xsd:string" />
<xsd:attribute name="ide" type="xsd:string" />
<xsd:attribute name="secret" type="xsd:string" />
<xsd:attribute name="default-locale" type="xsd:string" />
@ -76,10 +75,6 @@
</xsd:complexType>
<xsd:complexType name="profiler">
<xsd:all>
<xsd:element name="matcher" type="profiler_matcher" minOccurs="0" maxOccurs="1" />
</xsd:all>
<xsd:attribute name="collect" type="xsd:string" />
<xsd:attribute name="only-exceptions" type="xsd:string" />
<xsd:attribute name="only-master-requests" type="xsd:string" />
@ -90,18 +85,13 @@
<xsd:attribute name="lifetime" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="profiler_matcher">
<xsd:attribute name="ip" type="xsd:string" />
<xsd:attribute name="path" type="xsd:string" />
<xsd:attribute name="service" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="router">
<xsd:attribute name="resource" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="http-port" type="xsd:string" />
<xsd:attribute name="https-port" type="xsd:string" />
<xsd:attribute name="strict-requirements" type="xsd:string" />
<xsd:attribute name="utf8" type="xsd:boolean" />
</xsd:complexType>
<xsd:complexType name="session">
@ -114,13 +104,14 @@
<xsd:attribute name="cookie-domain" type="xsd:string" />
<xsd:attribute name="cookie-secure" type="cookie_secure" />
<xsd:attribute name="cookie-httponly" type="xsd:boolean" />
<xsd:attribute name="cookie-samesite" type="cookie_samesite" />
<xsd:attribute name="use-cookies" type="xsd:boolean" />
<xsd:attribute name="cache-limiter" type="xsd:string" />
<xsd:attribute name="gc-maxlifetime" type="xsd:string" />
<xsd:attribute name="gc-divisor" type="xsd:string" />
<xsd:attribute name="gc-probability" type="xsd:string" />
<xsd:attribute name="use-strict-mode" type="xsd:boolean" />
<xsd:attribute name="save-path" type="xsd:string" />
<xsd:attribute name="metadata-update-threshold" type="xsd:nonNegativeInteger" />
</xsd:complexType>
<xsd:complexType name="request">
@ -238,7 +229,6 @@
<xsd:element name="mapping" type="file_mapping" />
</xsd:choice>
<xsd:attribute name="enabled" type="xsd:boolean" />
<xsd:attribute name="cache" type="xsd:string" />
<xsd:attribute name="enable-annotations" type="xsd:boolean" />
<xsd:attribute name="name-converter" type="xsd:string" />
<xsd:attribute name="circular-reference-handler" type="xsd:string" />
@ -258,6 +248,7 @@
<xsd:element name="default-psr6-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="default-redis-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="default-memcached-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="default-pdo-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="pool" type="cache_pool" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
@ -352,6 +343,14 @@
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="cookie_samesite">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="" />
<xsd:enumeration value="lax" />
<xsd:enumeration value="strict" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="workflow_type">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="state_machine" />

View File

@ -30,15 +30,15 @@
{% endblock %}
{% block menu %}
<span class="label{{ collector.exceptionsCount ? ' label-status-error' }}{{ collector.messages is empty ? ' disabled' }}">
<span class="icon">{{ include('@WebProfiler/Icon/messenger.svg') }}</span>
<strong>Messages</strong>
{% if collector.exceptionsCount > 0 %}
<span class="count">
<span>{{ collector.exceptionsCount }}</span>
</span>
{% endif %}
</span>
<span class="label{{ collector.exceptionsCount ? ' label-status-error' }}{{ collector.messages is empty ? ' disabled' }}">
<span class="icon">{{ include('@WebProfiler/Icon/messenger.svg') }}</span>
<strong>Messages</strong>
{% if collector.exceptionsCount > 0 %}
<span class="count">
<span>{{ collector.exceptionsCount }}</span>
</span>
{% endif %}
</span>
{% endblock %}
{% block head %}
@ -71,31 +71,31 @@
<p>No messages have been collected.</p>
</div>
{% else %}
<div class="sf-tabs message-bus">
<div class="tab">
{% set messages = collector.messages %}
{% set exceptionsCount = collector.exceptionsCount %}
<h3 class="tab-title">All<span class="badge {{ exceptionsCount ? exceptionsCount == messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3>
<div class="sf-tabs message-bus">
<div class="tab">
{% set messages = collector.messages %}
{% set exceptionsCount = collector.exceptionsCount %}
<h3 class="tab-title">All<span class="badge {{ exceptionsCount ? exceptionsCount == messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3>
<div class="tab-content">
<p class="text-muted">Ordered list of dispatched messages across all your buses</p>
{{ helper.render_bus_messages(messages, true) }}
<div class="tab-content">
<p class="text-muted">Ordered list of dispatched messages across all your buses</p>
{{ helper.render_bus_messages(messages, true) }}
</div>
</div>
</div>
{% for bus in collector.buses %}
<div class="tab message-bus">
{% set messages = collector.messages(bus) %}
{% set exceptionsCount = collector.exceptionsCount(bus) %}
<h3 class="tab-title">{{ bus }}<span class="badge {{ exceptionsCount ? exceptionsCount == messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3>
{% for bus in collector.buses %}
<div class="tab message-bus">
{% set messages = collector.messages(bus) %}
{% set exceptionsCount = collector.exceptionsCount(bus) %}
<h3 class="tab-title">{{ bus }}<span class="badge {{ exceptionsCount ? exceptionsCount == messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3>
<div class="tab-content">
<p class="text-muted">Ordered list of messages dispatched on the <code>{{ bus }}</code> bus</p>
{{ helper.render_bus_messages(messages) }}
</div>
<div class="tab-content">
<p class="text-muted">Ordered list of messages dispatched on the <code>{{ bus }}</code> bus</p>
{{ helper.render_bus_messages(messages) }}
</div>
</div>
{% endfor %}
</div>
{% endfor %}
{% endif %}
{% endblock %}
@ -105,24 +105,24 @@
{% for dispatchCall in messages %}
<table class="message-item">
<thead>
<tr>
<th colspan="2" class="sf-toggle"
data-toggle-selector="#message-item-{{ discr }}-{{ loop.index0 }}-details"
data-toggle-initial="{{ loop.first ? 'display' }}"
>
<span class="dump-inline">{{ profiler_dump(dispatchCall.message.type) }}</span>
{% if showBus %}
<span class="label">{{ dispatchCall.bus }}</span>
{% endif %}
{% if dispatchCall.exception is defined %}
<span class="label status-error">exception</span>
{% endif %}
<a class="toggle-button">
<span class="icon icon-close">{{ include('@Twig/images/icon-minus-square.svg') }}</span>
<span class="icon icon-open">{{ include('@Twig/images/icon-plus-square.svg') }}</span>
</a>
</th>
</tr>
<tr>
<th colspan="2" class="sf-toggle"
data-toggle-selector="#message-item-{{ discr }}-{{ loop.index0 }}-details"
data-toggle-initial="{{ loop.first ? 'display' }}"
>
<span class="dump-inline">{{ profiler_dump(dispatchCall.message.type) }}</span>
{% if showBus %}
<span class="label">{{ dispatchCall.bus }}</span>
{% endif %}
{% if dispatchCall.exception is defined %}
<span class="label status-error">exception</span>
{% endif %}
<a class="toggle-button">
<span class="icon icon-close">{{ include('@Twig/images/icon-minus-square.svg') }}</span>
<span class="icon icon-open">{{ include('@Twig/images/icon-plus-square.svg') }}</span>
</a>
</th>
</tr>
</thead>
<tbody id="message-item-{{ discr }}-{{ loop.index0 }}-details" class="sf-toggle-content">
<tr>
@ -133,7 +133,7 @@
{% set link = caller.file|file_link(caller.line) %}
{% if link %}
<a href="{{ link }}" title="{{ caller.file }}">{{ caller.name }}</a>
{% else %}
{% else %}
<abbr title="{{ caller.file }}">{{ caller.name }}</abbr>
{% endif %}
{% else %}
@ -150,10 +150,10 @@
</td>
</tr>
{% if showBus %}
<tr>
<td class="text-bold">Bus</td>
<td>{{ dispatchCall.bus }}</td>
</tr>
<tr>
<td class="text-bold">Bus</td>
<td>{{ dispatchCall.bus }}</td>
</tr>
{% endif %}
<tr>
<td class="text-bold">Message</td>
@ -170,12 +170,12 @@
</td>
</tr>
{% if dispatchCall.exception is defined %}
<tr>
<td class="text-bold">Exception</td>
<td>
{{ profiler_dump(dispatchCall.exception.value, maxDepth=1) }}
</td>
</tr>
<tr>
<td class="text-bold">Exception</td>
<td>
{{ profiler_dump(dispatchCall.exception.value, maxDepth=1) }}
</td>
</tr>
{% endif %}
</tbody>
</table>

View File

@ -21,7 +21,7 @@ interface IOExceptionInterface extends ExceptionInterface
/**
* Returns the associated path for the exception.
*
* @return string The path
* @return string|null The path
*/
public function getPath();
}

View File

@ -138,8 +138,8 @@ class Filesystem
* Sets access and modification time of file.
*
* @param string|iterable $files A filename, an array of files, or a \Traversable instance to create
* @param int $time The touch time as a Unix timestamp
* @param int $atime The access time as a Unix timestamp
* @param int|null $time The touch time as a Unix timestamp, if not supplied the current system time is used
* @param int|null $atime The access time as a Unix timestamp, if not supplied the current system time is used
*
* @throws IOException When touch fails
*/
@ -194,7 +194,7 @@ class Filesystem
* @param int $umask The mode mask (octal)
* @param bool $recursive Whether change the mod recursively or not
*
* @throws IOException When the change fail
* @throws IOException When the change fails
*/
public function chmod($files, $mode, $umask = 0000, $recursive = false)
{
@ -215,7 +215,7 @@ class Filesystem
* @param string $user The new owner user name
* @param bool $recursive Whether change the owner recursively or not
*
* @throws IOException When the change fail
* @throws IOException When the change fails
*/
public function chown($files, $user, $recursive = false)
{
@ -242,7 +242,7 @@ class Filesystem
* @param string $group The group name
* @param bool $recursive Whether change the group recursively or not
*
* @throws IOException When the change fail
* @throws IOException When the change fails
*/
public function chgrp($files, $group, $recursive = false)
{
@ -524,14 +524,14 @@ class Filesystem
* - existing files in the target directory will be overwritten, except if they are newer (see the `override` option)
* - files in the target directory that do not exist in the source directory will not be deleted (see the `delete` option)
*
* @param string $originDir The origin directory
* @param string $targetDir The target directory
* @param \Traversable $iterator Iterator that filters which files and directories to copy
* @param array $options An array of boolean options
* Valid options are:
* - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false)
* - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false)
* - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
* @param string $originDir The origin directory
* @param string $targetDir The target directory
* @param \Traversable|null $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created
* @param array $options An array of boolean options
* Valid options are:
* - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false)
* - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false)
* - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
*
* @throws IOException When file type is unknown
*/

View File

@ -66,8 +66,10 @@ class CsrfValidationListener implements EventSubscriberInterface
if ($form->isRoot() && $form->getConfig()->getOption('compound') && !$postRequestSizeExceeded) {
$data = $event->getData();
$csrfToken = new CsrfToken($this->tokenId, $data[$this->fieldName] ?? null);
if (!isset($data[$this->fieldName]) || !$this->tokenManager->isTokenValid($csrfToken)) {
$csrfValue = \is_string($data[$this->fieldName] ?? null) ? $data[$this->fieldName] : null;
$csrfToken = new CsrfToken($this->tokenId, $csrfValue);
if (null === $csrfValue || !$this->tokenManager->isTokenValid($csrfToken)) {
$errorMessage = $this->errorMessage;
if (null !== $this->translator) {

View File

@ -26,10 +26,10 @@ class FormValidator extends ConstraintValidator
/**
* {@inheritdoc}
*/
public function validate($form, Constraint $constraint)
public function validate($form, Constraint $formConstraint)
{
if (!$constraint instanceof Form) {
throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Form');
if (!$formConstraint instanceof Form) {
throw new UnexpectedTypeException($formConstraint, __NAMESPACE__.'\Form');
}
if (!$form instanceof FormInterface) {
@ -62,8 +62,8 @@ class FormValidator extends ConstraintValidator
// Otherwise validate a constraint only once for the first
// matching group
foreach ($groups as $group) {
if (\in_array($group, $constraint->groups)) {
$validator->atPath('data')->validate($form->getData(), $constraint, $group);
if (\in_array($group, $formConstraint->groups)) {
$validator->atPath('data')->validate($form->getData(), $formConstraint, $group);
if (\count($this->context->getViolations()) > 0) {
break;
}
@ -113,7 +113,7 @@ class FormValidator extends ConstraintValidator
? (string) $form->getViewData()
: \gettype($form->getViewData());
$this->context->setConstraint($constraint);
$this->context->setConstraint($formConstraint);
$this->context->buildViolation($config->getOption('invalid_message'))
->setParameters(array_replace(['{{ value }}' => $clientDataAsString], $config->getOption('invalid_message_parameters')))
->setInvalidValue($form->getViewData())
@ -125,7 +125,7 @@ class FormValidator extends ConstraintValidator
// Mark the form with an error if it contains extra fields
if (!$config->getOption('allow_extra_fields') && \count($form->getExtraData()) > 0) {
$this->context->setConstraint($constraint);
$this->context->setConstraint($formConstraint);
$this->context->buildViolation($config->getOption('extra_fields_message'))
->setParameter('{{ extra_fields }}', '"'.implode('", "', array_keys($form->getExtraData())).'"')
->setInvalidValue($form->getExtraData())

View File

@ -64,6 +64,16 @@ class CsrfValidationListenerTest extends TestCase
$this->assertSame($data, $event->getData());
}
public function testArrayCsrfToken()
{
$event = new FormEvent($this->form, ['csrf' => []]);
$validation = new CsrfValidationListener('csrf', $this->tokenManager, 'unknown', 'Invalid.');
$validation->preSubmit($event);
$this->assertNotEmpty($this->form->getErrors());
}
public function testMaxPostSizeExceeded()
{
$serverParams = $this

View File

@ -13,16 +13,20 @@ namespace Symfony\Component\Form\Tests\Extension\Validator\Constraints;
use Symfony\Component\Form\CallbackTransformer;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper;
use Symfony\Component\Form\Extension\Validator\Constraints\Form;
use Symfony\Component\Form\Extension\Validator\Constraints\FormValidator;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\SubmitButtonBuilder;
use Symfony\Component\Translation\IdentityTranslator;
use Symfony\Component\Validator\Constraints\GroupSequence;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Component\Validator\Constraints\Valid;
use Symfony\Component\Validator\Context\ExecutionContext;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
use Symfony\Component\Validator\Validation;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
@ -649,6 +653,27 @@ class FormValidatorTest extends ConstraintValidatorTestCase
return ['group1', 'group2'];
}
public function testCauseForNotAllowedExtraFieldsIsTheFormConstraint()
{
$form = $this
->getBuilder('form', null, ['constraints' => [new NotBlank(['groups' => ['foo']])]])
->setCompound(true)
->setDataMapper(new PropertyPathMapper())
->getForm();
$form->submit([
'extra_data' => 'foo',
]);
$context = new ExecutionContext(Validation::createValidator(), $form, new IdentityTranslator());
$constraint = new Form();
$this->validator->initialize($context);
$this->validator->validate($form, $constraint);
$this->assertCount(1, $context->getViolations());
$this->assertSame($constraint, $context->getViolations()->get(0)->getConstraint());
}
private function getMockExecutionContext()
{
$context = $this->getMockBuilder('Symfony\Component\Validator\Context\ExecutionContextInterface')->getMock();

View File

@ -484,7 +484,7 @@ class NumberFormatter
* @param string $currency Parameter to receive the currency name (reference)
* @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended
*
* @return bool|string The parsed numeric value of false on error
* @return bool|string The parsed numeric value or false on error
*
* @see http://www.php.net/manual/en/numberformatter.parsecurrency.php
*
@ -502,7 +502,7 @@ class NumberFormatter
* @param int $type Type of the formatting, one of the format type constants. NumberFormatter::TYPE_DOUBLE by default.
* @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended
*
* @return int|float|false The parsed value of false on error
* @return int|float|false The parsed value or false on error
*
* @see http://www.php.net/manual/en/numberformatter.parse.php
*/

View File

@ -171,6 +171,7 @@ EOF;
foreach ($collection->all() as $name => $route) {
$compiledRoute = $route->compile();
$staticPrefix = rtrim($compiledRoute->getStaticPrefix(), '/');
$hostRegex = $compiledRoute->getHostRegex();
$regex = $compiledRoute->getRegex();
if ($hasTrailingSlash = '/' !== $route->getPath()) {
@ -185,9 +186,9 @@ EOF;
if ($hasTrailingSlash) {
$url = substr($url, 0, -1);
}
foreach ($dynamicRegex as list($hostRx, $rx)) {
if (preg_match($rx, $url) && (!$host || !$hostRx || preg_match($hostRx, $host))) {
$dynamicRegex[] = [$hostRegex, $regex];
foreach ($dynamicRegex as list($hostRx, $rx, $prefix)) {
if (('' === $prefix || 0 === strpos($url, $prefix)) && preg_match($rx, $url) && (!$host || !$hostRx || preg_match($hostRx, $host))) {
$dynamicRegex[] = [$hostRegex, $regex, $staticPrefix];
$dynamicRoutes->add($name, $route);
continue 2;
}
@ -195,7 +196,7 @@ EOF;
$staticRoutes[$url][$name] = [$route, $hasTrailingSlash];
} else {
$dynamicRegex[] = [$hostRegex, $regex];
$dynamicRegex[] = [$hostRegex, $regex, $staticPrefix];
$dynamicRoutes->add($name, $route);
}
}

View File

@ -141,7 +141,11 @@ class XliffFileDumper extends FileDumper
$xliff->setAttribute('trgLang', str_replace('_', '-', $messages->getLocale()));
$xliffFile = $xliff->appendChild($dom->createElement('file'));
$xliffFile->setAttribute('id', $domain.'.'.$messages->getLocale());
if (MessageCatalogue::INTL_DOMAIN_SUFFIX === substr($domain, -($suffixLength = \strlen(MessageCatalogue::INTL_DOMAIN_SUFFIX)))) {
$xliffFile->setAttribute('id', substr($domain, 0, -$suffixLength).'.'.$messages->getLocale());
} else {
$xliffFile->setAttribute('id', $domain.'.'.$messages->getLocale());
}
foreach ($messages->all($domain) as $source => $target) {
$translation = $dom->createElement('unit');

View File

@ -54,6 +54,21 @@ class XliffFileDumperTest extends TestCase
);
}
public function testFormatIcuCatalogueXliff2()
{
$catalogue = new MessageCatalogue('en_US');
$catalogue->add([
'foo' => 'bar',
], 'messages'.MessageCatalogue::INTL_DOMAIN_SUFFIX);
$dumper = new XliffFileDumper();
$this->assertStringEqualsFile(
__DIR__.'/../fixtures/resources-2.0+intl-icu.xlf',
$dumper->formatCatalogue($catalogue, 'messages'.MessageCatalogue::INTL_DOMAIN_SUFFIX, ['default_locale' => 'fr_FR', 'xliff_version' => '2.0'])
);
}
public function testFormatCatalogueWithCustomToolInfo()
{
$options = [

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="fr-FR" trgLang="en-US">
<file id="messages.en_US">
<unit id="LCa0a2j" name="foo">
<segment>
<source>foo</source>
<target>bar</target>
</segment>
</unit>
</file>
</xliff>

View File

@ -39,7 +39,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
/**
* @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput
* @param string $charset The default character encoding to use for non-UTF8 strings
* @param string|null $charset The default character encoding to use for non-UTF8 strings
* @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation
*/
public function __construct($output = null, string $charset = null, int $flags = 0)