Merge branch '3.3' into 3.4

* 3.3:
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  Tweaked some styles in the profiler tables
  Add type string to docblock for Process::setInput()
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  Run simple-phpunit with --no-suggest option
  [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
  bumped Symfony version to 3.3.16
  updated VERSION for 3.3.15
  updated CHANGELOG for 3.3.15
  bumped Symfony version to 2.8.34
  updated VERSION for 2.8.33
  updated CHANGELOG for 2.8.33
  bumped Symfony version to 2.7.41
  updated VERSION for 2.7.40
  update CONTRIBUTORS for 2.7.40
  updated CHANGELOG for 2.7.40
This commit is contained in:
Christian Flothmann 2018-01-10 12:30:01 +01:00
commit 7625c771c6
26 changed files with 219 additions and 68 deletions

View File

@ -7,6 +7,43 @@ in 3.3 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 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.3.0...v3.3.1 To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.3.0...v3.3.1
* 3.3.15 (2018-01-05)
* bug #25532 [HttpKernel] Disable CSP header on exception pages (ostrolucky)
* bug #25491 [Routing] Use the default host even if context is empty (sroze)
* bug #25672 [WebServerBundle] use interface_exists instead of class_exists (kbond)
* bug #25662 Dumper shouldn't use html format for phpdbg / cli-server (jhoff)
* bug #25529 [Validator] Fix access to root object when using composite constraint (ostrolucky)
* bug #25430 Fixes for Oracle in PdoSessionHandler (elislenio)
* bug #25599 Add application/ld+json format associated to json (vincentchalamon)
* bug #25623 [HttpFoundation] Fix false-positive ConflictingHeadersException (nicolas-grekas)
* bug #25624 [WebServerBundle] Fix escaping of php binary with arguments (nicolas-grekas)
* bug #25567 [Process] Fix setting empty env vars (nicolas-grekas)
* bug #25407 [Console] Commands with an alias should not be recognized as ambiguous (Simperfit)
* bug #25523 [WebServerBundle] fix a bug where require would not require the good file because of env (Simperfit)
* bug #25559 [Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions (nicolas-grekas)
* bug #25552 [WebProfilerBundle] Let fetch() cast URL to string (ro0NL)
* bug #25521 [Console] fix a bug when you are passing a default value and passing -n would output the index (Simperfit)
* bug #25489 [FrameworkBundle] remove esi/ssi renderers if inactive (dmaicher)
* bug #25427 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher (mpdude)
* bug #25480 [FrameworkBundle] add missing validation options to XSD file (xabbuh)
* bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)
* bug #25425 When available use AnnotationRegistry::registerUniqueLoader (jrjohnson)
* bug #24594 [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files (BjornTwachtmann)
* bug #25233 [TwigBridge][Form] Fix hidden currency element with Bootstrap 3 theme (julienfalque)
* bug #25413 [HttpKernel] detect deprecations thrown by container initialization during tests (nicolas-grekas)
* bug #25408 [Debug] Fix catching fatal errors in case of nested error handlers (nicolas-grekas)
* bug #25330 [HttpFoundation] Support 0 bit netmask in IPv6 (`::/0`) (stephank)
* bug #25378 [VarDumper] Fixed file links leave blank pages when ide is configured (antalaron)
* bug #25410 [HttpKernel] Fix logging of post-terminate errors/exceptions (nicolas-grekas)
* bug #25417 [Process] Dont rely on putenv(), it fails on ZTS PHP (nicolas-grekas)
* bug #25333 [DI] Impossible to set an environment variable and then an array as container parameter (Phantas0s)
* bug #25438 [Yaml] empty lines don't count for indent detection (xabbuh)
* bug #25389 [Yaml] fix some edge cases with indented blocks (xabbuh)
* bug #25340 [Serializer] Unset attributes when creating child context (dunglas)
* bug #25323 [ExpressionLanguage] throw an SyntaxError instead of an undefined index notice (Simperfit)
* bug #25364 [DependencyInjection] Prevent a loop in aliases within the `findDefinition` method (sroze)
* 3.3.14 (2017-12-04) * 3.3.14 (2017-12-04)
* bug #25304 [Bridge/PhpUnit] Prefer $_SERVER['argv'] over $argv (ricknox) * bug #25304 [Bridge/PhpUnit] Prefer $_SERVER['argv'] over $argv (ricknox)

View File

@ -13,13 +13,13 @@ Symfony is the result of the work of many people who made the code better
- Jordi Boggiano (seldaek) - Jordi Boggiano (seldaek)
- Victor Berchet (victor) - Victor Berchet (victor)
- Johannes S (johannes) - Johannes S (johannes)
- Jakub Zalas (jakubzalas)
- Kévin Dunglas (dunglas) - Kévin Dunglas (dunglas)
- Jakub Zalas (jakubzalas)
- Kris Wallsmith (kriswallsmith) - Kris Wallsmith (kriswallsmith)
- Ryan Weaver (weaverryan) - Ryan Weaver (weaverryan)
- Robin Chalas (chalas_r)
- Javier Eguiluz (javier.eguiluz) - Javier Eguiluz (javier.eguiluz)
- Maxime Steinhausser (ogizanagi) - Maxime Steinhausser (ogizanagi)
- Robin Chalas (chalas_r)
- Hugo Hamon (hhamon) - Hugo Hamon (hhamon)
- Abdellatif Ait boudad (aitboudad) - Abdellatif Ait boudad (aitboudad)
- Grégoire Pineau (lyrixx) - Grégoire Pineau (lyrixx)
@ -48,21 +48,22 @@ Symfony is the result of the work of many people who made the code better
- stealth35 (stealth35) - stealth35 (stealth35)
- Alexander Mols (asm89) - Alexander Mols (asm89)
- Iltar van der Berg (kjarli) - Iltar van der Berg (kjarli)
- Yonel Ceruto (yonelceruto)
- Bulat Shakirzyanov (avalanche123) - Bulat Shakirzyanov (avalanche123)
- Peter Rehm (rpet) - Peter Rehm (rpet)
- Saša Stamenković (umpirsky) - Saša Stamenković (umpirsky)
- Henrik Bjørnskov (henrikbjorn) - Henrik Bjørnskov (henrikbjorn)
- Yonel Ceruto (yonelceruto)
- Miha Vrhovnik - Miha Vrhovnik
- Matthias Pigulla (mpdude) - Matthias Pigulla (mpdude)
- Diego Saint Esteben (dii3g0) - Diego Saint Esteben (dii3g0)
- Konstantin Kudryashov (everzet)
- Bilal Amarni (bamarni)
- Kevin Bond (kbond)
- Dany Maillard (maidmaid) - Dany Maillard (maidmaid)
- Konstantin Kudryashov (everzet)
- Kevin Bond (kbond)
- Bilal Amarni (bamarni)
- Pierre du Plessis (pierredup) - Pierre du Plessis (pierredup)
- Florin Patan (florinpatan) - Florin Patan (florinpatan)
- Jérémy DERUSSÉ (jderusse) - Jérémy DERUSSÉ (jderusse)
- Amrouche Hamza (simperfit)
- Gábor Egyed (1ed) - Gábor Egyed (1ed)
- Michel Weimerskirch (mweimerskirch) - Michel Weimerskirch (mweimerskirch)
- Andrej Hudec (pulzarraider) - Andrej Hudec (pulzarraider)
@ -70,16 +71,17 @@ Symfony is the result of the work of many people who made the code better
- Eric Clemmons (ericclemmons) - Eric Clemmons (ericclemmons)
- Jáchym Toušek (enumag) - Jáchym Toušek (enumag)
- Charles Sarrazin (csarrazi) - Charles Sarrazin (csarrazi)
- Titouan Galopin (tgalopin)
- Samuel ROZE (sroze)
- Konstantin Myakshin (koc) - Konstantin Myakshin (koc)
- Christian Raue - Christian Raue
- Arnout Boks (aboks) - Arnout Boks (aboks)
- Deni - Deni
- Henrik Westphal (snc) - Henrik Westphal (snc)
- Dariusz Górecki (canni) - Dariusz Górecki (canni)
- Titouan Galopin (tgalopin) - Issei Murasawa (issei_m)
- Douglas Greenshields (shieldo) - Douglas Greenshields (shieldo)
- Tobias Nyholm (tobias) - Tobias Nyholm (tobias)
- Issei Murasawa (issei_m)
- Lee McDermott - Lee McDermott
- Brandon Turner - Brandon Turner
- Luis Cordova (cordoval) - Luis Cordova (cordoval)
@ -97,12 +99,11 @@ Symfony is the result of the work of many people who made the code better
- Arnaud Le Blanc (arnaud-lb) - Arnaud Le Blanc (arnaud-lb)
- Maxime STEINHAUSSER - Maxime STEINHAUSSER
- Michal Piotrowski (eventhorizon) - Michal Piotrowski (eventhorizon)
- Samuel ROZE (sroze)
- Tim Nagel (merk) - Tim Nagel (merk)
- Amrouche Hamza (simperfit)
- Brice BERNARD (brikou)
- Baptiste Clavié (talus)
- Vladimir Reznichenko (kalessil) - Vladimir Reznichenko (kalessil)
- Brice BERNARD (brikou)
- David Maicher (dmaicher)
- Baptiste Clavié (talus)
- marc.weistroff - marc.weistroff
- lenar - lenar
- Alexander Schwenn (xelaris) - Alexander Schwenn (xelaris)
@ -118,17 +119,16 @@ Symfony is the result of the work of many people who made the code better
- Tomáš Votruba (tomas_votruba) - Tomáš Votruba (tomas_votruba)
- Fabien Pennequin (fabienpennequin) - Fabien Pennequin (fabienpennequin)
- Gordon Franke (gimler) - Gordon Franke (gimler)
- David Maicher (dmaicher)
- Eric GELOEN (gelo) - Eric GELOEN (gelo)
- Daniel Wehner (dawehner) - Daniel Wehner (dawehner)
- Tugdual Saunier (tucksaun) - Tugdual Saunier (tucksaun)
- Grégoire Paris (greg0ire)
- Théo FIDRY (theofidry) - Théo FIDRY (theofidry)
- Robert Schönthal (digitalkaoz) - Robert Schönthal (digitalkaoz)
- Florian Lonqueu-Brochard (florianlb) - Florian Lonqueu-Brochard (florianlb)
- Sebastiaan Stok (sstok) - Sebastiaan Stok (sstok)
- Stefano Sala (stefano.sala) - Stefano Sala (stefano.sala)
- Evgeniy (ewgraf) - Evgeniy (ewgraf)
- Grégoire Paris (greg0ire)
- Vincent AUBERT (vincent) - Vincent AUBERT (vincent)
- Juti Noppornpitak (shiroyuki) - Juti Noppornpitak (shiroyuki)
- Tigran Azatyan (tigranazatyan) - Tigran Azatyan (tigranazatyan)
@ -139,6 +139,8 @@ Symfony is the result of the work of many people who made the code better
- Pablo Godel (pgodel) - Pablo Godel (pgodel)
- Jérémie Augustin (jaugustin) - Jérémie Augustin (jaugustin)
- Andréia Bohner (andreia) - Andréia Bohner (andreia)
- Alex Pott
- Julien Falque (julienfalque)
- Rafael Dohms (rdohms) - Rafael Dohms (rdohms)
- Arnaud Kleinpeter (nanocom) - Arnaud Kleinpeter (nanocom)
- jwdeitch - jwdeitch
@ -147,11 +149,9 @@ Symfony is the result of the work of many people who made the code better
- Jérôme Vasseur (jvasseur) - Jérôme Vasseur (jvasseur)
- Oleg Voronkovich - Oleg Voronkovich
- Philipp Wahala (hifi) - Philipp Wahala (hifi)
- Alex Pott
- Vyacheslav Pavlov - Vyacheslav Pavlov
- Richard van Laak (rvanlaak) - Richard van Laak (rvanlaak)
- Javier Spagnoletti (phansys) - Javier Spagnoletti (phansys)
- Julien Falque (julienfalque)
- Richard Shank (iampersistent) - Richard Shank (iampersistent)
- Thomas Rabaix (rande) - Thomas Rabaix (rande)
- Rouven Weßling (realityking) - Rouven Weßling (realityking)
@ -174,6 +174,7 @@ Symfony is the result of the work of many people who made the code better
- Dmitrii Chekaliuk (lazyhammer) - Dmitrii Chekaliuk (lazyhammer)
- Clément JOBEILI (dator) - Clément JOBEILI (dator)
- Daniel Espendiller - Daniel Espendiller
- Valentin Udaltsov (vudaltsov)
- Possum - Possum
- Dorian Villet (gnutix) - Dorian Villet (gnutix)
- Sergey Linnik (linniksa) - Sergey Linnik (linniksa)
@ -190,7 +191,6 @@ Symfony is the result of the work of many people who made the code better
- Stepan Anchugov (kix) - Stepan Anchugov (kix)
- bronze1man - bronze1man
- sun (sun) - sun (sun)
- Valentin Udaltsov (vudaltsov)
- Larry Garfield (crell) - Larry Garfield (crell)
- Martin Schuhfuß (usefulthink) - Martin Schuhfuß (usefulthink)
- apetitpa - apetitpa
@ -247,11 +247,13 @@ Symfony is the result of the work of many people who made the code better
- Alessandro Chitolina - Alessandro Chitolina
- Kristen Gilden (kgilden) - Kristen Gilden (kgilden)
- Pierre-Yves LEBECQ (pylebecq) - Pierre-Yves LEBECQ (pylebecq)
- Niels Keurentjes (curry684)
- Jordan Samouh (jordansamouh) - Jordan Samouh (jordansamouh)
- Jakub Kucharovic (jkucharovic) - Jakub Kucharovic (jkucharovic)
- Uwe Jäger (uwej711) - Uwe Jäger (uwej711)
- Eugene Leonovich (rybakit) - Eugene Leonovich (rybakit)
- Filippo Tessarotto - Filippo Tessarotto
- Gabriel Ostrolucký
- Joseph Rouff (rouffj) - Joseph Rouff (rouffj)
- Félix Labrecque (woodspire) - Félix Labrecque (woodspire)
- GordonsLondon - GordonsLondon
@ -270,9 +272,11 @@ Symfony is the result of the work of many people who made the code better
- DQNEO - DQNEO
- jdhoek - jdhoek
- Pavel Batanov (scaytrase) - Pavel Batanov (scaytrase)
- Bob den Otter (bopp)
- Nikita Konstantinov - Nikita Konstantinov
- Wodor Wodorski - Wodor Wodorski
- Oskar Stark (oskarstark) - Oskar Stark (oskarstark)
- Dariusz
- Thomas Lallement (raziel057) - Thomas Lallement (raziel057)
- Giorgio Premi - Giorgio Premi
- Matthieu Napoli (mnapoli) - Matthieu Napoli (mnapoli)
@ -284,6 +288,7 @@ Symfony is the result of the work of many people who made the code better
- Kim Hemsø Rasmussen (kimhemsoe) - Kim Hemsø Rasmussen (kimhemsoe)
- Wouter Van Hecke - Wouter Van Hecke
- Jérôme Parmentier (lctrs) - Jérôme Parmentier (lctrs)
- Michael Babker (mbabker)
- Peter Kruithof (pkruithof) - Peter Kruithof (pkruithof)
- Michael Holm (hollo) - Michael Holm (hollo)
- Marc Weistroff (futurecat) - Marc Weistroff (futurecat)
@ -301,6 +306,7 @@ Symfony is the result of the work of many people who made the code better
- Andrey Esaulov (andremaha) - Andrey Esaulov (andremaha)
- Grégoire Passault (gregwar) - Grégoire Passault (gregwar)
- Jerzy Zawadzki (jzawadzki) - Jerzy Zawadzki (jzawadzki)
- Wouter J
- Ismael Ambrosi (iambrosi) - Ismael Ambrosi (iambrosi)
- Baptiste Lafontaine - Baptiste Lafontaine
- Aurelijus Valeiša (aurelijus) - Aurelijus Valeiša (aurelijus)
@ -311,7 +317,6 @@ Symfony is the result of the work of many people who made the code better
- Tiago Ribeiro (fixe) - Tiago Ribeiro (fixe)
- Hidde Boomsma (hboomsma) - Hidde Boomsma (hboomsma)
- John Bafford (jbafford) - John Bafford (jbafford)
- Bob den Otter (bopp)
- Adrian Rudnik (kreischweide) - Adrian Rudnik (kreischweide)
- Francesc Rosàs (frosas) - Francesc Rosàs (frosas)
- Massimiliano Arione (garak) - Massimiliano Arione (garak)
@ -324,7 +329,6 @@ Symfony is the result of the work of many people who made the code better
- Thierry Thuon (lepiaf) - Thierry Thuon (lepiaf)
- Ricard Clau (ricardclau) - Ricard Clau (ricardclau)
- Mark Challoner (markchalloner) - Mark Challoner (markchalloner)
- Dariusz
- Gennady Telegin (gtelegin) - Gennady Telegin (gtelegin)
- Ben Davies (bendavies) - Ben Davies (bendavies)
- Erin Millard - Erin Millard
@ -339,16 +343,15 @@ Symfony is the result of the work of many people who made the code better
- Inal DJAFAR (inalgnu) - Inal DJAFAR (inalgnu)
- Christian Gärtner (dagardner) - Christian Gärtner (dagardner)
- Tomasz Kowalczyk (thunderer) - Tomasz Kowalczyk (thunderer)
- Michael Babker (mbabker)
- François-Xavier de Guillebon (de-gui_f) - François-Xavier de Guillebon (de-gui_f)
- Damien Alexandre (damienalexandre) - Damien Alexandre (damienalexandre)
- Felix Labrecque - Felix Labrecque
- Yaroslav Kiliba - Yaroslav Kiliba
- Terje Bråten - Terje Bråten
- Yanick Witschi (toflar)
- Robbert Klarenbeek (robbertkl) - Robbert Klarenbeek (robbertkl)
- Edi Modrić (emodric) - Edi Modrić (emodric)
- Thomas Calvet (fancyweb) - Thomas Calvet (fancyweb)
- Niels Keurentjes (curry684)
- JhonnyL - JhonnyL
- David Badura (davidbadura) - David Badura (davidbadura)
- hossein zolfi (ocean) - hossein zolfi (ocean)
@ -414,6 +417,7 @@ Symfony is the result of the work of many people who made the code better
- Jan Schumann - Jan Schumann
- Niklas Fiekas - Niklas Fiekas
- Markus Bachmann (baachi) - Markus Bachmann (baachi)
- Gabriel Caruso
- lancergr - lancergr
- Mihai Stancu - Mihai Stancu
- Olivier Dolbeau (odolbeau) - Olivier Dolbeau (odolbeau)
@ -450,7 +454,6 @@ Symfony is the result of the work of many people who made the code better
- Anton Bakai - Anton Bakai
- Maxime Veber (nek-) - Maxime Veber (nek-)
- Alex Bakhturin - Alex Bakhturin
- Yanick Witschi (toflar)
- Alexander Obuhovich (aik099) - Alexander Obuhovich (aik099)
- boombatower - boombatower
- Fabrice Bernhard (fabriceb) - Fabrice Bernhard (fabriceb)
@ -478,7 +481,6 @@ Symfony is the result of the work of many people who made the code better
- Roy Van Ginneken (rvanginneken) - Roy Van Ginneken (rvanginneken)
- ondrowan - ondrowan
- Barry vd. Heuvel (barryvdh) - Barry vd. Heuvel (barryvdh)
- Wouter J
- Florent Mata - Florent Mata
- Evan S Kaufman (evanskaufman) - Evan S Kaufman (evanskaufman)
- mcben - mcben
@ -562,6 +564,7 @@ Symfony is the result of the work of many people who made the code better
- Max Rath (drak3) - Max Rath (drak3)
- Stéphane Escandell (sescandell) - Stéphane Escandell (sescandell)
- Konstantin S. M. Möllers (ksmmoellers) - Konstantin S. M. Möllers (ksmmoellers)
- Alessandro Lai (jean85)
- James Johnston - James Johnston
- Sinan Eldem - Sinan Eldem
- Alexandre Dupuy (satchette) - Alexandre Dupuy (satchette)
@ -617,6 +620,7 @@ Symfony is the result of the work of many people who made the code better
- Antoine Corcy - Antoine Corcy
- Sascha Grossenbacher - Sascha Grossenbacher
- Szijarto Tamas - Szijarto Tamas
- Robin Lehrmann (robinlehrmann)
- Catalin Dan - Catalin Dan
- Stephan Vock - Stephan Vock
- Benjamin Zikarsky (bzikarsky) - Benjamin Zikarsky (bzikarsky)
@ -692,6 +696,7 @@ Symfony is the result of the work of many people who made the code better
- Andrew Hilobok (hilobok) - Andrew Hilobok (hilobok)
- Noah Heck (myesain) - Noah Heck (myesain)
- Christian Soronellas (theunic) - Christian Soronellas (theunic)
- Johann Pardanaud
- Adam Szaraniec (mimol) - Adam Szaraniec (mimol)
- Yosmany Garcia (yosmanyga) - Yosmany Garcia (yosmanyga)
- Wouter de Wild - Wouter de Wild
@ -811,6 +816,7 @@ Symfony is the result of the work of many people who made the code better
- Gábor Tóth - Gábor Tóth
- Daniel Cestari - Daniel Cestari
- David Lima - David Lima
- Brian Freytag (brianfreytag)
- Brunet Laurent (lbrunet) - Brunet Laurent (lbrunet)
- Mikhail Yurasov (mym) - Mikhail Yurasov (mym)
- LOUARDI Abdeltif (ouardisoft) - LOUARDI Abdeltif (ouardisoft)
@ -843,9 +849,9 @@ Symfony is the result of the work of many people who made the code better
- Colin O'Dell (colinodell) - Colin O'Dell (colinodell)
- xaav - xaav
- Mahmoud Mostafa (mahmoud) - Mahmoud Mostafa (mahmoud)
- Alessandro Lai
- Pieter - Pieter
- Michael Tibben - Michael Tibben
- Billie Thompson
- Sander Marechal - Sander Marechal
- Radosław Benkel - Radosław Benkel
- jean pasqualini (darkilliant) - jean pasqualini (darkilliant)
@ -898,10 +904,10 @@ Symfony is the result of the work of many people who made the code better
- Goran Juric - Goran Juric
- Laurent Ghirardotti (laurentg) - Laurent Ghirardotti (laurentg)
- Nicolas Macherey - Nicolas Macherey
- Guido Donnari
- AKeeman (akeeman) - AKeeman (akeeman)
- Lin Clark - Lin Clark
- Jeremy David (jeremy.david) - Jeremy David (jeremy.david)
- Robin Lehrmann (robinlehrmann)
- Troy McCabe - Troy McCabe
- Ville Mattila - Ville Mattila
- ilyes kooli - ilyes kooli
@ -952,6 +958,7 @@ Symfony is the result of the work of many people who made the code better
- DerManoMann - DerManoMann
- Olaf Klischat - Olaf Klischat
- orlovv - orlovv
- Haralan Dobrev (hkdobrev)
- Jhonny Lidfors (jhonny) - Jhonny Lidfors (jhonny)
- Julien Bianchi (jubianchi) - Julien Bianchi (jubianchi)
- Robert Meijers - Robert Meijers
@ -967,7 +974,6 @@ Symfony is the result of the work of many people who made the code better
- Alex Bowers - Alex Bowers
- Jeremy Bush - Jeremy Bush
- wizhippo - wizhippo
- Gabriel Ostrolucký
- Viacheslav Sychov - Viacheslav Sychov
- Carlos Ortega Huetos - Carlos Ortega Huetos
- rpg600 - rpg600
@ -1033,6 +1039,7 @@ Symfony is the result of the work of many people who made the code better
- Marco - Marco
- Marc Torres - Marc Torres
- Alberto Aldegheri - Alberto Aldegheri
- Dalibor Karlović
- heccjj - heccjj
- Alexandre Melard - Alexandre Melard
- Jay Klehr - Jay Klehr
@ -1042,6 +1049,7 @@ Symfony is the result of the work of many people who made the code better
- Jakub Kulhan - Jakub Kulhan
- Ilia (aliance) - Ilia (aliance)
- Mo Di (modi) - Mo Di (modi)
- Pablo Schläpfer
- Jelte Steijaert (jelte) - Jelte Steijaert (jelte)
- Quique Porta (quiqueporta) - Quique Porta (quiqueporta)
- stoccc - stoccc
@ -1084,6 +1092,7 @@ Symfony is the result of the work of many people who made the code better
- Grzegorz Zdanowski (kiler129) - Grzegorz Zdanowski (kiler129)
- sl_toto (sl_toto) - sl_toto (sl_toto)
- Walter Dal Mut (wdalmut) - Walter Dal Mut (wdalmut)
- Matthieu
- Albin Kerouaton - Albin Kerouaton
- Sébastien HOUZÉ - Sébastien HOUZÉ
- Jingyu Wang - Jingyu Wang
@ -1103,6 +1112,7 @@ Symfony is the result of the work of many people who made the code better
- Jules Lamur - Jules Lamur
- Renato Mendes Figueiredo - Renato Mendes Figueiredo
- ShiraNai7 - ShiraNai7
- Antal Áron (antalaron)
- Markus Fasselt (digilist) - Markus Fasselt (digilist)
- Vašek Purchart (vasek-purchart) - Vašek Purchart (vasek-purchart)
- Janusz Jabłoński (yanoosh) - Janusz Jabłoński (yanoosh)
@ -1144,6 +1154,7 @@ Symfony is the result of the work of many people who made the code better
- Tomaz Ahlin - Tomaz Ahlin
- Marcus Stöhr (dafish) - Marcus Stöhr (dafish)
- Emmanuel Vella (emmanuel.vella) - Emmanuel Vella (emmanuel.vella)
- Jonathan Johnson (jrjohnson)
- Carsten Nielsen (phreaknerd) - Carsten Nielsen (phreaknerd)
- Mathieu Rochette - Mathieu Rochette
- Jay Severson - Jay Severson
@ -1218,6 +1229,7 @@ Symfony is the result of the work of many people who made the code better
- Antoine Bellion (abellion) - Antoine Bellion (abellion)
- Ramon Kleiss (akathos) - Ramon Kleiss (akathos)
- César Suárez (csuarez) - César Suárez (csuarez)
- Bjorn Twachtmann (dotbjorn)
- Nicolas Badey (nico-b) - Nicolas Badey (nico-b)
- Shane Preece (shane) - Shane Preece (shane)
- Johannes Goslar - Johannes Goslar
@ -1266,6 +1278,7 @@ Symfony is the result of the work of many people who made the code better
- Stefan Hüsges (tronsha) - Stefan Hüsges (tronsha)
- Dan Blows - Dan Blows
- Matt Wells - Matt Wells
- Nicolas Appriou
- stloyd - stloyd
- Chris Tickner - Chris Tickner
- Andrew Coulton - Andrew Coulton
@ -1281,7 +1294,9 @@ Symfony is the result of the work of many people who made the code better
- Matthew Donadio - Matthew Donadio
- Andreas - Andreas
- Thomas Chmielowiec - Thomas Chmielowiec
- shdev
- Andrey Ryaguzov - Andrey Ryaguzov
- Stefan
- Peter Bex - Peter Bex
- Manatsawin Hanmongkolchai - Manatsawin Hanmongkolchai
- Gunther Konig - Gunther Konig
@ -1350,6 +1365,7 @@ Symfony is the result of the work of many people who made the code better
- Grinbergs Reinis (shima5) - Grinbergs Reinis (shima5)
- Artem Lopata (bumz) - Artem Lopata (bumz)
- Nicole Cordes - Nicole Cordes
- Roman Orlov
- VolCh - VolCh
- Alexey Popkov - Alexey Popkov
- Gijs Kunze - Gijs Kunze
@ -1372,12 +1388,13 @@ Symfony is the result of the work of many people who made the code better
- Dmitry Korotovsky - Dmitry Korotovsky
- mcorteel - mcorteel
- Michael van Tricht - Michael van Tricht
- Tim Strehle
- Sam Ward - Sam Ward
- Walther Lalk - Walther Lalk
- Adam - Adam
- Stéphan Kochen
- devel - devel
- taiiiraaa - taiiiraaa
- Johann Pardanaud
- Trevor Suarez - Trevor Suarez
- gedrox - gedrox
- Alan Bondarchuk - Alan Bondarchuk
@ -1393,6 +1410,7 @@ Symfony is the result of the work of many people who made the code better
- bertillon - bertillon
- Bertalan Attila - Bertalan Attila
- Yannick Bensacq (cibou) - Yannick Bensacq (cibou)
- Frédéric G. Marand (fgm)
- Freek Van der Herten (freekmurze) - Freek Van der Herten (freekmurze)
- Luca Genuzio (genuzio) - Luca Genuzio (genuzio)
- Hans Nilsson (hansnilsson) - Hans Nilsson (hansnilsson)
@ -1440,9 +1458,11 @@ Symfony is the result of the work of many people who made the code better
- Alex Pods - Alex Pods
- hadriengem - hadriengem
- timaschew - timaschew
- Jochen Mandl
- Ian Phillips - Ian Phillips
- Haritz - Haritz
- Matthieu Prat - Matthieu Prat
- Ion Bazan
- Grummfy - Grummfy
- Filipe Guerra - Filipe Guerra
- Gerben Wijnja - Gerben Wijnja
@ -1469,6 +1489,7 @@ Symfony is the result of the work of many people who made the code better
- Juan M Martínez - Juan M Martínez
- Gilles Gauthier - Gilles Gauthier
- ddebree - ddebree
- Kuba Werłos
- Tomas Liubinas - Tomas Liubinas
- Alex - Alex
- Klaas Naaijkens - Klaas Naaijkens
@ -1541,6 +1562,7 @@ Symfony is the result of the work of many people who made the code better
- Kristof Van Cauwenbergh (kristofvc) - Kristof Van Cauwenbergh (kristofvc)
- Paulius Jarmalavičius (pjarmalavicius) - Paulius Jarmalavičius (pjarmalavicius)
- Ramon Henrique Ornelas (ramonornela) - Ramon Henrique Ornelas (ramonornela)
- Ricardo de Vries (ricknox)
- Markus S. (staabm) - Markus S. (staabm)
- Till Klampaeckel (till) - Till Klampaeckel (till)
- Tobias Weinert (tweini) - Tobias Weinert (tweini)
@ -1548,6 +1570,7 @@ Symfony is the result of the work of many people who made the code better
- Wotre - Wotre
- goohib - goohib
- Xavier HAUSHERR - Xavier HAUSHERR
- Ron Gähler
- Edwin Hageman - Edwin Hageman
- Mantas Urnieža - Mantas Urnieža
- Cas - Cas
@ -1563,12 +1586,14 @@ Symfony is the result of the work of many people who made the code better
- BenjaminBeck - BenjaminBeck
- Aurelijus Rožėnas - Aurelijus Rožėnas
- Vladimir Tsykun - Vladimir Tsykun
- Jordan Hoff
- znerol - znerol
- Christian Eikermann - Christian Eikermann
- Antonio Angelino - Antonio Angelino
- Matt Fields - Matt Fields
- Niklas Keller - Niklas Keller
- Vladimir Sazhin - Vladimir Sazhin
- Tomas Kmieliauskas
- Billie Thompson - Billie Thompson
- lol768 - lol768
- jamogon - jamogon
@ -1582,6 +1607,7 @@ Symfony is the result of the work of many people who made the code better
- patrick-mcdougle - patrick-mcdougle
- Dariusz Czech - Dariusz Czech
- Anonymous User - Anonymous User
- Paweł Tomulik
- Eric J. Duran - Eric J. Duran
- Alexandru Bucur - Alexandru Bucur
- cmfcmf - cmfcmf
@ -1605,7 +1631,6 @@ Symfony is the result of the work of many people who made the code better
- vlechemin - vlechemin
- Brian Corrigan - Brian Corrigan
- Ladislav Tánczos - Ladislav Tánczos
- Brian Freytag
- Skorney - Skorney
- fmarchalemisys - fmarchalemisys
- mieszko4 - mieszko4
@ -1617,6 +1642,7 @@ Symfony is the result of the work of many people who made the code better
- Markus Staab - Markus Staab
- Pierre-Louis LAUNAY - Pierre-Louis LAUNAY
- djama - djama
- Michael Gwynne
- Eduardo Conceição - Eduardo Conceição
- Jon Cave - Jon Cave
- Sébastien HOUZE - Sébastien HOUZE
@ -1626,6 +1652,7 @@ Symfony is the result of the work of many people who made the code better
- Shude - Shude
- Ondřej Führer - Ondřej Führer
- Sema - Sema
- Michael Käfer
- Elan Ruusamäe - Elan Ruusamäe
- Thorsten Hallwas - Thorsten Hallwas
- Michael Squires - Michael Squires
@ -1653,6 +1680,7 @@ Symfony is the result of the work of many people who made the code better
- Diego Campoy - Diego Campoy
- TeLiXj - TeLiXj
- Oncle Tom - Oncle Tom
- Sam Anthony
- Christian Stocker - Christian Stocker
- Dawid Nowak - Dawid Nowak
- Lesnykh Ilia - Lesnykh Ilia
@ -1671,6 +1699,7 @@ Symfony is the result of the work of many people who made the code better
- arduanov - arduanov
- sualko - sualko
- Bilge - Bilge
- ADmad
- Nicolas Roudaire - Nicolas Roudaire
- Alfonso (afgar) - Alfonso (afgar)
- Andreas Forsblom (aforsblo) - Andreas Forsblom (aforsblo)
@ -1764,6 +1793,7 @@ Symfony is the result of the work of many people who made the code better
- Moritz Kraft (userfriendly) - Moritz Kraft (userfriendly)
- Víctor Mateo (victormateo) - Víctor Mateo (victormateo)
- Vincent (vincent1870) - Vincent (vincent1870)
- Vincent CHALAMON (vincentchalamon)
- Eugene Babushkin (warl) - Eugene Babushkin (warl)
- Wouter Sioen (wouter_sioen) - Wouter Sioen (wouter_sioen)
- Xavier Amado (xamado) - Xavier Amado (xamado)
@ -1786,6 +1816,7 @@ Symfony is the result of the work of many people who made the code better
- Michael - Michael
- fh-github@fholzhauer.de - fh-github@fholzhauer.de
- AbdElKader Bouadjadja - AbdElKader Bouadjadja
- DSeemiller
- Jan Emrich - Jan Emrich
- Mark Topper - Mark Topper
- Xavier REN - Xavier REN
@ -1799,6 +1830,7 @@ Symfony is the result of the work of many people who made the code better
- Marc Lemay (flug) - Marc Lemay (flug)
- Henne Van Och (hennevo) - Henne Van Och (hennevo)
- Jeroen De Dauw (jeroendedauw) - Jeroen De Dauw (jeroendedauw)
- Daniel Alejandro Castro Arellano (lexcast)
- Maxime COLIN (maximecolin) - Maxime COLIN (maximecolin)
- Muharrem Demirci (mdemirci) - Muharrem Demirci (mdemirci)
- Evgeny Z (meze) - Evgeny Z (meze)
@ -1808,3 +1840,4 @@ Symfony is the result of the work of many people who made the code better
- Thomas BERTRAND (sevrahk) - Thomas BERTRAND (sevrahk)
- Matej Žilák (teo_sk) - Matej Žilák (teo_sk)
- Vladislav Vlastovskiy (vlastv) - Vladislav Vlastovskiy (vlastv)
- RENAUDIN Xavier (xorrox)

View File

@ -92,7 +92,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
} }
$prevRoot = getenv('COMPOSER_ROOT_VERSION'); $prevRoot = getenv('COMPOSER_ROOT_VERSION');
putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99"); putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99");
$exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true))); $exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-suggest --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true)));
putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : '')); putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : ''));
if ($exit) { if ($exit) {
exit($exit); exit($exit);

View File

@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
/** /**
* @internal * @internal
@ -29,14 +28,14 @@ class AddAnnotationsCachedReaderPass implements CompilerPassInterface
// "annotation_reader" at build time don't get any cache // "annotation_reader" at build time don't get any cache
if ($container->hasDefinition('annotations.cached_reader')) { if ($container->hasDefinition('annotations.cached_reader')) {
$reader = $container->getDefinition('annotations.cached_reader'); $reader = $container->getDefinition('annotations.cached_reader');
$tags = $reader->getTags(); $properties = $reader->getProperties();
if (isset($tags['annotations.cached_reader'][0]['provider'])) { if (isset($properties['cacheProviderBackup'])) {
if ($container->hasAlias($provider = $tags['annotations.cached_reader'][0]['provider'])) { $provider = $properties['cacheProviderBackup']->getValues()[0];
$provider = (string) $container->getAlias($provider); unset($properties['cacheProviderBackup']);
} $reader->setProperties($properties);
$container->set('annotations.cached_reader', null); $container->set('annotations.cached_reader', null);
$container->setDefinition('annotations.cached_reader', $reader->replaceArgument(1, new Reference($provider))); $container->setDefinition('annotations.cached_reader', $reader->replaceArgument(1, $provider));
} }
} }
} }

View File

@ -28,6 +28,7 @@ use Symfony\Component\Config\ResourceCheckerInterface;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
@ -1386,7 +1387,8 @@ class FrameworkExtension extends Extension
$container $container
->getDefinition('annotations.cached_reader') ->getDefinition('annotations.cached_reader')
->replaceArgument(2, $config['debug']) ->replaceArgument(2, $config['debug'])
->addTag('annotations.cached_reader', array('provider' => $cacheService)) // temporary property to lazy-reference the cache provider without using it until AddAnnotationsCachedReaderPass runs
->setProperty('cacheProviderBackup', new ServiceClosureArgument(new Reference($cacheService)))
; ;
$container->setAlias('annotation_reader', 'annotations.cached_reader')->setPrivate(true); $container->setAlias('annotation_reader', 'annotations.cached_reader')->setPrivate(true);
$container->setAlias(Reader::class, new Alias('annotations.cached_reader', false)); $container->setAlias(Reader::class, new Alias('annotations.cached_reader', false));

View File

@ -102,7 +102,7 @@ class FrameworkBundle extends Bundle
$container->addCompilerPass((new RegisterListenersPass())->setHotPathEvents($hotPathEvents), PassConfig::TYPE_BEFORE_REMOVING); $container->addCompilerPass((new RegisterListenersPass())->setHotPathEvents($hotPathEvents), PassConfig::TYPE_BEFORE_REMOVING);
$container->addCompilerPass(new TemplatingPass()); $container->addCompilerPass(new TemplatingPass());
$this->addCompilerPassIfExists($container, AddConstraintValidatorsPass::class, PassConfig::TYPE_BEFORE_REMOVING); $this->addCompilerPassIfExists($container, AddConstraintValidatorsPass::class, PassConfig::TYPE_BEFORE_REMOVING);
$container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_BEFORE_REMOVING); $container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_AFTER_REMOVING, -255);
$this->addCompilerPassIfExists($container, AddValidatorInitializersPass::class); $this->addCompilerPassIfExists($container, AddValidatorInitializersPass::class);
$this->addCompilerPassIfExists($container, AddConsoleCommandPass::class); $this->addCompilerPassIfExists($container, AddConsoleCommandPass::class);
if (class_exists(TranslatorPass::class)) { if (class_exists(TranslatorPass::class)) {

View File

@ -12,6 +12,7 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle; namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\AnnotationReaderPass; use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\AnnotationReaderPass;
use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\Config\CustomConfig; use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\Config\CustomConfig;
@ -27,6 +28,6 @@ class TestBundle extends Bundle
$extension->setCustomConfig(new CustomConfig()); $extension->setCustomConfig(new CustomConfig());
$container->addCompilerPass(new AnnotationReaderPass()); $container->addCompilerPass(new AnnotationReaderPass(), PassConfig::TYPE_AFTER_REMOVING);
} }
} }

View File

@ -74,7 +74,7 @@
{% endif %} {% endif %}
<tr> <tr>
<td class="text-right">{{ listener.priority|default('-') }}</td> <td class="text-right nowrap">{{ listener.priority|default('-') }}</td>
<td class="font-normal">{{ profiler_dump(listener.stub) }}</td> <td class="font-normal">{{ profiler_dump(listener.stub) }}</td>
</tr> </tr>

View File

@ -199,9 +199,9 @@
<tbody> <tbody>
{% for message in messages %} {% for message in messages %}
<tr> <tr>
<td class="font-normal text-small">{{ message.locale }}</td> <td class="font-normal text-small nowrap">{{ message.locale }}</td>
<td class="font-normal text-small text-bold nowrap">{{ message.domain }}</td> <td class="font-normal text-small text-bold nowrap">{{ message.domain }}</td>
<td class="font-normal text-small">{{ message.count }}</td> <td class="font-normal text-small nowrap">{{ message.count }}</td>
<td> <td>
<span class="nowrap">{{ message.id }}</span> <span class="nowrap">{{ message.id }}</span>

View File

@ -178,10 +178,6 @@ table tbody td {
border-width: 1px 0; border-width: 1px 0;
} }
table tbody td {
{{ mixins.break_long_words|raw }}
}
table tbody div { table tbody div {
margin: .25em 0; margin: .25em 0;
} }

View File

@ -55,8 +55,8 @@
{% for trace in traces %} {% for trace in traces %}
<tr class="{{ trace.level == 1 ? 'status-warning' : trace.level == 2 ? 'status-success' }}"> <tr class="{{ trace.level == 1 ? 'status-warning' : trace.level == 2 ? 'status-success' }}">
<td class="font-normal text-muted nowrap">{{ loop.index }}</td> <td class="font-normal text-muted nowrap">{{ loop.index }}</td>
<td>{{ trace.name }}</td> <td class="break-long-words">{{ trace.name }}</td>
<td>{{ trace.path }}</td> <td class="break-long-words">{{ trace.path }}</td>
<td class="font-normal"> <td class="font-normal">
{% if trace.level == 1 %} {% if trace.level == 1 %}
Path almost matches, but Path almost matches, but

View File

@ -58,7 +58,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
protected function assertMatchesXpath($html, $expression, $count = 1) protected function assertMatchesXpath($html, $expression, $count = 1)
{ {
$dom = new \DomDocument('UTF-8'); $dom = new \DOMDocument('UTF-8');
try { try {
// Wrap in <root> node so we can load HTML with multiple tags at // Wrap in <root> node so we can load HTML with multiple tags at
// the top level // the top level

View File

@ -20,6 +20,7 @@ use Symfony\Component\Process\Exception\RuntimeException;
*/ */
class InputStream implements \IteratorAggregate class InputStream implements \IteratorAggregate
{ {
/** @var null|callable */
private $onEmpty = null; private $onEmpty = null;
private $input = array(); private $input = array();
private $open = true; private $open = true;
@ -35,7 +36,8 @@ class InputStream implements \IteratorAggregate
/** /**
* Appends an input to the write buffer. * Appends an input to the write buffer.
* *
* @param resource|scalar|\Traversable|null The input to append as stream resource, scalar or \Traversable * @param resource|string|int|float|bool|\Traversable|null The input to append as scalar,
* stream resource or \Traversable
*/ */
public function write($input) public function write($input)
{ {

View File

@ -27,7 +27,7 @@ abstract class AbstractPipes implements PipesInterface
private $blocked = true; private $blocked = true;
/** /**
* @param resource|scalar|\Iterator|null $input * @param resource|string|int|float|bool|\Iterator|null $input
*/ */
public function __construct($input) public function __construct($input)
{ {

View File

@ -1162,7 +1162,7 @@ class Process implements \IteratorAggregate
* *
* This content will be passed to the underlying process standard input. * This content will be passed to the underlying process standard input.
* *
* @param resource|scalar|\Traversable|null $input The content * @param string|int|float|bool|resource|\Traversable|null $input The content
* *
* @return self The current Process instance * @return self The current Process instance
* *

View File

@ -167,7 +167,7 @@ class ProcessBuilder
/** /**
* Sets the input of the process. * Sets the input of the process.
* *
* @param resource|scalar|\Traversable|null $input The input content * @param resource|string|int|float|bool|\Traversable|null $input The input content
* *
* @return $this * @return $this
* *

View File

@ -45,6 +45,8 @@ class ContextListener implements ListenerInterface
private $trustResolver; private $trustResolver;
private $logoutOnUserChange = false; private $logoutOnUserChange = false;
private static $unserializeExceptionCode = 0x37313bc;
/** /**
* @param TokenStorageInterface $tokenStorage * @param TokenStorageInterface $tokenStorage
* @param iterable|UserProviderInterface[] $userProviders * @param iterable|UserProviderInterface[] $userProviders
@ -96,7 +98,7 @@ class ContextListener implements ListenerInterface
return; return;
} }
$token = unserialize($token); $token = $this->safelyUnserialize($token);
if (null !== $this->logger) { if (null !== $this->logger) {
$this->logger->debug('Read existing security token from the session.', array( $this->logger->debug('Read existing security token from the session.', array(
@ -219,4 +221,43 @@ class ContextListener implements ListenerInterface
throw new \RuntimeException(sprintf('There is no user provider for user "%s".', get_class($user))); throw new \RuntimeException(sprintf('There is no user provider for user "%s".', get_class($user)));
} }
private function safelyUnserialize($serializedToken)
{
$e = $token = null;
$prevUnserializeHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback');
$prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$prevErrorHandler) {
if (__FILE__ === $file) {
throw new \UnexpectedValueException($msg, self::$unserializeExceptionCode);
}
return $prevErrorHandler ? $prevErrorHandler($type, $msg, $file, $line, $context) : false;
});
try {
$token = unserialize($serializedToken);
} catch (\Error $e) {
} catch (\Exception $e) {
}
restore_error_handler();
ini_set('unserialize_callback_func', $prevUnserializeHandler);
if ($e) {
if (!$e instanceof \UnexpectedValueException || self::$unserializeExceptionCode !== $e->getCode()) {
throw $e;
}
if ($this->logger) {
$this->logger->warning('Failed to unserialize the security token from the session.', array('key' => $this->sessionKey, 'received' => $serializedToken, 'exception' => $e));
}
}
return $token;
}
/**
* @internal
*/
public static function handleUnserializeCallback($class)
{
throw new \UnexpectedValueException('Class not found: '.$class, self::$unserializeExceptionCode);
}
} }

View File

@ -173,6 +173,8 @@ class ContextListenerTest extends TestCase
public function provideInvalidToken() public function provideInvalidToken()
{ {
return array( return array(
array('foo'),
array('O:8:"NotFound":0:{}'),
array(serialize(new \__PHP_Incomplete_Class())), array(serialize(new \__PHP_Incomplete_Class())),
array(serialize(null)), array(serialize(null)),
array(null), array(null),

View File

@ -27,7 +27,7 @@ interface EncoderInterface
* @param string $format Format name * @param string $format Format name
* @param array $context Options that normalizers/encoders have access to * @param array $context Options that normalizers/encoders have access to
* *
* @return scalar * @return string|int|float|bool
* *
* @throws UnexpectedValueException * @throws UnexpectedValueException
*/ */

View File

@ -38,7 +38,7 @@ class JsonEncode implements EncoderInterface
$encodedJson = json_encode($data, $context['json_encode_options']); $encodedJson = json_encode($data, $context['json_encode_options']);
if (JSON_ERROR_NONE !== json_last_error()) { if (JSON_ERROR_NONE !== json_last_error() && (false === $encodedJson || !($context['json_encode_options'] & JSON_PARTIAL_OUTPUT_ON_ERROR))) {
throw new NotEncodableValueException(json_last_error_msg()); throw new NotEncodableValueException(json_last_error_msg());
} }

View File

@ -27,12 +27,12 @@ interface DenormalizableInterface
* It is important to understand that the denormalize() call should denormalize * It is important to understand that the denormalize() call should denormalize
* recursively all child objects of the implementor. * recursively all child objects of the implementor.
* *
* @param DenormalizerInterface $denormalizer The denormalizer is given so that you * @param DenormalizerInterface $denormalizer The denormalizer is given so that you
* can use it to denormalize objects contained within this object * can use it to denormalize objects contained within this object
* @param array|scalar $data The data from which to re-create the object * @param array|string|int|float|bool $data The data from which to re-create the object
* @param string|null $format The format is optionally given to be able to denormalize differently * @param string|null $format The format is optionally given to be able to denormalize
* based on different input formats * differently based on different input formats
* @param array $context Options for denormalizing * @param array $context Options for denormalizing
* *
* @return object * @return object
*/ */

View File

@ -33,7 +33,7 @@ interface NormalizableInterface
* based on different output formats * based on different output formats
* @param array $context Options for normalizing this object * @param array $context Options for normalizing this object
* *
* @return array|scalar * @return array|string|int|float|bool
*/ */
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()); public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array());
} }

View File

@ -29,7 +29,7 @@ interface NormalizerInterface
* @param string $format Format the normalization result will be encoded as * @param string $format Format the normalization result will be encoded as
* @param array $context Context options for the normalizer * @param array $context Context options for the normalizer
* *
* @return array|scalar * @return array|string|int|float|bool
* *
* @throws InvalidArgumentException Occurs when the object given is not an attempted type for the normalizer * @throws InvalidArgumentException Occurs when the object given is not an attempted type for the normalizer
* @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular * @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular

View File

@ -65,6 +65,44 @@ class JsonEncoderTest extends TestCase
$this->assertEquals($expected, $this->serializer->serialize($arr, 'json'), 'Context should not be persistent'); $this->assertEquals($expected, $this->serializer->serialize($arr, 'json'), 'Context should not be persistent');
} }
/**
* @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException
*/
public function testEncodeNotUtf8WithoutPartialOnError()
{
$arr = array(
'utf8' => 'Hello World!',
'notUtf8' => "\xb0\xd0\xb5\xd0",
);
$this->encoder->encode($arr, 'json');
}
public function testEncodeNotUtf8WithPartialOnError()
{
$context = array('json_encode_options' => JSON_PARTIAL_OUTPUT_ON_ERROR);
$arr = array(
'utf8' => 'Hello World!',
'notUtf8' => "\xb0\xd0\xb5\xd0",
);
$result = $this->encoder->encode($arr, 'json', $context);
$jsonLastError = json_last_error();
$this->assertSame(JSON_ERROR_UTF8, $jsonLastError);
$this->assertEquals('{"utf8":"Hello World!","notUtf8":null}', $result);
$this->assertEquals('0', $this->serializer->serialize(NAN, 'json', $context));
}
public function testDecodeFalseString()
{
$result = $this->encoder->decode('false', 'json');
$this->assertSame(JSON_ERROR_NONE, json_last_error());
$this->assertFalse($result);
}
protected function getJsonSource() protected function getJsonSource()
{ {
return '{"foo":"foo","bar":["a","b"],"baz":{"key":"val","key2":"val","A B":"bar","item":[{"title":"title1"},{"title":"title2"}],"Barry":{"FooBar":{"Baz":"Ed","@id":1}}},"qux":"1"}'; return '{"foo":"foo","bar":["a","b"],"baz":{"key":"val","key2":"val","A B":"bar","item":[{"title":"title1"},{"title":"title2"}],"Barry":{"FooBar":{"Baz":"Ed","@id":1}}},"qux":"1"}';

View File

@ -63,7 +63,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
/** /**
* @param bool $recursive Whether values should be resolved recursively or not * @param bool $recursive Whether values should be resolved recursively or not
* *
* @return scalar|array|null|Data[] A native representation of the original value * @return string|int|float|bool|array|null|Data[] A native representation of the original value
*/ */
public function getValue($recursive = false) public function getValue($recursive = false)
{ {

View File

@ -21,9 +21,9 @@ interface DumperInterface
/** /**
* Dumps a scalar value. * Dumps a scalar value.
* *
* @param Cursor $cursor The Cursor position in the dump * @param Cursor $cursor The Cursor position in the dump
* @param string $type The PHP type of the value being dumped * @param string $type The PHP type of the value being dumped
* @param scalar $value The scalar value being dumped * @param string|int|float|bool $value The scalar value being dumped
*/ */
public function dumpScalar(Cursor $cursor, $type, $value); public function dumpScalar(Cursor $cursor, $type, $value);