Merge branch '2.3' into 2.6
* 2.3: Fix small coding style [2.3] Static Code Analysis for Components [Form] fixed phpdoc CS: Convert double quotes to single quotes Fixed MongoODM entity loader. Improved loading behavior of entities and documents by reusing entity loader. [Validator] added Japanese translation for unmatched charset (id: 80) [DependencyInjection] Highest precedence for user parameters [Translation][MoFileLoader] fixed load empty translation. bumped Symfony version to 2.3.27 updated VERSION for 2.3.26 update CONTRIBUTORS for 2.3.26 updated CHANGELOG for 2.3.26 Conflicts: src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php src/Symfony/Bundle/TwigBundle/Command/LintCommand.php src/Symfony/Component/Config/Definition/ReferenceDumper.php src/Symfony/Component/Debug/ExceptionHandler.php src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php src/Symfony/Component/Filesystem/Filesystem.php src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Serializer/Encoder/XmlEncoder.php src/Symfony/Component/Translation/PluralizationRules.php src/Symfony/Component/Validator/Constraints/IssnValidator.php src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf src/Symfony/Component/Yaml/Tests/InlineTest.php
This commit is contained in:
commit
618b7dcfb8
@ -7,6 +7,31 @@ in 2.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 between two versions, go to https://github.com/symfony/symfony/compare/v2.3.0...v2.3.1
|
||||
|
||||
* 2.3.26 (2015-03-17)
|
||||
|
||||
* bug #13927 Fixing wrong variable name from #13519 (weaverryan)
|
||||
* bug #13519 [DependencyInjection] fixed service resolution for factories (fabpot)
|
||||
* bug #13901 [Bundle] Fix charset config (nicolas-grekas, bamarni)
|
||||
* bug #13911 [HttpFoundation] MongoDbSessionHandler::read() now checks for valid session age (bzikarsky)
|
||||
* bug #13890 Fix XSS in Debug exception handler (fabpot)
|
||||
* bug #13744 minor #13377 [Console] Change greater by greater or equal for isFresh in FileResource (bijibox)
|
||||
* bug #13708 [HttpFoundation] fixed param order for Nginx's x-accel-mapping (phansys)
|
||||
* bug #13767 [HttpKernel] Throw double-bounce exceptions (nicolas-grekas)
|
||||
* bug #13769 [Form] NativeRequestHandler file handling fix (mpajunen)
|
||||
* bug #13779 [FrameworkBundle] silence E_USER_DEPRECATED in insulated clients (nicolas-grekas)
|
||||
* bug #13715 Enforce UTF-8 charset for core controllers (WouterJ)
|
||||
* bug #13683 [PROCESS] make sure /dev/tty is readable (staabm)
|
||||
* bug #13733 [Process] Fixed PhpProcess::getCommandLine() result (francisbesset)
|
||||
* bug #13618 [PropertyAccess] Fixed invalid feedback -> foodback singularization (WouterJ)
|
||||
* bug #13630 [Console] fixed ArrayInput, if array contains 0 key. (arima-ryunosuke)
|
||||
* bug #13647 [FrameworkBundle] Fix title and placeholder rendering in php form templates (jakzal)
|
||||
* bug #13607 [Console] Fixed output bug, if escaped string in a formatted string. (tronsha)
|
||||
* bug #13466 [Security] Remove ContextListener's onKernelResponse listener as it is used (davedevelopment)
|
||||
* bug #12864 [Console][Table] Fix cell padding with multi-byte (ttsuruoka)
|
||||
* bug #13375 [YAML] Fix one-liners to work with multiple new lines (Alex Pott)
|
||||
* bug #13545 fixxed order of usage (OskarStark)
|
||||
* bug #13567 [Routing] make host matching case-insensitive (Tobion)
|
||||
|
||||
* 2.3.25 (2015-01-30)
|
||||
|
||||
* bug #13528 [Validator] reject ill-formed strings (nicolas-grekas)
|
||||
|
@ -7,8 +7,8 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Fabien Potencier (fabpot)
|
||||
- Bernhard Schussek (bschussek)
|
||||
- Victor Berchet (victor)
|
||||
- Jordi Boggiano (seldaek)
|
||||
- Tobias Schultze (tobion)
|
||||
- Jordi Boggiano (seldaek)
|
||||
- Johannes S (johannes)
|
||||
- Kris Wallsmith (kriswallsmith)
|
||||
- Christophe Coevoet (stof)
|
||||
@ -28,12 +28,12 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Igor Wiedler (igorw)
|
||||
- Martin Hasoň (hason)
|
||||
- Eriksen Costa (eriksencosta)
|
||||
- Jonathan Wage (jwage)
|
||||
- Grégoire Pineau (lyrixx)
|
||||
- Jonathan Wage (jwage)
|
||||
- Wouter De Jong (wouterj)
|
||||
- Alexandre Salomé (alexandresalome)
|
||||
- William Durand (couac)
|
||||
- ornicar
|
||||
- Wouter De Jong (wouterj)
|
||||
- stealth35 (stealth35)
|
||||
- Alexander Mols (asm89)
|
||||
- Bulat Shakirzyanov (avalanche123)
|
||||
@ -43,10 +43,11 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Miha Vrhovnik
|
||||
- Konstantin Kudryashov (everzet)
|
||||
- Bilal Amarni (bamarni)
|
||||
- Kévin Dunglas (dunglas)
|
||||
- Florin Patan (florinpatan)
|
||||
- Abdellatif Ait Boudad (aitboudad)
|
||||
- Eric Clemmons (ericclemmons)
|
||||
- Sarah Khalil (saro0h)
|
||||
- Eric Clemmons (ericclemmons)
|
||||
- Andrej Hudec (pulzarraider)
|
||||
- Deni
|
||||
- Henrik Westphal (snc)
|
||||
@ -63,27 +64,28 @@ Symfony is the result of the work of many people who made the code better
|
||||
- John Wards (johnwards)
|
||||
- Fran Moreno (franmomu)
|
||||
- Antoine Hérault (herzult)
|
||||
- Kevin Bond (kbond)
|
||||
- Toni Uebernickel (havvg)
|
||||
- Luis Cordova (cordoval)
|
||||
- Arnaud Le Blanc (arnaud-lb)
|
||||
- Kevin Bond (kbond)
|
||||
- Tim Nagel (merk)
|
||||
- Brice BERNARD (brikou)
|
||||
- Kévin Dunglas (dunglas)
|
||||
- marc.weistroff
|
||||
- lenar
|
||||
- Graham Campbell (graham)
|
||||
- Włodzimierz Gajda (gajdaw)
|
||||
- Florian Voutzinos (florianv)
|
||||
- Colin Frei
|
||||
- Jérôme Tamarelle (gromnan)
|
||||
- Adrien Brault (adrienbrault)
|
||||
- Gábor Egyed (1ed)
|
||||
- excelwebzone
|
||||
- Jacob Dreesen (jdreesen)
|
||||
- Florian Voutzinos (florianv)
|
||||
- Jérôme Tamarelle (gromnan)
|
||||
- Adrien Brault (adrienbrault)
|
||||
- Fabien Pennequin (fabienpennequin)
|
||||
- Peter Kokot (maastermedia)
|
||||
- Peter Rehm (rpet)
|
||||
- Michal Piotrowski (eventhorizon)
|
||||
- Stefano Sala (stefano.sala)
|
||||
- Gordon Franke (gimler)
|
||||
- Robert Schönthal (digitalkaoz)
|
||||
- Juti Noppornpitak (shiroyuki)
|
||||
@ -94,12 +96,12 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Jérémy DERUSSÉ (jderusse)
|
||||
- Pablo Godel (pgodel)
|
||||
- Eric GELOEN (gelo)
|
||||
- Peter Rehm (rpet)
|
||||
- Jérémie Augustin (jaugustin)
|
||||
- Rafael Dohms (rdohms)
|
||||
- Stefano Sala (stefano.sala)
|
||||
- Guilherme Blanco (guilhermeblanco)
|
||||
- Tigran Azatyan (tigranazatyan)
|
||||
- Javier Eguiluz (javier.eguiluz)
|
||||
- Arnaud Kleinpeter (nanocom)
|
||||
- Richard Shank (iampersistent)
|
||||
- Clemens Tolboom
|
||||
- Helmer Aaviksoo
|
||||
@ -110,13 +112,11 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Amal Raghav (kertz)
|
||||
- Jonathan Ingram (jonathaningram)
|
||||
- Artur Kotyrba
|
||||
- Guilherme Blanco (guilhermeblanco)
|
||||
- Rouven Weßling (realityking)
|
||||
- Dmitrii Chekaliuk (lazyhammer)
|
||||
- Clément JOBEILI (dator)
|
||||
- Dorian Villet (gnutix)
|
||||
- Richard Miller (mr_r_miller)
|
||||
- Arnaud Kleinpeter (nanocom)
|
||||
- hacfi (hifi)
|
||||
- Mario A. Alvarez Garcia (nomack84)
|
||||
- Dennis Benkert (denderello)
|
||||
@ -147,10 +147,12 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Alexander Schwenn (xelaris)
|
||||
- Lars Strojny (lstrojny)
|
||||
- Rui Marinho (ruimarinho)
|
||||
- Mikael Pajunen
|
||||
- Julien Brochet (mewt)
|
||||
- Tugdual Saunier (tucksaun)
|
||||
- Sergey Linnik (linniksa)
|
||||
- Marcel Beerta (mazen)
|
||||
- Javier Spagnoletti (phansys)
|
||||
- Francois Zaninotto
|
||||
- Alexander Kotynia (olden)
|
||||
- Daniel Tschinder
|
||||
@ -182,6 +184,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- julien pauli (jpauli)
|
||||
- Beau Simensen (simensen)
|
||||
- Robert Kiss (kepten)
|
||||
- Ruben Gonzalez (rubenrua)
|
||||
- Kim Hemsø Rasmussen (kimhemsoe)
|
||||
- Florian Lonqueu-Brochard (florianlb)
|
||||
- Tom Van Looy (tvlooy)
|
||||
@ -199,11 +202,11 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Andrew Moore (finewolf)
|
||||
- Bertrand Zuchuat (garfield-fr)
|
||||
- Gabor Toth (tgabi333)
|
||||
- Alex Pott
|
||||
- realmfoo
|
||||
- Thomas Tourlourat (armetiz)
|
||||
- Andrey Esaulov (andremaha)
|
||||
- Grégoire Passault (gregwar)
|
||||
- Mikael Pajunen
|
||||
- Uwe Jäger (uwej711)
|
||||
- Aurelijus Valeiša (aurelijus)
|
||||
- Jan Decavele (jandc)
|
||||
@ -224,10 +227,12 @@ Symfony is the result of the work of many people who made the code better
|
||||
- alquerci
|
||||
- Francesco Levorato
|
||||
- Vitaliy Zakharov (zakharovvi)
|
||||
- Tobias Sjösten (tobiassjosten)
|
||||
- Gyula Sallai (salla)
|
||||
- Inal DJAFAR (inalgnu)
|
||||
- Christian Gärtner (dagardner)
|
||||
- Felix Labrecque
|
||||
- Vladimir Reznichenko (kalessil)
|
||||
- Yaroslav Kiliba
|
||||
- Sébastien Lavoie (lavoiesl)
|
||||
- Terje Bråten
|
||||
@ -248,7 +253,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Loïc Chardonnet (gnusat)
|
||||
- Marek Kalnik (marekkalnik)
|
||||
- Vyacheslav Salakhutdinov (megazoll)
|
||||
- Alex Pott
|
||||
- Tamas Szijarto
|
||||
- Pavel Volokitin (pvolok)
|
||||
- Endre Fejes
|
||||
@ -272,6 +276,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Christophe L. (christophelau)
|
||||
- Anthon Pang (robocoder)
|
||||
- Jáchym Toušek
|
||||
- Thomas Schulz (king2500)
|
||||
- Jannik Zschiesche (apfelbox)
|
||||
- Emanuele Gaspari (inmarelibero)
|
||||
- Dariusz Rumiński
|
||||
@ -283,18 +288,17 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Jeanmonod David (jeanmonod)
|
||||
- Jan Schumann
|
||||
- Niklas Fiekas
|
||||
- Ruben Gonzalez (rubenrua)
|
||||
- lancergr
|
||||
- Antonio J. García Lagar (ajgarlag)
|
||||
- Olivier Dolbeau (odolbeau)
|
||||
- Roumen Damianoff (roumen)
|
||||
- Tobias Sjösten (tobiassjosten)
|
||||
- Konstantin Myakshin (koc)
|
||||
- vagrant
|
||||
- Asier Illarramendi (doup)
|
||||
- Alexander M. Turek (derrabus)
|
||||
- Chris Sedlmayr (catchamonkey)
|
||||
- Seb Koelen
|
||||
- Daniel Wehner
|
||||
- Christoph Mewes (xrstf)
|
||||
- Vitaliy Tverdokhlib (vitaliytv)
|
||||
- Ariel Ferrandini (aferrandini)
|
||||
@ -302,9 +306,12 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Stepan Anchugov (kix)
|
||||
- cedric lombardot (cedriclombardot)
|
||||
- Jonas Flodén (flojon)
|
||||
- Christian Schmidt
|
||||
- Marcin Sikoń (marphi)
|
||||
- franek (franek)
|
||||
- Dariusz Ruminski
|
||||
- Adam Harvey
|
||||
- Diego Saint Esteben (dii3g0)
|
||||
- Alex Bakhturin
|
||||
- François-Xavier de Guillebon (de-gui_f)
|
||||
- boombatower
|
||||
@ -331,6 +338,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Vicent Soria Durá (vicentgodella)
|
||||
- Ioan Negulescu
|
||||
- Jakub Škvára (jskvara)
|
||||
- Daniel Beyer
|
||||
- Andrew Udvare (audvare)
|
||||
- alexpods
|
||||
- Erik Trapman (eriktrapman)
|
||||
@ -342,7 +350,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Nils Adermann (naderman)
|
||||
- Gábor Fási
|
||||
- Benjamin Leveque (benji07)
|
||||
- Javier Spagnoletti (phansys)
|
||||
- sasezaki
|
||||
- Dawid Pakuła (zulusx)
|
||||
- Florian Rey (nervo)
|
||||
@ -357,6 +364,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Massimiliano Arione (garak)
|
||||
- Ivan Rey (ivanrey)
|
||||
- Marcin Chyłek (songoq)
|
||||
- Vadim Kharitonov (virtuozzz)
|
||||
- Ned Schwartz
|
||||
- Ziumin
|
||||
- Lenar Lõhmus
|
||||
@ -398,7 +406,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Rostyslav Kinash
|
||||
- Daisuke Ohata
|
||||
- Vincent Simonin
|
||||
- Christian Schmidt
|
||||
- Stefan Warman
|
||||
- Tristan Maindron (tmaindron)
|
||||
- Ke WANG (yktd26)
|
||||
@ -409,18 +416,22 @@ Symfony is the result of the work of many people who made the code better
|
||||
- umpirski
|
||||
- Chris Heng (gigablah)
|
||||
- Ulumuddin Yunus (joenoez)
|
||||
- Dominik Zogg (dominik.zogg)
|
||||
- Luc Vieillescazes (iamluc)
|
||||
- Johann Saunier (prophet777)
|
||||
- Antoine Corcy
|
||||
- Artur Eshenbrener
|
||||
- Arturs Vonda
|
||||
- Sascha Grossenbacher
|
||||
- Szijarto Tamas
|
||||
- Benjamin Zikarsky (bzikarsky)
|
||||
- Ben Davies (bendavies)
|
||||
- Mickaël Andrieu (mickaelandrieu)
|
||||
- Simon Schick (simonsimcity)
|
||||
- redstar504
|
||||
- Hossein Bukhamsin
|
||||
- Paweł Wacławczyk (pwc)
|
||||
- Oleg Zinchenko (cystbear)
|
||||
- Diego Saint Esteben (dii3g0)
|
||||
- Johannes Klauss (cloppy)
|
||||
- Evan Villemez
|
||||
- fzerorubigd
|
||||
@ -432,6 +443,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Vincent AUBERT (vincent)
|
||||
- Tomasz Kowalczyk (thunderer)
|
||||
- Mark Sonnabaum
|
||||
- Alexander Obuhovich (aik099)
|
||||
- Mathieu Lemoine
|
||||
- jochenvdv
|
||||
- Filippo Tessarotto
|
||||
@ -446,6 +458,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Yuen-Chi Lian
|
||||
- Besnik Br
|
||||
- Joshua Nye
|
||||
- Dave Marshall (davedevelopment)
|
||||
- avorobiev
|
||||
- Venu
|
||||
- Lars Vierbergen
|
||||
@ -456,7 +469,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- 1emming
|
||||
- Leevi Graham (leevigraham)
|
||||
- Casper Valdemar Poulsen
|
||||
- Daniel Wehner
|
||||
- Josiah (josiah)
|
||||
- Marek Štípek (maryo)
|
||||
- John Bohn (jbohn)
|
||||
@ -464,7 +476,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Andrew Hilobok (hilobok)
|
||||
- Christian Soronellas (theunic)
|
||||
- Yosmany Garcia (yosmanyga)
|
||||
- Daniel Beyer
|
||||
- Jérôme Vieilledent (lolautruche)
|
||||
- Degory Valentine
|
||||
- Benoit Lévêque (benoit_leveque)
|
||||
@ -533,6 +544,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Jacques Moati
|
||||
- Balazs Csaba (balazscsaba2006)
|
||||
- Harry Walter (haswalt)
|
||||
- Johnson Page (jwpage)
|
||||
- Michael Roterman (wtfzdotnet)
|
||||
- Arno Geurts
|
||||
- Adán Lobato (adanlobato)
|
||||
@ -540,6 +552,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Maks
|
||||
- Gábor Tóth
|
||||
- Daniel Cestari
|
||||
- Johnny Robeson (johnny)
|
||||
- Brunet Laurent (lbrunet)
|
||||
- Magnus Nordlander (magnusnordlander)
|
||||
- Mikhail Yurasov (mym)
|
||||
@ -620,7 +633,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Benjamin Paap (benjaminpaap)
|
||||
- Christian
|
||||
- Sergii Smertin (nfx)
|
||||
- Artur Eshenbrener
|
||||
- Bailey Parker
|
||||
- Eddie Jaoude
|
||||
- Haritz Iturbe (hizai)
|
||||
@ -640,11 +652,13 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Julien Bianchi (jubianchi)
|
||||
- Marcin Chwedziak
|
||||
- Roland Franssen (ro0)
|
||||
- Tony Cosentino (tony-co)
|
||||
- Maciej Malarz
|
||||
- Rodrigo Díez Villamuera (rodrigodiez)
|
||||
- e-ivanov
|
||||
- Jochen Bayer (jocl)
|
||||
- Jeremy Bush
|
||||
- wizhippo
|
||||
- rpg600
|
||||
- Péter Buri (burci)
|
||||
- Davide Borsatto (davide.borsatto)
|
||||
@ -659,8 +673,8 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Artem Kolesnikov (tyomo4ka)
|
||||
- Gustavo Adrian
|
||||
- Yannick
|
||||
- Luc Vieillescazes (iamluc)
|
||||
- Eduardo García Sanz (coma)
|
||||
- Sebastian Grodzicki (sgrodzicki)
|
||||
- Roy Van Ginneken
|
||||
- David de Boer (ddeboer)
|
||||
- Gilles Doge (gido)
|
||||
@ -709,8 +723,10 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Cédric Girard (enk_)
|
||||
- Oriol Mangas Abellan (oriolman)
|
||||
- Sebastian Göttschkes (sgoettschkes)
|
||||
- Tatsuya Tsuruoka
|
||||
- Ross Tuck
|
||||
- Kévin Gomez (kevin)
|
||||
- Dawid Sajdak
|
||||
- Ludek Stepan
|
||||
- Geoffrey Brier
|
||||
- Aaron Stephens (astephens)
|
||||
@ -728,7 +744,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- steveYeah
|
||||
- Samy Dindane (dinduks)
|
||||
- Keri Henare (kerihenare)
|
||||
- Mickaël Andrieu (mickaelandrieu)
|
||||
- Cédric Lahouste (rapotor)
|
||||
- Samuel Vogel (samuelvogel)
|
||||
- Berat Doğan
|
||||
@ -741,6 +756,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Ilya Biryukov
|
||||
- Jason Desrosiers
|
||||
- m.chwedziak
|
||||
- Philip Frank
|
||||
- Lance McNearney
|
||||
- Frank Neff (fneff)
|
||||
- Giorgio Premi
|
||||
@ -750,6 +766,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Pete Mitchell (peterjmit)
|
||||
- Tom Corrigan (tomcorrigan)
|
||||
- Martin Pärtel
|
||||
- Miroslav Sustek
|
||||
- Evgeniy (ewgraf)
|
||||
- Patrick Daley (padrig)
|
||||
- Xavier Briand (xavierbriand)
|
||||
@ -825,8 +842,8 @@ Symfony is the result of the work of many people who made the code better
|
||||
- wusuopu
|
||||
- povilas
|
||||
- Diego Agulló
|
||||
- Alexander Obuhovich
|
||||
- Alessandro Tagliapietra (alex88)
|
||||
- Biji (biji)
|
||||
- Gunnar Lium (gunnarlium)
|
||||
- Tiago Garcia (tiagojsag)
|
||||
- Artiom
|
||||
@ -837,7 +854,9 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Adrian Olek (adrianolek)
|
||||
- Przemysław Piechota (kibao)
|
||||
- Leonid Terentyev (li0n)
|
||||
- Oskar Stark (oskarstark)
|
||||
- Adam Prager (padam87)
|
||||
- ryunosuke
|
||||
- victoria
|
||||
- Francisco Facioni (fran6co)
|
||||
- Iwan van Staveren (istaveren)
|
||||
@ -856,6 +875,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)
|
||||
- Stefan Hüsges (tronsha)
|
||||
- Ivan Kurnosov
|
||||
- stloyd
|
||||
- Chris Tickner
|
||||
@ -885,7 +905,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Julius Beckmann
|
||||
- Romain Dorgueil
|
||||
- Grayson Koonce (breerly)
|
||||
- Benjamin Zikarsky (bzikarsky)
|
||||
- Matt Robinson (inanimatt)
|
||||
- Karim Cassam Chenaï (ka)
|
||||
- Nicolas Bastien (nicolas_bastien)
|
||||
@ -900,7 +919,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Chris
|
||||
- efeen
|
||||
- Michał Dąbrowski (defrag)
|
||||
- Dominik Zogg (dominik.zogg)
|
||||
- Simone Fumagalli (hpatoio)
|
||||
- Kevin Vergauwen (innocenzo)
|
||||
- Alessio Baglio (ioalessio)
|
||||
@ -911,6 +929,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Milos Colakovic (project2481)
|
||||
- Rénald Casagraude (rcasagraude)
|
||||
- Robin Duval (robin-duval)
|
||||
- Grinbergs Reinis (shima5)
|
||||
- Artem Lopata (bumz)
|
||||
- Alexey Popkov
|
||||
- Artyom Protaskin
|
||||
@ -920,6 +939,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Bram Van der Sype (brammm)
|
||||
- Julien Moulin (lizjulien)
|
||||
- Nikita Nefedov (nikita2206)
|
||||
- Mauro Foti (skler)
|
||||
- Yannick Warnier (ywarnier)
|
||||
- Kevin Decherf
|
||||
- Jason Woods
|
||||
@ -940,6 +960,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- bertillon
|
||||
- Luca Genuzio (genuzio)
|
||||
- Hans Nilsson (hansnilsson)
|
||||
- Andrew Marcinkevičius (ifdattic)
|
||||
- Ioana Hazsda (ioana-hazsda)
|
||||
- Jan Marek (janmarek)
|
||||
- Mark de Haan (markdehaan)
|
||||
@ -948,6 +969,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Sofiane HADDAG (sofhad)
|
||||
- tante kinast (tante)
|
||||
- Vincent LEFORT (vlefort)
|
||||
- Sadicov Vladimir (xtech)
|
||||
- Alexander Zogheb
|
||||
- Joel Marcey
|
||||
- David Christmann
|
||||
@ -999,6 +1021,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Alex
|
||||
- Klaas Naaijkens
|
||||
- Daniel González Cerviño
|
||||
- possum
|
||||
- Rafał
|
||||
- Adria Lopez (adlpz)
|
||||
- Rosio (ben-rosio)
|
||||
@ -1007,12 +1030,12 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Masao Maeda (brtriver)
|
||||
- Darius Leskauskas (darles)
|
||||
- Dave Hulbert (dave1010)
|
||||
- Dave Marshall (davedevelopment)
|
||||
- David Joos (djoos)
|
||||
- Denis Klementjev (dklementjev)
|
||||
- Tomáš Polívka (draczris)
|
||||
- Vincent Composieux (eko)
|
||||
- Franz Liedke (franzliedke)
|
||||
- Christophe BECKER (goabonga)
|
||||
- gondo (gondo)
|
||||
- Gusakov Nikita (hell0w0rd)
|
||||
- Osman Üngür (import)
|
||||
@ -1027,10 +1050,10 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Michael Pohlers (mick_the_big)
|
||||
- Mantas Var (mvar)
|
||||
- Cayetano Soriano Gallego (neoshadybeat)
|
||||
- Maxime Steinhausser (ogizanagi)
|
||||
- Pablo Monterde Perez (plebs)
|
||||
- Jimmy Leger (redpanda)
|
||||
- Cyrille Jouineau (tuxosaurus)
|
||||
- Vadim Kharitonov (virtuozzz)
|
||||
- Yorkie Chadwick (yorkie76)
|
||||
- Yanick Witschi
|
||||
- Ondrej Mirtes
|
||||
@ -1053,6 +1076,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Simon CONSTANS (kosssi)
|
||||
- Kristof Van Cauwenbergh (kristofvc)
|
||||
- Ramon Henrique Ornelas (ramonornela)
|
||||
- Markus S. (staabm)
|
||||
- Till Klampaeckel (till)
|
||||
- Tobias Weinert (tweini)
|
||||
- Ulf Reimers (ureimers)
|
||||
@ -1060,8 +1084,10 @@ Symfony is the result of the work of many people who made the code better
|
||||
- goohib
|
||||
- Xavier HAUSHERR
|
||||
- Cas
|
||||
- Dusan Kasan
|
||||
- Myke79
|
||||
- Brian Debuire
|
||||
- Piers Warmers
|
||||
- Sylvain Lorinet
|
||||
- klyk50
|
||||
- Andreas Lutro
|
||||
@ -1078,6 +1104,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Johannes
|
||||
- Jörg Rühl
|
||||
- wesleyh
|
||||
- sergey
|
||||
- Michael Genereux
|
||||
- patrick-mcdougle
|
||||
- Dariusz Czech
|
||||
@ -1088,11 +1115,11 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Steve Müller
|
||||
- Andras Ratz
|
||||
- andreabreu98
|
||||
- Thomas Schulz
|
||||
- Michael Schneider
|
||||
- n-aleha
|
||||
- Kaipi Yann
|
||||
- Sam Williams
|
||||
- Adrian Philipp
|
||||
- James Michael DuPont
|
||||
- Tammy D
|
||||
- Ondrej Slinták
|
||||
@ -1101,6 +1128,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Brian Freytag
|
||||
- Skorney
|
||||
- mieszko4
|
||||
- Arrilot
|
||||
- Markus Staab
|
||||
- Pierre-Louis LAUNAY
|
||||
- djama
|
||||
@ -1120,6 +1148,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- dinitrol
|
||||
- Penny Leach
|
||||
- g123456789l
|
||||
- Giorgio Premi
|
||||
- oscartv
|
||||
- DanSync
|
||||
- Peter Zwosta
|
||||
@ -1130,6 +1159,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Karolis Daužickas
|
||||
- tirnanog06
|
||||
- phc
|
||||
- Дмитрий Пацура
|
||||
- ilyes kooli
|
||||
- Matthias Althaus
|
||||
- Michaël VEROUX
|
||||
@ -1168,7 +1198,6 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Jorge Maiden (jorgemaiden)
|
||||
- Justin Rainbow (jrainbow)
|
||||
- JuntaTom (juntatom)
|
||||
- Johnson Page (jwpage)
|
||||
- Ismail Faizi (kanafghan)
|
||||
- Sébastien Armand (khepin)
|
||||
- Krzysztof Menżyk (krymen)
|
||||
@ -1190,6 +1219,7 @@ Symfony is the result of the work of many people who made the code better
|
||||
- Daniel Perez Pinazo (pitiflautico)
|
||||
- Rich Sage (richsage)
|
||||
- Ruud Kamphuis (ruudk)
|
||||
- Bart Ruysseveldt (ruyss)
|
||||
- scourgen hung (scourgen)
|
||||
- Sebastian Busch (sebu)
|
||||
- André Filipe Gonçalves Neves (seven)
|
||||
|
@ -218,10 +218,8 @@ class EntityChoiceList extends ObjectChoiceList
|
||||
if (!$this->loaded) {
|
||||
// Optimize performance in case we have an entity loader and
|
||||
// a single-field identifier
|
||||
if ($this->idAsValue) {
|
||||
$unorderedEntities = $this->entityLoader
|
||||
? $this->entityLoader->getEntitiesByIds($this->idField, $values)
|
||||
: $this->em->getRepository($this->class)->findBy(array($this->idField => $values));
|
||||
if ($this->idAsValue && $this->entityLoader) {
|
||||
$unorderedEntities = $this->entityLoader->getEntitiesByIds($this->idField, $values);
|
||||
$entitiesByValue = array();
|
||||
$entities = array();
|
||||
|
||||
|
@ -66,9 +66,11 @@ abstract class DoctrineType extends AbstractType
|
||||
$type = $this;
|
||||
|
||||
$loader = function (Options $options) use ($type) {
|
||||
if (null !== $options['query_builder']) {
|
||||
return $type->getLoader($options['em'], $options['query_builder'], $options['class']);
|
||||
}
|
||||
$queryBuilder = (null !== $options['query_builder'])
|
||||
? $options['query_builder']
|
||||
: $options['em']->getRepository($options['class'])->createQueryBuilder('e');
|
||||
|
||||
return $type->getLoader($options['em'], $queryBuilder, $options['class']);
|
||||
};
|
||||
|
||||
$choiceList = function (Options $options) use (&$choiceListCache, $propertyAccessor) {
|
||||
|
@ -85,10 +85,10 @@ class EntityUserProvider implements UserProviderInterface
|
||||
// That's the case when the user has been changed by a form with
|
||||
// validation errors.
|
||||
if (!$id = $this->metadata->getIdentifierValues($user)) {
|
||||
throw new \InvalidArgumentException("You cannot refresh a user ".
|
||||
"from the EntityUserProvider that does not contain an identifier. ".
|
||||
"The user object has to be serialized with its own identifier ".
|
||||
"mapped by Doctrine."
|
||||
throw new \InvalidArgumentException('You cannot refresh a user '.
|
||||
'from the EntityUserProvider that does not contain an identifier. '.
|
||||
'The user object has to be serialized with its own identifier '.
|
||||
'mapped by Doctrine.'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ class DoctrineDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(0, $c->getQueryCount());
|
||||
|
||||
$queries = array(
|
||||
array('sql' => "SELECT * FROM table1", 'params' => array(), 'types' => array(), 'executionMS' => 0),
|
||||
array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 0),
|
||||
);
|
||||
$c = $this->createCollector($queries);
|
||||
$c->collect(new Request(), new Response());
|
||||
@ -53,15 +53,15 @@ class DoctrineDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(0, $c->getTime());
|
||||
|
||||
$queries = array(
|
||||
array('sql' => "SELECT * FROM table1", 'params' => array(), 'types' => array(), 'executionMS' => 1),
|
||||
array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 1),
|
||||
);
|
||||
$c = $this->createCollector($queries);
|
||||
$c->collect(new Request(), new Response());
|
||||
$this->assertEquals(1, $c->getTime());
|
||||
|
||||
$queries = array(
|
||||
array('sql' => "SELECT * FROM table1", 'params' => array(), 'types' => array(), 'executionMS' => 1),
|
||||
array('sql' => "SELECT * FROM table2", 'params' => array(), 'types' => array(), 'executionMS' => 2),
|
||||
array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 1),
|
||||
array('sql' => 'SELECT * FROM table2', 'params' => array(), 'types' => array(), 'executionMS' => 2),
|
||||
);
|
||||
$c = $this->createCollector($queries);
|
||||
$c->collect(new Request(), new Response());
|
||||
@ -74,7 +74,7 @@ class DoctrineDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||
public function testCollectQueries($param, $types, $expected, $explainable)
|
||||
{
|
||||
$queries = array(
|
||||
array('sql' => "SELECT * FROM table1 WHERE field1 = ?1", 'params' => array($param), 'types' => $types, 'executionMS' => 1),
|
||||
array('sql' => 'SELECT * FROM table1 WHERE field1 = ?1', 'params' => array($param), 'types' => $types, 'executionMS' => 1),
|
||||
);
|
||||
$c = $this->createCollector($queries);
|
||||
$c->collect(new Request(), new Response());
|
||||
@ -90,7 +90,7 @@ class DoctrineDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||
public function testSerialization($param, $types, $expected, $explainable)
|
||||
{
|
||||
$queries = array(
|
||||
array('sql' => "SELECT * FROM table1 WHERE field1 = ?1", 'params' => array($param), 'types' => $types, 'executionMS' => 1),
|
||||
array('sql' => 'SELECT * FROM table1 WHERE field1 = ?1', 'params' => array($param), 'types' => $types, 'executionMS' => 1),
|
||||
);
|
||||
$c = $this->createCollector($queries);
|
||||
$c->collect(new Request(), new Response());
|
||||
|
@ -250,11 +250,11 @@ class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
|
||||
'message' => 'myMessage',
|
||||
'fields' => array('name', 'name2'),
|
||||
'em' => self::EM_NAME,
|
||||
'errorPath' => "name2",
|
||||
'errorPath' => 'name2',
|
||||
));
|
||||
|
||||
$entity1 = new DoubleNameEntity(1, 'Foo', "Bar");
|
||||
$entity2 = new DoubleNameEntity(2, 'Foo', "Bar");
|
||||
$entity1 = new DoubleNameEntity(1, 'Foo', 'Bar');
|
||||
$entity2 = new DoubleNameEntity(2, 'Foo', 'Bar');
|
||||
|
||||
$this->validator->validate($entity1, $constraint);
|
||||
|
||||
@ -405,7 +405,7 @@ class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
|
||||
'em' => self::EM_NAME,
|
||||
));
|
||||
|
||||
$composite = new CompositeIntIdEntity(1, 1, "test");
|
||||
$composite = new CompositeIntIdEntity(1, 1, 'test');
|
||||
$associated = new AssociationEntity();
|
||||
$associated->composite = $composite;
|
||||
|
||||
|
@ -102,8 +102,8 @@ class UniqueEntityValidator extends ConstraintValidator
|
||||
|
||||
if (count($relatedId) > 1) {
|
||||
throw new ConstraintDefinitionException(
|
||||
"Associated entities are not allowed to have more than one identifier field to be ".
|
||||
"part of a unique constraint in: ".$class->getName()."#".$fieldName
|
||||
'Associated entities are not allowed to have more than one identifier field to be '.
|
||||
'part of a unique constraint in: '.$class->getName().'#'.$fieldName
|
||||
);
|
||||
}
|
||||
$criteria[$fieldName] = array_pop($relatedId);
|
||||
|
@ -51,7 +51,7 @@ class PropelDataCollectorTest extends Propel1TestCase
|
||||
{
|
||||
$queries = array(
|
||||
"time: 0.000 sec | mem: 1.4 MB | connection: default | SET NAMES 'utf8'",
|
||||
"time: 0.012 sec | mem: 2.4 MB | connection: default | SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12",
|
||||
'time: 0.012 sec | mem: 2.4 MB | connection: default | SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12',
|
||||
"time: 0.012 sec | mem: 2.4 MB | connection: default | INSERT INTO `table` (`some_array`) VALUES ('| 1 | 2 | 3 |')",
|
||||
);
|
||||
|
||||
@ -66,7 +66,7 @@ class PropelDataCollectorTest extends Propel1TestCase
|
||||
'memory' => '1.4 MB',
|
||||
),
|
||||
array(
|
||||
'sql' => "SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12",
|
||||
'sql' => 'SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12',
|
||||
'time' => '0.012 sec',
|
||||
'connection' => 'default',
|
||||
'memory' => '2.4 MB',
|
||||
|
@ -65,7 +65,7 @@ class CodeExtension extends \Twig_Extension
|
||||
{
|
||||
if (false !== strpos($method, '::')) {
|
||||
list($class, $method) = explode('::', $method, 2);
|
||||
$result = sprintf("%s::%s()", $this->abbrClass($class), $method);
|
||||
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
|
||||
} elseif ('Closure' === $method) {
|
||||
$result = sprintf("<abbr title=\"%s\">%s</abbr>", $method, $method);
|
||||
} else {
|
||||
@ -91,7 +91,7 @@ class CodeExtension extends \Twig_Extension
|
||||
$short = array_pop($parts);
|
||||
$formattedValue = sprintf("<em>object</em>(<abbr title=\"%s\">%s</abbr>)", $item[1], $short);
|
||||
} elseif ('array' === $item[0]) {
|
||||
$formattedValue = sprintf("<em>array</em>(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
|
||||
$formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
|
||||
} elseif ('string' === $item[0]) {
|
||||
$formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES, $this->charset));
|
||||
} elseif ('null' === $item[0]) {
|
||||
|
@ -101,6 +101,6 @@ class SearchAndRenderBlockNode extends \Twig_Node_Expression_Function
|
||||
}
|
||||
}
|
||||
|
||||
$compiler->raw(")");
|
||||
$compiler->raw(')');
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class CodeHelper extends Helper
|
||||
{
|
||||
if (false !== strpos($method, '::')) {
|
||||
list($class, $method) = explode('::', $method, 2);
|
||||
$result = sprintf("%s::%s()", $this->abbrClass($class), $method);
|
||||
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
|
||||
} elseif ('Closure' === $method) {
|
||||
$result = sprintf("<abbr title=\"%s\">%s</abbr>", $method, $method);
|
||||
} else {
|
||||
@ -88,7 +88,7 @@ class CodeHelper extends Helper
|
||||
$short = array_pop($parts);
|
||||
$formattedValue = sprintf("<em>object</em>(<abbr title=\"%s\">%s</abbr>)", $item[1], $short);
|
||||
} elseif ('array' === $item[0]) {
|
||||
$formattedValue = sprintf("<em>array</em>(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
|
||||
$formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
|
||||
} elseif ('string' === $item[0]) {
|
||||
$formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES, $this->getCharset()));
|
||||
} elseif ('null' === $item[0]) {
|
||||
|
@ -155,30 +155,30 @@ class RedirectControllerTest extends TestCase
|
||||
{
|
||||
return array(
|
||||
// Standard ports
|
||||
array('http', null, null, 'http', 80, ""),
|
||||
array('http', 80, null, 'http', 80, ""),
|
||||
array('https', null, null, 'http', 80, ""),
|
||||
array('https', 80, null, 'http', 80, ""),
|
||||
array('http', null, null, 'http', 80, ''),
|
||||
array('http', 80, null, 'http', 80, ''),
|
||||
array('https', null, null, 'http', 80, ''),
|
||||
array('https', 80, null, 'http', 80, ''),
|
||||
|
||||
array('http', null, null, 'https', 443, ""),
|
||||
array('http', null, 443, 'https', 443, ""),
|
||||
array('https', null, null, 'https', 443, ""),
|
||||
array('https', null, 443, 'https', 443, ""),
|
||||
array('http', null, null, 'https', 443, ''),
|
||||
array('http', null, 443, 'https', 443, ''),
|
||||
array('https', null, null, 'https', 443, ''),
|
||||
array('https', null, 443, 'https', 443, ''),
|
||||
|
||||
// Non-standard ports
|
||||
array('http', null, null, 'http', 8080, ":8080"),
|
||||
array('http', 4080, null, 'http', 8080, ":4080"),
|
||||
array('http', 80, null, 'http', 8080, ""),
|
||||
array('https', null, null, 'http', 8080, ""),
|
||||
array('https', null, 8443, 'http', 8080, ":8443"),
|
||||
array('https', null, 443, 'http', 8080, ""),
|
||||
array('http', null, null, 'http', 8080, ':8080'),
|
||||
array('http', 4080, null, 'http', 8080, ':4080'),
|
||||
array('http', 80, null, 'http', 8080, ''),
|
||||
array('https', null, null, 'http', 8080, ''),
|
||||
array('https', null, 8443, 'http', 8080, ':8443'),
|
||||
array('https', null, 443, 'http', 8080, ''),
|
||||
|
||||
array('https', null, null, 'https', 8443, ":8443"),
|
||||
array('https', null, 4443, 'https', 8443, ":4443"),
|
||||
array('https', null, 443, 'https', 8443, ""),
|
||||
array('http', null, null, 'https', 8443, ""),
|
||||
array('http', 8080, 4443, 'https', 8443, ":8080"),
|
||||
array('http', 80, 4443, 'https', 8443, ""),
|
||||
array('https', null, null, 'https', 8443, ':8443'),
|
||||
array('https', null, 4443, 'https', 8443, ':4443'),
|
||||
array('https', null, 443, 'https', 8443, ''),
|
||||
array('http', null, null, 'https', 8443, ''),
|
||||
array('http', 8080, 4443, 'https', 8443, ':8080'),
|
||||
array('http', 80, 4443, 'https', 8443, ''),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,7 @@ abstract class FrameworkExtensionTest extends TestCase
|
||||
|
||||
public function testValidationPaths()
|
||||
{
|
||||
require_once __DIR__."/Fixtures/TestBundle/TestBundle.php";
|
||||
require_once __DIR__.'/Fixtures/TestBundle/TestBundle.php';
|
||||
|
||||
$container = $this->createContainerFromFile('validation_annotations', array(
|
||||
'kernel.bundles' => array('TestBundle' => 'Symfony\Bundle\FrameworkBundle\Tests\TestBundle'),
|
||||
|
@ -65,7 +65,7 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
|
||||
protected function renderEnctype(FormView $view)
|
||||
{
|
||||
if (!method_exists($form = $this->engine->get('form'), 'enctype')) {
|
||||
$this->markTestSkipped(sprintf("Deprecated method %s->enctype() is not implemented.", get_class($form)));
|
||||
$this->markTestSkipped(sprintf('Deprecated method %s->enctype() is not implemented.', get_class($form)));
|
||||
}
|
||||
|
||||
return (string) $form->enctype($view);
|
||||
|
@ -66,7 +66,7 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
|
||||
protected function renderEnctype(FormView $view)
|
||||
{
|
||||
if (!method_exists($form = $this->engine->get('form'), 'enctype')) {
|
||||
$this->markTestSkipped(sprintf("Deprecated method %s->enctype() is not implemented.", get_class($form)));
|
||||
$this->markTestSkipped(sprintf('Deprecated method %s->enctype() is not implemented.', get_class($form)));
|
||||
}
|
||||
|
||||
return (string) $form->enctype($view);
|
||||
|
@ -42,8 +42,8 @@ EOF;
|
||||
"double-quoted key with whitespace and escaped \$\n\" sequences" => "prefixdouble-quoted key with whitespace and escaped \$\n\" sequences",
|
||||
'single-quoted key with whitespace and nonescaped \$\n\' sequences' => 'prefixsingle-quoted key with whitespace and nonescaped \$\n\' sequences',
|
||||
'single-quoted key with "quote mark at the end"' => 'prefixsingle-quoted key with "quote mark at the end"',
|
||||
$expectedHeredoc => "prefix".$expectedHeredoc,
|
||||
$expectedNowdoc => "prefix".$expectedNowdoc,
|
||||
$expectedHeredoc => 'prefix'.$expectedHeredoc,
|
||||
$expectedNowdoc => 'prefix'.$expectedNowdoc,
|
||||
'{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples' => 'prefix{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
|
||||
));
|
||||
$actualCatalogue = $catalogue->all();
|
||||
|
@ -69,8 +69,8 @@ class SecurityRoutingIntegrationTest extends WebTestCase
|
||||
*/
|
||||
public function testSecurityConfigurationForSingleIPAddress($config)
|
||||
{
|
||||
$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array("REMOTE_ADDR" => "10.10.10.10"));
|
||||
$barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array("REMOTE_ADDR" => "10.10.20.10"));
|
||||
$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '10.10.10.10'));
|
||||
$barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '10.10.20.10'));
|
||||
|
||||
$this->assertAllowed($allowedClient, '/secured-by-one-ip');
|
||||
$this->assertRestricted($barredClient, '/secured-by-one-ip');
|
||||
@ -82,9 +82,9 @@ class SecurityRoutingIntegrationTest extends WebTestCase
|
||||
*/
|
||||
public function testSecurityConfigurationForMultipleIPAddresses($config)
|
||||
{
|
||||
$allowedClientA = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array("REMOTE_ADDR" => "1.1.1.1"));
|
||||
$allowedClientB = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array("REMOTE_ADDR" => "2.2.2.2"));
|
||||
$barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array("REMOTE_ADDR" => "192.168.1.1"));
|
||||
$allowedClientA = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '1.1.1.1'));
|
||||
$allowedClientB = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '2.2.2.2'));
|
||||
$barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '192.168.1.1'));
|
||||
|
||||
$this->assertAllowed($allowedClientA, '/secured-by-two-ips');
|
||||
$this->assertAllowed($allowedClientB, '/secured-by-two-ips');
|
||||
|
@ -76,7 +76,7 @@ class FileLoaderLoadException extends \Exception
|
||||
$a[] = sprintf('%s => %s', $k, $this->varToString($v));
|
||||
}
|
||||
|
||||
return sprintf("Array(%s)", implode(', ', $a));
|
||||
return sprintf('Array(%s)', implode(', ', $a));
|
||||
}
|
||||
|
||||
if (is_resource($var)) {
|
||||
|
@ -45,7 +45,7 @@ class ExampleConfiguration implements ConfigurationInterface
|
||||
->info(
|
||||
"this is a long\n".
|
||||
"multi-line info text\n".
|
||||
"which should be indented"
|
||||
'which should be indented'
|
||||
)
|
||||
->example('example setting')
|
||||
->end()
|
||||
|
@ -723,15 +723,15 @@ class Application
|
||||
$output->writeln(sprintf(' %s%s%s() at <info>%s:%s</info>', $class, $type, $function, $file, $line));
|
||||
}
|
||||
|
||||
$output->writeln("");
|
||||
$output->writeln("");
|
||||
$output->writeln('');
|
||||
$output->writeln('');
|
||||
}
|
||||
} while ($e = $e->getPrevious());
|
||||
|
||||
if (null !== $this->runningCommand) {
|
||||
$output->writeln(sprintf('<info>%s</info>', sprintf($this->runningCommand->getSynopsis(), $this->getName())));
|
||||
$output->writeln("");
|
||||
$output->writeln("");
|
||||
$output->writeln('');
|
||||
$output->writeln('');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,14 +56,14 @@ class DialogHelper extends InputAwareHelper
|
||||
|
||||
$result = $this->askAndValidate($output, '> ', function ($picked) use ($choices, $errorMessage, $multiselect) {
|
||||
// Collapse all spaces.
|
||||
$selectedChoices = str_replace(" ", "", $picked);
|
||||
$selectedChoices = str_replace(' ', '', $picked);
|
||||
|
||||
if ($multiselect) {
|
||||
// Check for a separated comma values
|
||||
if (!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) {
|
||||
throw new \InvalidArgumentException(sprintf($errorMessage, $picked));
|
||||
}
|
||||
$selectedChoices = explode(",", $selectedChoices);
|
||||
$selectedChoices = explode(',', $selectedChoices);
|
||||
} else {
|
||||
$selectedChoices = array($picked);
|
||||
}
|
||||
|
@ -18,12 +18,12 @@ class Foo3Command extends Command
|
||||
{
|
||||
try {
|
||||
try {
|
||||
throw new \Exception("First exception <p>this is html</p>");
|
||||
throw new \Exception('First exception <p>this is html</p>');
|
||||
} catch (\Exception $e) {
|
||||
throw new \Exception("Second exception <comment>comment</comment>", 0, $e);
|
||||
throw new \Exception('Second exception <comment>comment</comment>', 0, $e);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw new \Exception("Third exception <fg=blue;bg=red>comment</>", 0, $e);
|
||||
throw new \Exception('Third exception <fg=blue;bg=red>comment</>', 0, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,15 +19,15 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
public function testEmptyTag()
|
||||
{
|
||||
$formatter = new OutputFormatter(true);
|
||||
$this->assertEquals("foo<>bar", $formatter->format('foo<>bar'));
|
||||
$this->assertEquals('foo<>bar', $formatter->format('foo<>bar'));
|
||||
}
|
||||
|
||||
public function testLGCharEscaping()
|
||||
{
|
||||
$formatter = new OutputFormatter(true);
|
||||
|
||||
$this->assertEquals("foo<bar", $formatter->format('foo\\<bar'));
|
||||
$this->assertEquals("<info>some info</info>", $formatter->format('\\<info>some info\\</info>'));
|
||||
$this->assertEquals('foo<bar', $formatter->format('foo\\<bar'));
|
||||
$this->assertEquals('<info>some info</info>', $formatter->format('\\<info>some info\\</info>'));
|
||||
$this->assertEquals("\\<info>some info\\</info>", OutputFormatter::escape('<info>some info</info>'));
|
||||
|
||||
$this->assertEquals(
|
||||
@ -176,16 +176,16 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertTrue($formatter->hasStyle('question'));
|
||||
|
||||
$this->assertEquals(
|
||||
"some error", $formatter->format('<error>some error</error>')
|
||||
'some error', $formatter->format('<error>some error</error>')
|
||||
);
|
||||
$this->assertEquals(
|
||||
"some info", $formatter->format('<info>some info</info>')
|
||||
'some info', $formatter->format('<info>some info</info>')
|
||||
);
|
||||
$this->assertEquals(
|
||||
"some comment", $formatter->format('<comment>some comment</comment>')
|
||||
'some comment', $formatter->format('<comment>some comment</comment>')
|
||||
);
|
||||
$this->assertEquals(
|
||||
"some question", $formatter->format('<question>some question</question>')
|
||||
'some question', $formatter->format('<question>some question</question>')
|
||||
);
|
||||
|
||||
$formatter->setDecorated(true);
|
||||
|
@ -181,10 +181,10 @@ TABLE
|
||||
array(
|
||||
array('ISBN', 'Title', 'Author'),
|
||||
array(
|
||||
array("99921-58-10-7", "Divine\nComedy", "Dante Alighieri"),
|
||||
array("9971-5-0210-2", "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."),
|
||||
array("9971-5-0210-2", "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."),
|
||||
array("960-425-059-0", "The Lord of the Rings", "J. R. R.\nTolkien"),
|
||||
array('99921-58-10-7', "Divine\nComedy", 'Dante Alighieri'),
|
||||
array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."),
|
||||
array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."),
|
||||
array('960-425-059-0', 'The Lord of the Rings', "J. R. R.\nTolkien"),
|
||||
),
|
||||
TableHelper::LAYOUT_DEFAULT,
|
||||
<<<TABLE
|
||||
|
@ -81,8 +81,8 @@ class StringInputTest extends \PHPUnit_Framework_TestCase
|
||||
array('--long-option="foo bar"', array('--long-option=foo bar'), '->tokenize() parses long options with a value'),
|
||||
array('--long-option="foo bar""another"', array('--long-option=foo baranother'), '->tokenize() parses long options with a value'),
|
||||
array('--long-option=\'foo bar\'', array('--long-option=foo bar'), '->tokenize() parses long options with a value'),
|
||||
array("--long-option='foo bar''another'", array("--long-option=foo baranother"), '->tokenize() parses long options with a value'),
|
||||
array("--long-option='foo bar'\"another\"", array("--long-option=foo baranother"), '->tokenize() parses long options with a value'),
|
||||
array("--long-option='foo bar''another'", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'),
|
||||
array("--long-option='foo bar'\"another\"", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'),
|
||||
array('foo -a -ffoo --long bar', array('foo', '-a', '-ffoo', '--long', 'bar'), '->tokenize() parses when several arguments and options'),
|
||||
);
|
||||
}
|
||||
|
@ -19,6 +19,6 @@ namespace Symfony\Component\CssSelector\Exception;
|
||||
*
|
||||
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
|
||||
*/
|
||||
class ExpressionErrorException extends ParseException implements ExceptionInterface
|
||||
class ExpressionErrorException extends ParseException
|
||||
{
|
||||
}
|
||||
|
@ -19,6 +19,6 @@ namespace Symfony\Component\CssSelector\Exception;
|
||||
*
|
||||
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
|
||||
*/
|
||||
class InternalErrorException extends ParseException implements ExceptionInterface
|
||||
class InternalErrorException extends ParseException
|
||||
{
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ use Symfony\Component\CssSelector\Parser\Token;
|
||||
*
|
||||
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
|
||||
*/
|
||||
class SyntaxErrorException extends ParseException implements ExceptionInterface
|
||||
class SyntaxErrorException extends ParseException
|
||||
{
|
||||
/**
|
||||
* @param string $expectedValue
|
||||
|
@ -37,23 +37,23 @@ class CssSelectorTest extends \PHPUnit_Framework_TestCase
|
||||
$this->fail('->parse() throws an Exception if the css selector is not valid');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceOf('\Symfony\Component\CssSelector\Exception\ParseException', $e, '->parse() throws an Exception if the css selector is not valid');
|
||||
$this->assertEquals("Expected identifier, but <eof at 3> found.", $e->getMessage(), '->parse() throws an Exception if the css selector is not valid');
|
||||
$this->assertEquals('Expected identifier, but <eof at 3> found.', $e->getMessage(), '->parse() throws an Exception if the css selector is not valid');
|
||||
}
|
||||
}
|
||||
|
||||
public function getCssToXPathWithoutPrefixTestData()
|
||||
{
|
||||
return array(
|
||||
array('h1', "h1"),
|
||||
array('foo|h1', "foo:h1"),
|
||||
array('h1, h2, h3', "h1 | h2 | h3"),
|
||||
array('h1', 'h1'),
|
||||
array('foo|h1', 'foo:h1'),
|
||||
array('h1, h2, h3', 'h1 | h2 | h3'),
|
||||
array('h1:nth-child(3n+1)', "*/*[name() = 'h1' and (position() - 1 >= 0 and (position() - 1) mod 3 = 0)]"),
|
||||
array('h1 > p', "h1/p"),
|
||||
array('h1 > p', 'h1/p'),
|
||||
array('h1#foo', "h1[@id = 'foo']"),
|
||||
array('h1.foo', "h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"),
|
||||
array('h1[class*="foo bar"]', "h1[@class and contains(@class, 'foo bar')]"),
|
||||
array('h1[foo|class*="foo bar"]', "h1[@foo:class and contains(@foo:class, 'foo bar')]"),
|
||||
array('h1[class]', "h1[@class]"),
|
||||
array('h1[class]', 'h1[@class]'),
|
||||
array('h1 .foo', "h1/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"),
|
||||
array('h1 #foo', "h1/descendant-or-self::*/*[@id = 'foo']"),
|
||||
array('h1 [class*=foo]', "h1/descendant-or-self::*/*[@class and contains(@class, 'foo')]"),
|
||||
|
@ -90,12 +90,12 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
|
||||
public function getCssToXPathTestData()
|
||||
{
|
||||
return array(
|
||||
array('*', "*"),
|
||||
array('e', "e"),
|
||||
array('*|e', "e"),
|
||||
array('e|f', "e:f"),
|
||||
array('e[foo]', "e[@foo]"),
|
||||
array('e[foo|bar]', "e[@foo:bar]"),
|
||||
array('*', '*'),
|
||||
array('e', 'e'),
|
||||
array('*|e', 'e'),
|
||||
array('e|f', 'e:f'),
|
||||
array('e[foo]', 'e[@foo]'),
|
||||
array('e[foo|bar]', 'e[@foo:bar]'),
|
||||
array('e[foo="bar"]', "e[@foo = 'bar']"),
|
||||
array('e[foo~="bar"]', "e[@foo and contains(concat(' ', normalize-space(@foo), ' '), ' bar ')]"),
|
||||
array('e[foo^="bar"]', "e[@foo and starts-with(@foo, 'bar')]"),
|
||||
@ -105,29 +105,29 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
|
||||
array('e:nth-child(1)', "*/*[name() = 'e' and (position() = 1)]"),
|
||||
array('e:nth-last-child(1)', "*/*[name() = 'e' and (position() = last() - 0)]"),
|
||||
array('e:nth-last-child(2n+2)', "*/*[name() = 'e' and (last() - position() - 1 >= 0 and (last() - position() - 1) mod 2 = 0)]"),
|
||||
array('e:nth-of-type(1)', "*/e[position() = 1]"),
|
||||
array('e:nth-last-of-type(1)', "*/e[position() = last() - 0]"),
|
||||
array('e:nth-of-type(1)', '*/e[position() = 1]'),
|
||||
array('e:nth-last-of-type(1)', '*/e[position() = last() - 0]'),
|
||||
array('div e:nth-last-of-type(1) .aclass', "div/descendant-or-self::*/e[position() = last() - 0]/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' aclass ')]"),
|
||||
array('e:first-child', "*/*[name() = 'e' and (position() = 1)]"),
|
||||
array('e:last-child', "*/*[name() = 'e' and (position() = last())]"),
|
||||
array('e:first-of-type', "*/e[position() = 1]"),
|
||||
array('e:last-of-type', "*/e[position() = last()]"),
|
||||
array('e:first-of-type', '*/e[position() = 1]'),
|
||||
array('e:last-of-type', '*/e[position() = last()]'),
|
||||
array('e:only-child', "*/*[name() = 'e' and (last() = 1)]"),
|
||||
array('e:only-of-type', "e[last() = 1]"),
|
||||
array('e:empty', "e[not(*) and not(string-length())]"),
|
||||
array('e:EmPTY', "e[not(*) and not(string-length())]"),
|
||||
array('e:root', "e[not(parent::*)]"),
|
||||
array('e:hover', "e[0]"),
|
||||
array('e:only-of-type', 'e[last() = 1]'),
|
||||
array('e:empty', 'e[not(*) and not(string-length())]'),
|
||||
array('e:EmPTY', 'e[not(*) and not(string-length())]'),
|
||||
array('e:root', 'e[not(parent::*)]'),
|
||||
array('e:hover', 'e[0]'),
|
||||
array('e:contains("foo")', "e[contains(string(.), 'foo')]"),
|
||||
array('e:ConTains(foo)', "e[contains(string(.), 'foo')]"),
|
||||
array('e.warning', "e[@class and contains(concat(' ', normalize-space(@class), ' '), ' warning ')]"),
|
||||
array('e#myid', "e[@id = 'myid']"),
|
||||
array('e:not(:nth-child(odd))', "e[not(position() - 1 >= 0 and (position() - 1) mod 2 = 0)]"),
|
||||
array('e:nOT(*)', "e[0]"),
|
||||
array('e f', "e/descendant-or-self::*/f"),
|
||||
array('e > f', "e/f"),
|
||||
array('e:not(:nth-child(odd))', 'e[not(position() - 1 >= 0 and (position() - 1) mod 2 = 0)]'),
|
||||
array('e:nOT(*)', 'e[0]'),
|
||||
array('e f', 'e/descendant-or-self::*/f'),
|
||||
array('e > f', 'e/f'),
|
||||
array('e + f', "e/following-sibling::*[name() = 'f' and (position() = 1)]"),
|
||||
array('e ~ f', "e/following-sibling::f"),
|
||||
array('e ~ f', 'e/following-sibling::f'),
|
||||
array('div#container p', "div[@id = 'container']/descendant-or-self::*/p"),
|
||||
);
|
||||
}
|
||||
|
@ -98,9 +98,9 @@ class HtmlExtension extends AbstractExtension
|
||||
public function translateDisabled(XPathExpr $xpath)
|
||||
{
|
||||
return $xpath->addCondition(
|
||||
"("
|
||||
."@disabled and"
|
||||
."("
|
||||
'('
|
||||
.'@disabled and'
|
||||
.'('
|
||||
."(name(.) = 'input' and @type != 'hidden')"
|
||||
." or name(.) = 'button'"
|
||||
." or name(.) = 'select'"
|
||||
@ -109,14 +109,14 @@ class HtmlExtension extends AbstractExtension
|
||||
." or name(.) = 'fieldset'"
|
||||
." or name(.) = 'optgroup'"
|
||||
." or name(.) = 'option'"
|
||||
.")"
|
||||
.") or ("
|
||||
.')'
|
||||
.') or ('
|
||||
."(name(.) = 'input' and @type != 'hidden')"
|
||||
." or name(.) = 'button'"
|
||||
." or name(.) = 'select'"
|
||||
." or name(.) = 'textarea'"
|
||||
.")"
|
||||
." and ancestor::fieldset[@disabled]"
|
||||
.')'
|
||||
.' and ancestor::fieldset[@disabled]'
|
||||
);
|
||||
// todo: in the second half, add "and is not a descendant of that fieldset element's first legend element child, if any."
|
||||
}
|
||||
@ -150,10 +150,10 @@ class HtmlExtension extends AbstractExtension
|
||||
." or name(.) = 'textarea'"
|
||||
." or name(.) = 'keygen'"
|
||||
.')'
|
||||
." and not (@disabled or ancestor::fieldset[@disabled])"
|
||||
.' and not (@disabled or ancestor::fieldset[@disabled])'
|
||||
.') or ('
|
||||
."name(.) = 'option' and not("
|
||||
."@disabled or ancestor::optgroup[@disabled]"
|
||||
.'@disabled or ancestor::optgroup[@disabled]'
|
||||
.')'
|
||||
.')'
|
||||
);
|
||||
|
@ -400,9 +400,9 @@ EOF;
|
||||
$result = array();
|
||||
foreach ($args as $key => $item) {
|
||||
if ('object' === $item[0]) {
|
||||
$formattedValue = sprintf("<em>object</em>(%s)", $this->formatClass($item[1]));
|
||||
$formattedValue = sprintf('<em>object</em>(%s)', $this->formatClass($item[1]));
|
||||
} elseif ('array' === $item[0]) {
|
||||
$formattedValue = sprintf("<em>array</em>(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
|
||||
$formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
|
||||
} elseif ('string' === $item[0]) {
|
||||
$formattedValue = sprintf("'%s'", $this->escapeHtml($item[1]));
|
||||
} elseif ('null' === $item[0]) {
|
||||
|
@ -55,10 +55,10 @@ class MergeExtensionConfigurationPass implements CompilerPassInterface
|
||||
$extension->load($config, $tmpContainer);
|
||||
|
||||
$container->merge($tmpContainer);
|
||||
$container->getParameterBag()->add($parameters);
|
||||
}
|
||||
|
||||
$container->addDefinitions($definitions);
|
||||
$container->addAliases($aliases);
|
||||
$container->getParameterBag()->add($parameters);
|
||||
}
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ class GraphvizDumper extends Dumper
|
||||
foreach ($container->getServiceIds() as $id) {
|
||||
$service = $container->get($id);
|
||||
|
||||
if (in_array($id, array_keys($container->getAliases()))) {
|
||||
if (array_key_exists($id, $container->getAliases())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -560,7 +560,7 @@ class PhpDumper extends Dumper
|
||||
if ($definition->isSynthetic()) {
|
||||
$return[] = '@throws RuntimeException always since this service is expected to be injected dynamically';
|
||||
} elseif ($class = $definition->getClass()) {
|
||||
$return[] = sprintf("@return %s A %s instance.", 0 === strpos($class, '%') ? 'object' : "\\".$class, $class);
|
||||
$return[] = sprintf('@return %s A %s instance.', 0 === strpos($class, '%') ? 'object' : "\\".$class, $class);
|
||||
} elseif ($definition->getFactory()) {
|
||||
$factory = $definition->getFactory();
|
||||
if (is_string($factory)) {
|
||||
@ -1334,7 +1334,7 @@ EOF;
|
||||
} elseif (null !== $value->getFactoryService()) {
|
||||
$service = $this->dumpValue($value->getFactoryService());
|
||||
|
||||
return sprintf("%s->%s(%s)", 0 === strpos($service, '$') ? sprintf('$this->get(%s)', $service) : $this->getServiceCall($value->getFactoryService()), $value->getFactoryMethod(), implode(', ', $arguments));
|
||||
return sprintf('%s->%s(%s)', 0 === strpos($service, '$') ? sprintf('$this->get(%s)', $service) : $this->getServiceCall($value->getFactoryService()), $value->getFactoryMethod(), implode(', ', $arguments));
|
||||
} else {
|
||||
throw new RuntimeException('Cannot dump definitions which have factory method without factory service or factory class.');
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass;
|
||||
|
@ -48,8 +48,8 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase
|
||||
'.' => 'dot as a key',
|
||||
'.\'\'.' => 'concatenation as a key',
|
||||
'\'\'.' => 'concatenation from the start key',
|
||||
'optimize concatenation' => "string1%some_string%string2",
|
||||
'optimize concatenation with empty string' => "string1%empty_value%string2",
|
||||
'optimize concatenation' => 'string1%some_string%string2',
|
||||
'optimize concatenation with empty string' => 'string1%empty_value%string2',
|
||||
'optimize concatenation from the start' => '%empty_value%start',
|
||||
'optimize concatenation at the end' => 'end%empty_value%',
|
||||
));
|
||||
|
@ -260,31 +260,31 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testConvertDomElementToArray()
|
||||
{
|
||||
$doc = new \DOMDocument("1.0");
|
||||
$doc = new \DOMDocument('1.0');
|
||||
$doc->loadXML('<foo>bar</foo>');
|
||||
$this->assertEquals('bar', XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
|
||||
|
||||
$doc = new \DOMDocument("1.0");
|
||||
$doc = new \DOMDocument('1.0');
|
||||
$doc->loadXML('<foo foo="bar" />');
|
||||
$this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
|
||||
|
||||
$doc = new \DOMDocument("1.0");
|
||||
$doc = new \DOMDocument('1.0');
|
||||
$doc->loadXML('<foo><foo>bar</foo></foo>');
|
||||
$this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
|
||||
|
||||
$doc = new \DOMDocument("1.0");
|
||||
$doc = new \DOMDocument('1.0');
|
||||
$doc->loadXML('<foo><foo>bar<foo>bar</foo></foo></foo>');
|
||||
$this->assertEquals(array('foo' => array('value' => 'bar', 'foo' => 'bar')), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
|
||||
|
||||
$doc = new \DOMDocument("1.0");
|
||||
$doc = new \DOMDocument('1.0');
|
||||
$doc->loadXML('<foo><foo></foo></foo>');
|
||||
$this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
|
||||
|
||||
$doc = new \DOMDocument("1.0");
|
||||
$doc = new \DOMDocument('1.0');
|
||||
$doc->loadXML('<foo><foo><!-- foo --></foo></foo>');
|
||||
$this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
|
||||
|
||||
$doc = new \DOMDocument("1.0");
|
||||
$doc = new \DOMDocument('1.0');
|
||||
$doc->loadXML('<foo><foo foo="bar"/><foo foo="bar"/></foo>');
|
||||
$this->assertEquals(array('foo' => array(array('foo' => 'bar'), array('foo' => 'bar'))), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
|
||||
}
|
||||
|
@ -847,7 +847,7 @@ class Crawler extends \SplObjectStorage
|
||||
}
|
||||
}
|
||||
|
||||
return sprintf("concat(%s)", implode($parts, ', '));
|
||||
return sprintf('concat(%s)', implode($parts, ', '));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -176,7 +176,7 @@ class FormFieldRegistry
|
||||
private function walk(array $array, $base = '', array &$output = array())
|
||||
{
|
||||
foreach ($array as $k => $v) {
|
||||
$path = empty($base) ? $k : sprintf("%s[%s]", $base, $k);
|
||||
$path = empty($base) ? $k : sprintf('%s[%s]', $base, $k);
|
||||
if (is_array($v)) {
|
||||
$this->walk($v, $path, $output);
|
||||
} else {
|
||||
|
@ -417,7 +417,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
|
||||
public function testMultiselectSetValues()
|
||||
{
|
||||
$form = $this->createForm('<form><select multiple="multiple" name="multi"><option value="foo">foo</option><option value="bar">bar</option></select><input type="submit" /></form>');
|
||||
$form->setValues(array('multi' => array("foo", "bar")));
|
||||
$form->setValues(array('multi' => array('foo', 'bar')));
|
||||
$this->assertEquals(array('multi' => array('foo', 'bar')), $form->getValues(), '->setValue() sets the values of select');
|
||||
}
|
||||
|
||||
|
@ -43,10 +43,9 @@ class Filesystem
|
||||
|
||||
$this->mkdir(dirname($targetFile));
|
||||
|
||||
if (!$override && is_file($targetFile) && null === parse_url($originFile, PHP_URL_HOST)) {
|
||||
$doCopy = filemtime($originFile) > filemtime($targetFile);
|
||||
} else {
|
||||
$doCopy = true;
|
||||
if (!$override && null === parse_url($originFile, PHP_URL_HOST) && is_file($targetFile)) {
|
||||
$doCopy = filemtime($originFile) > filemtime($targetFile);
|
||||
}
|
||||
|
||||
if ($doCopy) {
|
||||
@ -303,16 +302,15 @@ class Filesystem
|
||||
}
|
||||
}
|
||||
|
||||
if (!$ok) {
|
||||
if (true !== @symlink($originDir, $targetDir)) {
|
||||
if (!$ok && true !== @symlink($originDir, $targetDir)) {
|
||||
$report = error_get_last();
|
||||
if (is_array($report)) {
|
||||
if ('\\' === DIRECTORY_SEPARATOR && false !== strpos($report['message'], 'error code(1314)')) {
|
||||
throw new IOException('Unable to create symlink due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?');
|
||||
}
|
||||
}
|
||||
throw new IOException(sprintf('Failed to create symbolic link from "%s" to "%s".', $originDir, $targetDir), 0, null, $targetDir);
|
||||
}
|
||||
throw new IOException(sprintf('Failed to create symbolic link from %s to %s', $originDir, $targetDir));
|
||||
}
|
||||
}
|
||||
|
||||
@ -351,9 +349,9 @@ class Filesystem
|
||||
$endPathRemainder = implode('/', array_slice($endPathArr, $index));
|
||||
|
||||
// Construct $endPath from traversing to the common path, then to the remaining $endPath
|
||||
$relativePath = $traverser.(strlen($endPathRemainder) > 0 ? $endPathRemainder.'/' : '');
|
||||
$relativePath = $traverser.('' !== $endPathRemainder ? $endPathRemainder.'/' : '');
|
||||
|
||||
return (strlen($relativePath) === 0) ? './' : $relativePath;
|
||||
return '' === $relativePath ? './' : $relativePath;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -392,7 +392,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
||||
$paths[] = $file->getRelativePath();
|
||||
}
|
||||
|
||||
$ref = array("", "", "", "", "foo", "");
|
||||
$ref = array('', '', '', '', 'foo', '');
|
||||
|
||||
sort($ref);
|
||||
sort($paths);
|
||||
@ -413,7 +413,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
||||
$paths[] = $file->getRelativePathname();
|
||||
}
|
||||
|
||||
$ref = array("test.php", "toto", "test.py", "foo", "foo".DIRECTORY_SEPARATOR."bar.tmp", "foo bar");
|
||||
$ref = array('test.php', 'toto', 'test.py', 'foo', 'foo'.DIRECTORY_SEPARATOR.'bar.tmp', 'foo bar');
|
||||
|
||||
sort($paths);
|
||||
sort($ref);
|
||||
|
@ -194,9 +194,7 @@ class Button implements \IteratorAggregate, FormInterface
|
||||
*
|
||||
* This method should not be invoked.
|
||||
*
|
||||
* @param string $modelData
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
* @param mixed $modelData
|
||||
*/
|
||||
public function setData($modelData)
|
||||
{
|
||||
|
@ -184,10 +184,10 @@ class NativeRequestHandler implements RequestHandlerInterface
|
||||
unset($files[$k]);
|
||||
}
|
||||
|
||||
foreach (array_keys($data['name']) as $key) {
|
||||
foreach ($data['name'] as $key => $name) {
|
||||
$files[$key] = self::fixPhpFilesArray(array(
|
||||
'error' => $data['error'][$key],
|
||||
'name' => $data['name'][$key],
|
||||
'name' => $name,
|
||||
'type' => $data['type'][$key],
|
||||
'tmp_name' => $data['tmp_name'][$key],
|
||||
'size' => $data['size'][$key],
|
||||
|
@ -18,7 +18,7 @@ class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testFixHttpUrl()
|
||||
{
|
||||
$data = "www.symfony.com";
|
||||
$data = 'www.symfony.com';
|
||||
$form = $this->getMock('Symfony\Component\Form\Test\FormInterface');
|
||||
$event = new FormEvent($form, $data);
|
||||
|
||||
@ -30,7 +30,7 @@ class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testSkipKnownUrl()
|
||||
{
|
||||
$data = "http://www.symfony.com";
|
||||
$data = 'http://www.symfony.com';
|
||||
$form = $this->getMock('Symfony\Component\Form\Test\FormInterface');
|
||||
$event = new FormEvent($form, $data);
|
||||
|
||||
@ -42,7 +42,7 @@ class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testSkipOtherProtocol()
|
||||
{
|
||||
$data = "ftp://www.symfony.com";
|
||||
$data = 'ftp://www.symfony.com';
|
||||
$form = $this->getMock('Symfony\Component\Form\Test\FormInterface');
|
||||
$event = new FormEvent($form, $data);
|
||||
|
||||
|
@ -18,7 +18,7 @@ class TrimListenerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testTrim()
|
||||
{
|
||||
$data = " Foo! ";
|
||||
$data = ' Foo! ';
|
||||
$form = $this->getMock('Symfony\Component\Form\Test\FormInterface');
|
||||
$event = new FormEvent($form, $data);
|
||||
|
||||
|
@ -63,7 +63,7 @@ class CsrfValidationListenerTest extends \PHPUnit_Framework_TestCase
|
||||
// https://github.com/symfony/symfony/pull/5838
|
||||
public function testStringFormData()
|
||||
{
|
||||
$data = "XP4HUzmHPi";
|
||||
$data = 'XP4HUzmHPi';
|
||||
$event = new FormEvent($this->form, $data);
|
||||
|
||||
$validation = new CsrfValidationListener('csrf', $this->tokenManager, 'unknown', 'Invalid.');
|
||||
|
@ -84,12 +84,12 @@ class Cookie
|
||||
$str = urlencode($this->getName()).'=';
|
||||
|
||||
if ('' === (string) $this->getValue()) {
|
||||
$str .= 'deleted; expires='.gmdate("D, d-M-Y H:i:s T", time() - 31536001);
|
||||
$str .= 'deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001);
|
||||
} else {
|
||||
$str .= urlencode($this->getValue());
|
||||
|
||||
if ($this->getExpiresTime() !== 0) {
|
||||
$str .= '; expires='.gmdate("D, d-M-Y H:i:s T", $this->getExpiresTime());
|
||||
$str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,10 +140,10 @@ class FileBag extends ParameterBag
|
||||
unset($files[$k]);
|
||||
}
|
||||
|
||||
foreach (array_keys($data['name']) as $key) {
|
||||
foreach ($data['name'] as $key => $name) {
|
||||
$files[$key] = $this->fixPhpFilesArray(array(
|
||||
'error' => $data['error'][$key],
|
||||
'name' => $data['name'][$key],
|
||||
'name' => $name,
|
||||
'type' => $data['type'][$key],
|
||||
'tmp_name' => $data['tmp_name'][$key],
|
||||
'size' => $data['size'][$key],
|
||||
|
@ -107,8 +107,8 @@ class IpUtils
|
||||
$netmask = 128;
|
||||
}
|
||||
|
||||
$bytesAddr = unpack("n*", inet_pton($address));
|
||||
$bytesTest = unpack("n*", inet_pton($requestIp));
|
||||
$bytesAddr = unpack('n*', inet_pton($address));
|
||||
$bytesTest = unpack('n*', inet_pton($requestIp));
|
||||
|
||||
for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; $i++) {
|
||||
$left = $netmask - 16 * ($i-1);
|
||||
|
@ -1583,7 +1583,7 @@ class Request
|
||||
foreach (array_keys($languages) as $lang) {
|
||||
if (strstr($lang, '-')) {
|
||||
$codes = explode('-', $lang);
|
||||
if ($codes[0] == 'i') {
|
||||
if ('i' === $codes[0]) {
|
||||
// Language not listed in ISO 639 that are not variants
|
||||
// of any listed language, which can be registered with the
|
||||
// i-prefix, such as i-cherokee
|
||||
@ -1592,7 +1592,7 @@ class Request
|
||||
}
|
||||
} else {
|
||||
for ($i = 0, $max = count($codes); $i < $max; $i++) {
|
||||
if ($i == 0) {
|
||||
if ($i === 0) {
|
||||
$lang = strtolower($codes[0]);
|
||||
} else {
|
||||
$lang .= '_'.strtoupper($codes[$i]);
|
||||
|
@ -1267,7 +1267,7 @@ class Response
|
||||
protected function ensureIEOverSSLCompatibility(Request $request)
|
||||
{
|
||||
if (false !== stripos($this->headers->get('Content-Disposition'), 'attachment') && preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT'), $match) == 1 && true === $request->isSecure()) {
|
||||
if ((int) preg_replace("/(MSIE )(.*?);/", "$2", $match[0]) < 9) {
|
||||
if ((int) preg_replace('/(MSIE )(.*?);/', '$2', $match[0]) < 9) {
|
||||
$this->headers->remove('Cache-Control');
|
||||
}
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ class MockArraySessionStorage implements SessionStorageInterface
|
||||
public function save()
|
||||
{
|
||||
if (!$this->started || $this->closed) {
|
||||
throw new \RuntimeException("Trying to save a session that was not started yet or was already closed");
|
||||
throw new \RuntimeException('Trying to save a session that was not started yet or was already closed');
|
||||
}
|
||||
// nothing to do since we don't persist the session data
|
||||
$this->closed = false;
|
||||
|
@ -93,7 +93,7 @@ class MockFileSessionStorage extends MockArraySessionStorage
|
||||
public function save()
|
||||
{
|
||||
if (!$this->started) {
|
||||
throw new \RuntimeException("Trying to save a session that was not started yet or was already closed");
|
||||
throw new \RuntimeException('Trying to save a session that was not started yet or was already closed');
|
||||
}
|
||||
|
||||
file_put_contents($this->getFilePath(), serialize($this->data));
|
||||
|
@ -25,9 +25,9 @@ class CookieTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
return array(
|
||||
array(''),
|
||||
array(",MyName"),
|
||||
array(";MyName"),
|
||||
array(" MyName"),
|
||||
array(',MyName'),
|
||||
array(';MyName'),
|
||||
array(' MyName'),
|
||||
array("\tMyName"),
|
||||
array("\rMyName"),
|
||||
array("\nMyName"),
|
||||
@ -89,7 +89,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGetExpiresTimeWithStringValue()
|
||||
{
|
||||
$value = "+1 day";
|
||||
$value = '+1 day';
|
||||
$cookie = new Cookie('foo', 'bar', $value);
|
||||
$expire = strtotime($value);
|
||||
|
||||
@ -137,7 +137,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals('foo=bar; expires=Fri, 20-May-2011 15:25:52 GMT; path=/; domain=.myfoodomain.com; secure; httponly', $cookie->__toString(), '->__toString() returns string representation of the cookie');
|
||||
|
||||
$cookie = new Cookie('foo', null, 1, '/admin/', '.myfoodomain.com');
|
||||
$this->assertEquals('foo=deleted; expires='.gmdate("D, d-M-Y H:i:s T", time()-31536001).'; path=/admin/; domain=.myfoodomain.com; httponly', $cookie->__toString(), '->__toString() returns string representation of a cleared cookie if value is NULL');
|
||||
$this->assertEquals('foo=deleted; expires='.gmdate('D, d-M-Y H:i:s T', time()-31536001).'; path=/admin/; domain=.myfoodomain.com; httponly', $cookie->__toString(), '->__toString() returns string representation of a cleared cookie if value is NULL');
|
||||
|
||||
$cookie = new Cookie('foo', 'bar', 0, '/', '');
|
||||
$this->assertEquals('foo=bar; path=/; httponly', $cookie->__toString());
|
||||
|
@ -75,7 +75,7 @@ class MimeTypeTest extends \PHPUnit_Framework_TestCase
|
||||
$this->markTestSkipped('Can not verify chmod operations on Windows');
|
||||
}
|
||||
|
||||
if (in_array(get_current_user(), array('root'))) {
|
||||
if ('root' === get_current_user()) {
|
||||
$this->markTestSkipped('This test will fail if run under superuser');
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$bag = new HeaderBag(array('foo' => 'bar'));
|
||||
$keys = $bag->keys();
|
||||
$this->assertEquals("foo", $keys[0]);
|
||||
$this->assertEquals('foo', $keys[0]);
|
||||
}
|
||||
|
||||
public function testGetDate()
|
||||
|
@ -918,7 +918,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase
|
||||
$req = new Request();
|
||||
$retval = $req->getContent(true);
|
||||
$this->assertInternalType('resource', $retval);
|
||||
$this->assertEquals("", fread($retval, 1));
|
||||
$this->assertEquals('', fread($retval, 1));
|
||||
$this->assertTrue(feof($retval));
|
||||
}
|
||||
|
||||
|
@ -114,11 +114,11 @@ class ResponseHeaderBagTest extends \PHPUnit_Framework_TestCase
|
||||
$bag = new ResponseHeaderBag(array());
|
||||
$bag->setCookie(new Cookie('foo', 'bar'));
|
||||
|
||||
$this->assertContains("Set-Cookie: foo=bar; path=/; httponly", explode("\r\n", $bag->__toString()));
|
||||
$this->assertContains('Set-Cookie: foo=bar; path=/; httponly', explode("\r\n", $bag->__toString()));
|
||||
|
||||
$bag->clearCookie('foo');
|
||||
|
||||
$this->assertContains("Set-Cookie: foo=deleted; expires=".gmdate("D, d-M-Y H:i:s T", time() - 31536001)."; path=/; httponly", explode("\r\n", $bag->__toString()));
|
||||
$this->assertContains('Set-Cookie: foo=deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; path=/; httponly', explode("\r\n", $bag->__toString()));
|
||||
}
|
||||
|
||||
public function testClearCookieSecureNotHttpOnly()
|
||||
@ -164,10 +164,10 @@ class ResponseHeaderBagTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertCount(4, $bag->getCookies());
|
||||
|
||||
$headers = explode("\r\n", $bag->__toString());
|
||||
$this->assertContains("Set-Cookie: foo=bar; path=/path/foo; domain=foo.bar; httponly", $headers);
|
||||
$this->assertContains("Set-Cookie: foo=bar; path=/path/foo; domain=foo.bar; httponly", $headers);
|
||||
$this->assertContains("Set-Cookie: foo=bar; path=/path/bar; domain=bar.foo; httponly", $headers);
|
||||
$this->assertContains("Set-Cookie: foo=bar; path=/; httponly", $headers);
|
||||
$this->assertContains('Set-Cookie: foo=bar; path=/path/foo; domain=foo.bar; httponly', $headers);
|
||||
$this->assertContains('Set-Cookie: foo=bar; path=/path/foo; domain=foo.bar; httponly', $headers);
|
||||
$this->assertContains('Set-Cookie: foo=bar; path=/path/bar; domain=bar.foo; httponly', $headers);
|
||||
$this->assertContains('Set-Cookie: foo=bar; path=/; httponly', $headers);
|
||||
|
||||
$cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY);
|
||||
$this->assertTrue(isset($cookies['foo.bar']['/path/foo']['foo']));
|
||||
|
@ -29,8 +29,8 @@ class ResponseTest extends ResponseTestCase
|
||||
{
|
||||
$response = new Response();
|
||||
$response = explode("\r\n", $response);
|
||||
$this->assertEquals("HTTP/1.0 200 OK", $response[0]);
|
||||
$this->assertEquals("Cache-Control: no-cache", $response[1]);
|
||||
$this->assertEquals('HTTP/1.0 200 OK', $response[0]);
|
||||
$this->assertEquals('Cache-Control: no-cache', $response[1]);
|
||||
}
|
||||
|
||||
public function testClone()
|
||||
@ -545,7 +545,7 @@ class ResponseTest extends ResponseTestCase
|
||||
$response = new Response();
|
||||
//array('etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public')
|
||||
try {
|
||||
$response->setCache(array("wrong option" => "value"));
|
||||
$response->setCache(array('wrong option' => 'value'));
|
||||
$this->fail('->setCache() throws an InvalidArgumentException if an option is not supported');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceOf('InvalidArgumentException', $e, '->setCache() throws an InvalidArgumentException if an option is not supported');
|
||||
|
@ -86,7 +86,7 @@ class FilterControllerEvent extends KernelEvent
|
||||
$a[] = sprintf('%s => %s', $k, $this->varToString($v));
|
||||
}
|
||||
|
||||
return sprintf("Array(%s)", implode(', ', $a));
|
||||
return sprintf('Array(%s)', implode(', ', $a));
|
||||
}
|
||||
|
||||
if (is_resource($var)) {
|
||||
|
@ -267,7 +267,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface
|
||||
$a[] = sprintf('%s => %s', $k, $this->varToString($v));
|
||||
}
|
||||
|
||||
return sprintf("Array(%s)", implode(', ', $a));
|
||||
return sprintf('Array(%s)', implode(', ', $a));
|
||||
}
|
||||
|
||||
if (is_resource($var)) {
|
||||
|
@ -1067,7 +1067,7 @@ class HttpCacheTest extends HttpCacheTestCase
|
||||
$this->setNextResponses($responses);
|
||||
|
||||
$this->request('GET', '/', array(), array(), true);
|
||||
$this->assertEquals("Hello World! My name is Bobby.", $this->response->getContent());
|
||||
$this->assertEquals('Hello World! My name is Bobby.', $this->response->getContent());
|
||||
|
||||
// check for 100 or 99 as the test can be executed after a second change
|
||||
$this->assertTrue(in_array($this->response->getTtl(), array(99, 100)));
|
||||
|
@ -94,7 +94,7 @@ class FileProfilerStorageTest extends AbstractProfilerStorageTest
|
||||
fwrite($h, "line1\n\n\nline2\n");
|
||||
fseek($h, 0, SEEK_END);
|
||||
|
||||
$this->assertEquals("line2", $r->invoke(self::$storage, $h));
|
||||
$this->assertEquals("line1", $r->invoke(self::$storage, $h));
|
||||
$this->assertEquals('line2', $r->invoke(self::$storage, $h));
|
||||
$this->assertEquals('line1', $r->invoke(self::$storage, $h));
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class TextBundleWriter implements BundleWriterInterface
|
||||
fprintf($file, "%s%d,\n", str_repeat(' ', $indentation + 1), $int);
|
||||
}
|
||||
|
||||
fprintf($file, "%s}", str_repeat(' ', $indentation));
|
||||
fprintf($file, '%s}', str_repeat(' ', $indentation));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -212,7 +212,7 @@ class TextBundleWriter implements BundleWriterInterface
|
||||
}
|
||||
|
||||
if (!$fallback) {
|
||||
fwrite($file, ":table(nofallback)");
|
||||
fwrite($file, ':table(nofallback)');
|
||||
}
|
||||
|
||||
fwrite($file, "{\n");
|
||||
|
@ -79,11 +79,11 @@ set_exception_handler(function (\Exception $exception) {
|
||||
echo "Caused by\n";
|
||||
}
|
||||
|
||||
echo get_class($cause).": ".$cause->getMessage()."\n";
|
||||
echo get_class($cause).': '.$cause->getMessage()."\n";
|
||||
echo "\n";
|
||||
echo $cause->getFile().":".$cause->getLine()."\n";
|
||||
echo $cause->getFile().':'.$cause->getLine()."\n";
|
||||
foreach ($cause->getTrace() as $trace) {
|
||||
echo $trace['file'].":".$trace['line']."\n";
|
||||
echo $trace['file'].':'.$trace['line']."\n";
|
||||
}
|
||||
echo "\n";
|
||||
|
||||
|
@ -57,7 +57,7 @@ MESSAGE
|
||||
}
|
||||
|
||||
echo LINE;
|
||||
echo centered("ICU Resource Bundle Compilation")."\n";
|
||||
echo centered('ICU Resource Bundle Compilation')."\n";
|
||||
echo LINE;
|
||||
|
||||
if (!Intl::isExtensionLoaded()) {
|
||||
@ -123,42 +123,42 @@ if ($argc >= 3) {
|
||||
// will run into problems when building genrb.
|
||||
$filesystem->mkdir($sourceDir.'/bin');
|
||||
|
||||
echo "[1/6] libicudata.so...";
|
||||
echo '[1/6] libicudata.so...';
|
||||
|
||||
cd($sourceDir.'/stubdata');
|
||||
run('make 2>&1 && make install 2>&1');
|
||||
|
||||
echo " ok.\n";
|
||||
|
||||
echo "[2/6] libicuuc.so...";
|
||||
echo '[2/6] libicuuc.so...';
|
||||
|
||||
cd($sourceDir.'/common');
|
||||
run('make 2>&1 && make install 2>&1');
|
||||
|
||||
echo " ok.\n";
|
||||
|
||||
echo "[3/6] libicui18n.so...";
|
||||
echo '[3/6] libicui18n.so...';
|
||||
|
||||
cd($sourceDir.'/i18n');
|
||||
run('make 2>&1 && make install 2>&1');
|
||||
|
||||
echo " ok.\n";
|
||||
|
||||
echo "[4/6] libicutu.so...";
|
||||
echo '[4/6] libicutu.so...';
|
||||
|
||||
cd($sourceDir.'/tools/toolutil');
|
||||
run('make 2>&1 && make install 2>&1');
|
||||
|
||||
echo " ok.\n";
|
||||
|
||||
echo "[5/6] libicuio.so...";
|
||||
echo '[5/6] libicuio.so...';
|
||||
|
||||
cd($sourceDir.'/io');
|
||||
run('make 2>&1 && make install 2>&1');
|
||||
|
||||
echo " ok.\n";
|
||||
|
||||
echo "[6/6] genrb...";
|
||||
echo '[6/6] genrb...';
|
||||
|
||||
cd($sourceDir.'/tools/genrb');
|
||||
run('make 2>&1 && make install 2>&1');
|
||||
|
@ -798,7 +798,7 @@ class Process
|
||||
$timeoutMicro = microtime(true) + $timeout;
|
||||
if ($this->isRunning()) {
|
||||
if ('\\' === DIRECTORY_SEPARATOR && !$this->isSigchildEnabled()) {
|
||||
exec(sprintf("taskkill /F /T /PID %d 2>&1", $this->getPid()), $output, $exitCode);
|
||||
exec(sprintf('taskkill /F /T /PID %d 2>&1', $this->getPid()), $output, $exitCode);
|
||||
if ($exitCode > 0) {
|
||||
throw new RuntimeException('Unable to kill the process');
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ class ProcessBuilderTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$proc = $pb->getProcess();
|
||||
|
||||
$this->assertContains("second", $proc->getCommandLine());
|
||||
$this->assertContains('second', $proc->getCommandLine());
|
||||
}
|
||||
|
||||
public function testPrefixIsPrependedToAllGeneratedProcess()
|
||||
|
@ -49,8 +49,8 @@ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
$cmd = 'php';
|
||||
$exitCode = 1;
|
||||
$exitText = 'General error';
|
||||
$output = "Command output";
|
||||
$errorOutput = "FATAL: Unexpected error";
|
||||
$output = 'Command output';
|
||||
$errorOutput = 'FATAL: Unexpected error';
|
||||
|
||||
$process = $this->getMock(
|
||||
'Symfony\Component\Process\Process',
|
||||
|
@ -3,7 +3,7 @@
|
||||
// required for signal handling
|
||||
declare (ticks = 1);
|
||||
|
||||
pcntl_signal(SIGUSR1, function () {echo "Caught SIGUSR1"; exit;});
|
||||
pcntl_signal(SIGUSR1, function () {echo 'Caught SIGUSR1'; exit;});
|
||||
|
||||
$n = 0;
|
||||
|
||||
|
@ -159,18 +159,18 @@ class ApacheMatcherDumper extends MatcherDumper
|
||||
}
|
||||
|
||||
if ($compiledRoute->getHostRegex()) {
|
||||
$rule[] = sprintf("RewriteCond %%{ENV:__ROUTING_host_%s} =1", $hostRegexUnique);
|
||||
$rule[] = sprintf('RewriteCond %%{ENV:__ROUTING_host_%s} =1', $hostRegexUnique);
|
||||
}
|
||||
|
||||
$rule[] = "RewriteCond %{REQUEST_URI} $regex";
|
||||
$rule[] = sprintf("RewriteCond %%{REQUEST_METHOD} !^(%s)$ [NC]", implode('|', $methods));
|
||||
$rule[] = sprintf('RewriteCond %%{REQUEST_METHOD} !^(%s)$ [NC]', implode('|', $methods));
|
||||
$rule[] = sprintf('RewriteRule .* - [S=%d,%s]', $hasTrailingSlash ? 2 : 1, implode(',', $allow));
|
||||
}
|
||||
|
||||
// redirect with trailing slash appended
|
||||
if ($hasTrailingSlash) {
|
||||
if ($compiledRoute->getHostRegex()) {
|
||||
$rule[] = sprintf("RewriteCond %%{ENV:__ROUTING_host_%s} =1", $hostRegexUnique);
|
||||
$rule[] = sprintf('RewriteCond %%{ENV:__ROUTING_host_%s} =1', $hostRegexUnique);
|
||||
}
|
||||
|
||||
$rule[] = 'RewriteCond %{REQUEST_URI} '.substr($regex, 0, -2).'$';
|
||||
@ -180,7 +180,7 @@ class ApacheMatcherDumper extends MatcherDumper
|
||||
// the main rule
|
||||
|
||||
if ($compiledRoute->getHostRegex()) {
|
||||
$rule[] = sprintf("RewriteCond %%{ENV:__ROUTING_host_%s} =1", $hostRegexUnique);
|
||||
$rule[] = sprintf('RewriteCond %%{ENV:__ROUTING_host_%s} =1', $hostRegexUnique);
|
||||
}
|
||||
|
||||
$rule[] = "RewriteCond %{REQUEST_URI} $regex";
|
||||
|
@ -75,7 +75,7 @@ class DumperPrefixCollection extends DumperCollection
|
||||
}
|
||||
|
||||
// Reached only if the root has a non empty prefix
|
||||
throw new \LogicException("The collection root must not have a prefix");
|
||||
throw new \LogicException('The collection root must not have a prefix');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -218,7 +218,7 @@ class RouteCompiler implements RouteCompilerInterface
|
||||
$nbTokens = count($tokens);
|
||||
if ($nbTokens - 1 == $index) {
|
||||
// Close the optional subpatterns
|
||||
$regexp .= str_repeat(")?", $nbTokens - $firstOptional - (0 === $firstOptional ? 1 : 0));
|
||||
$regexp .= str_repeat(')?', $nbTokens - $firstOptional - (0 === $firstOptional ? 1 : 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
// get some random test object identities from the database
|
||||
$oids = array();
|
||||
$stmt = $this->con->executeQuery("SELECT object_identifier, class_type FROM acl_object_identities o INNER JOIN acl_classes c ON c.id = o.class_id ORDER BY RAND() LIMIT 25");
|
||||
$stmt = $this->con->executeQuery('SELECT object_identifier, class_type FROM acl_object_identities o INNER JOIN acl_classes c ON c.id = o.class_id ORDER BY RAND() LIMIT 25');
|
||||
foreach ($stmt->fetchAll() as $oid) {
|
||||
$oids[] = new ObjectIdentity($oid['object_identifier'], $oid['class_type']);
|
||||
}
|
||||
@ -66,7 +66,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
|
||||
$start = microtime(true);
|
||||
$provider->findAcls($oids);
|
||||
$time = microtime(true) - $start;
|
||||
echo "Total Time: ".$time."s\n";
|
||||
echo 'Total Time: '.$time."s\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,7 +77,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$sm = $this->con->getSchemaManager();
|
||||
$sm->dropAndCreateDatabase('testdb');
|
||||
$this->con->exec("USE testdb");
|
||||
$this->con->exec('USE testdb');
|
||||
|
||||
// import the schema
|
||||
$schema = new Schema($options = $this->getOptions());
|
||||
|
@ -478,7 +478,7 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
if (isset($aclData['parent_acl'])) {
|
||||
if (isset($aclIds[$aclData['parent_acl']])) {
|
||||
$con->executeQuery("UPDATE acl_object_identities SET parent_object_identity_id = ".$aclIds[$aclData['parent_acl']]." WHERE id = ".$aclId);
|
||||
$con->executeQuery('UPDATE acl_object_identities SET parent_object_identity_id = '.$aclIds[$aclData['parent_acl']].' WHERE id = '.$aclId);
|
||||
$con->executeQuery($this->callMethod($provider, 'getInsertObjectIdentityRelationSql', array($aclId, $aclIds[$aclData['parent_acl']])));
|
||||
} else {
|
||||
$parentAcls[$aclId] = $aclData['parent_acl'];
|
||||
@ -491,7 +491,7 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase
|
||||
throw new \InvalidArgumentException(sprintf('"%s" does not exist.', $name));
|
||||
}
|
||||
|
||||
$con->executeQuery(sprintf("UPDATE acl_object_identities SET parent_object_identity_id = %d WHERE id = %d", $aclIds[$name], $aclId));
|
||||
$con->executeQuery(sprintf('UPDATE acl_object_identities SET parent_object_identity_id = %d WHERE id = %d', $aclIds[$name], $aclId));
|
||||
$con->executeQuery($this->callMethod($provider, 'getInsertObjectIdentityRelationSql', array($aclId, $aclIds[$name])));
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ class DaoAuthenticationProvider extends UserAuthenticationProvider
|
||||
throw new BadCredentialsException('The credentials were changed from another session.');
|
||||
}
|
||||
} else {
|
||||
if ("" === ($presentedPassword = $token->getCredentials())) {
|
||||
if ('' === ($presentedPassword = $token->getCredentials())) {
|
||||
throw new BadCredentialsException('The presented password cannot be empty.');
|
||||
}
|
||||
|
||||
|
@ -107,8 +107,8 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
|
||||
$voter->expects($this->exactly(2))
|
||||
->method('vote')
|
||||
->will($this->returnValueMap(array(
|
||||
array($token, null, array("ROLE_FOO"), $vote1),
|
||||
array($token, null, array("ROLE_BAR"), $vote2),
|
||||
array($token, null, array('ROLE_FOO'), $vote1),
|
||||
array($token, null, array('ROLE_BAR'), $vote2),
|
||||
)))
|
||||
;
|
||||
|
||||
|
@ -107,7 +107,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
|
||||
$this->securityContext->setToken(null);
|
||||
|
||||
if (null !== $this->logger) {
|
||||
$this->logger->info(sprintf("Cleared security context due to exception: %s", $exception->getMessage()));
|
||||
$this->logger->info(sprintf('Cleared security context due to exception: %s', $exception->getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
|
||||
if (is_array($data) || $data instanceof \Traversable) {
|
||||
foreach ($data as $key => $data) {
|
||||
//Ah this is the magic @ attribute types.
|
||||
if (0 === strpos($key, "@") && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key, 1))) {
|
||||
if (0 === strpos($key, '@') && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key, 1))) {
|
||||
$parentNode->setAttribute($attributeName, $data);
|
||||
} elseif ($key === '#') {
|
||||
$append = $this->selectNodeType($parentNode, $data);
|
||||
@ -387,7 +387,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
|
||||
$append = $this->appendNode($parentNode, $data, $key);
|
||||
}
|
||||
} elseif (is_numeric($key) || !$this->isElementNameValid($key)) {
|
||||
$append = $this->appendNode($parentNode, $data, "item", $key);
|
||||
$append = $this->appendNode($parentNode, $data, 'item', $key);
|
||||
} else {
|
||||
$append = $this->appendNode($parentNode, $data, $key);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class JsonEncoderTest extends \PHPUnit_Framework_TestCase
|
||||
public function testEncodeScalar()
|
||||
{
|
||||
$obj = new \stdClass();
|
||||
$obj->foo = "foo";
|
||||
$obj->foo = 'foo';
|
||||
|
||||
$expected = '{"foo":"foo"}';
|
||||
|
||||
@ -47,14 +47,14 @@ class JsonEncoderTest extends \PHPUnit_Framework_TestCase
|
||||
$context = array('json_encode_options' => JSON_NUMERIC_CHECK);
|
||||
|
||||
$arr = array();
|
||||
$arr['foo'] = "3";
|
||||
$arr['foo'] = '3';
|
||||
|
||||
$expected = '{"foo":3}';
|
||||
|
||||
$this->assertEquals($expected, $this->serializer->serialize($arr, 'json', $context));
|
||||
|
||||
$arr = array();
|
||||
$arr['foo'] = "3";
|
||||
$arr['foo'] = '3';
|
||||
|
||||
$expected = '{"foo":"3"}';
|
||||
|
||||
@ -72,7 +72,7 @@ class JsonEncoderTest extends \PHPUnit_Framework_TestCase
|
||||
$obj->foo = 'foo';
|
||||
$obj->bar = array('a', 'b');
|
||||
$obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1)));
|
||||
$obj->qux = "1";
|
||||
$obj->qux = '1';
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase
|
||||
public function testEncodeScalar()
|
||||
{
|
||||
$obj = new ScalarDummy();
|
||||
$obj->xmlFoo = "foo";
|
||||
$obj->xmlFoo = 'foo';
|
||||
|
||||
$expected = '<?xml version="1.0"?>'."\n".
|
||||
'<response>foo</response>'."\n";
|
||||
@ -43,7 +43,7 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase
|
||||
public function testSetRootNodeName()
|
||||
{
|
||||
$obj = new ScalarDummy();
|
||||
$obj->xmlFoo = "foo";
|
||||
$obj->xmlFoo = 'foo';
|
||||
|
||||
$this->encoder->setRootNodeName('test');
|
||||
$expected = '<?xml version="1.0"?>'."\n".
|
||||
@ -70,11 +70,11 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase
|
||||
'@name' => 'Bar',
|
||||
),
|
||||
'Foo' => array(
|
||||
'Bar' => "Test",
|
||||
'Bar' => 'Test',
|
||||
'@Type' => 'test',
|
||||
),
|
||||
'föo_bär' => 'a',
|
||||
"Bar" => array(1,2,3),
|
||||
'Bar' => array(1,2,3),
|
||||
'a' => 'b',
|
||||
);
|
||||
$expected = '<?xml version="1.0"?>'."\n".
|
||||
@ -356,28 +356,28 @@ XML;
|
||||
$obj = new ScalarDummy();
|
||||
$obj->xmlFoo = array(
|
||||
'foo-bar' => array(
|
||||
'@key' => "value",
|
||||
'item' => array("@key" => 'key', "key-val" => 'val'),
|
||||
'@key' => 'value',
|
||||
'item' => array('@key' => 'key', 'key-val' => 'val'),
|
||||
),
|
||||
'Foo' => array(
|
||||
'Bar' => "Test",
|
||||
'Bar' => 'Test',
|
||||
'@Type' => 'test',
|
||||
),
|
||||
'föo_bär' => 'a',
|
||||
"Bar" => array(1,2,3),
|
||||
'Bar' => array(1,2,3),
|
||||
'a' => 'b',
|
||||
);
|
||||
$expected = array(
|
||||
'foo-bar' => array(
|
||||
'@key' => "value",
|
||||
'key' => array('@key' => 'key', "key-val" => 'val'),
|
||||
'@key' => 'value',
|
||||
'key' => array('@key' => 'key', 'key-val' => 'val'),
|
||||
),
|
||||
'Foo' => array(
|
||||
'Bar' => "Test",
|
||||
'Bar' => 'Test',
|
||||
'@Type' => 'test',
|
||||
),
|
||||
'föo_bär' => 'a',
|
||||
"Bar" => array(1,2,3),
|
||||
'Bar' => array(1,2,3),
|
||||
'a' => 'b',
|
||||
);
|
||||
$xml = $this->encoder->encode($obj, 'xml');
|
||||
@ -483,7 +483,7 @@ XML;
|
||||
$obj->foo = 'foo';
|
||||
$obj->bar = array('a', 'b');
|
||||
$obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1)));
|
||||
$obj->qux = "1";
|
||||
$obj->qux = '1';
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ class GetSetDummy
|
||||
|
||||
public function otherMethod()
|
||||
{
|
||||
throw new \RuntimeException("Dummy::otherMethod() should not be called");
|
||||
throw new \RuntimeException('Dummy::otherMethod() should not be called');
|
||||
}
|
||||
|
||||
public function setObject($object)
|
||||
@ -418,7 +418,7 @@ class GetConstructorDummy
|
||||
|
||||
public function otherMethod()
|
||||
{
|
||||
throw new \RuntimeException("Dummy::otherMethod() should not be called");
|
||||
throw new \RuntimeException('Dummy::otherMethod() should not be called');
|
||||
}
|
||||
}
|
||||
|
||||
@ -456,6 +456,6 @@ class GetConstructorOptionalArgsDummy
|
||||
|
||||
public function otherMethod()
|
||||
{
|
||||
throw new \RuntimeException("Dummy::otherMethod() should not be called");
|
||||
throw new \RuntimeException('Dummy::otherMethod() should not be called');
|
||||
}
|
||||
}
|
||||
|
@ -154,6 +154,6 @@ class StopwatchEventTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testInvalidOriginThrowsAnException()
|
||||
{
|
||||
new StopwatchEvent("abc");
|
||||
new StopwatchEvent('abc');
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ use Symfony\Component\Config\Resource\FileResource;
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class CsvFileLoader extends ArrayLoader implements LoaderInterface
|
||||
class CsvFileLoader extends ArrayLoader
|
||||
{
|
||||
private $delimiter = ';';
|
||||
private $enclosure = '"';
|
||||
|
@ -20,7 +20,7 @@ use Symfony\Component\Config\Resource\FileResource;
|
||||
*
|
||||
* @author stealth35
|
||||
*/
|
||||
class IniFileLoader extends ArrayLoader implements LoaderInterface
|
||||
class IniFileLoader extends ArrayLoader
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
@ -18,7 +18,7 @@ use Symfony\Component\Config\Resource\FileResource;
|
||||
/**
|
||||
* @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/)
|
||||
*/
|
||||
class MoFileLoader extends ArrayLoader implements LoaderInterface
|
||||
class MoFileLoader extends ArrayLoader
|
||||
{
|
||||
/**
|
||||
* Magic used for validating the format of a MO file as well as
|
||||
@ -88,7 +88,7 @@ class MoFileLoader extends ArrayLoader implements LoaderInterface
|
||||
$stat = fstat($stream);
|
||||
|
||||
if ($stat['size'] < self::MO_HEADER_SIZE) {
|
||||
throw new InvalidResourceException("MO stream content has an invalid format.");
|
||||
throw new InvalidResourceException('MO stream content has an invalid format.');
|
||||
}
|
||||
$magic = unpack('V1', fread($stream, 4));
|
||||
$magic = hexdec(substr(dechex(current($magic)), -8));
|
||||
@ -98,7 +98,7 @@ class MoFileLoader extends ArrayLoader implements LoaderInterface
|
||||
} elseif ($magic == self::MO_BIG_ENDIAN_MAGIC) {
|
||||
$isBigEndian = true;
|
||||
} else {
|
||||
throw new InvalidResourceException("MO stream content has an invalid format.");
|
||||
throw new InvalidResourceException('MO stream content has an invalid format.');
|
||||
}
|
||||
|
||||
// formatRevision
|
||||
@ -137,6 +137,10 @@ class MoFileLoader extends ArrayLoader implements LoaderInterface
|
||||
$length = $this->readLong($stream, $isBigEndian);
|
||||
$offset = $this->readLong($stream, $isBigEndian);
|
||||
|
||||
if ($length < 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
fseek($stream, $offset);
|
||||
$translated = fread($stream, $length);
|
||||
|
||||
|
@ -22,7 +22,7 @@ use Symfony\Component\Config\Resource\FileResource;
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class PhpFileLoader extends ArrayLoader implements LoaderInterface
|
||||
class PhpFileLoader extends ArrayLoader
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
@ -19,7 +19,7 @@ use Symfony\Component\Config\Resource\FileResource;
|
||||
* @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/)
|
||||
* @copyright Copyright (c) 2012, Clemens Tolboom
|
||||
*/
|
||||
class PoFileLoader extends ArrayLoader implements LoaderInterface
|
||||
class PoFileLoader extends ArrayLoader
|
||||
{
|
||||
public function load($resource, $locale, $domain = 'messages')
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ use Symfony\Component\Yaml\Exception\ParseException;
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class YamlFileLoader extends ArrayLoader implements LoaderInterface
|
||||
class YamlFileLoader extends ArrayLoader
|
||||
{
|
||||
private $yamlParser;
|
||||
|
||||
|
@ -57,4 +57,15 @@ class MoFileLoaderTest extends \PHPUnit_Framework_TestCase
|
||||
$resource = __DIR__.'/../fixtures/empty.mo';
|
||||
$loader->load($resource, 'en', 'domain1');
|
||||
}
|
||||
|
||||
public function testLoadEmptyTranslation()
|
||||
{
|
||||
$loader = new MoFileLoader();
|
||||
$resource = __DIR__.'/../fixtures/empty-translation.mo';
|
||||
$catalogue = $loader->load($resource, 'en', 'message');
|
||||
|
||||
$this->assertEquals(array(), $catalogue->all('message'));
|
||||
$this->assertEquals('en', $catalogue->getLocale());
|
||||
$this->assertEquals(array(new FileResource($resource)), $catalogue->getResources());
|
||||
}
|
||||
}
|
||||
|
BIN
src/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo
vendored
Normal file
BIN
src/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo
vendored
Normal file
Binary file not shown.
@ -125,6 +125,6 @@ class EmailValidator extends ConstraintValidator
|
||||
*/
|
||||
private function checkHost($host)
|
||||
{
|
||||
return $this->checkMX($host) || (checkdnsrr($host, "A") || checkdnsrr($host, "AAAA"));
|
||||
return $this->checkMX($host) || (checkdnsrr($host, 'A') || checkdnsrr($host, 'AAAA'));
|
||||
}
|
||||
}
|
||||
|
@ -302,6 +302,14 @@
|
||||
<source>An empty file is not allowed.</source>
|
||||
<target>空のファイルは許可されていません。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="79">
|
||||
<source>The host could not be resolved.</source>
|
||||
<target>ホストを解決できませんでした。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="80">
|
||||
<source>This value does not match the expected {{ charset }} charset.</source>
|
||||
<target>この値は予期される文字コード({{ charset }})と異なります。</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
@ -75,16 +75,16 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
|
||||
public function testAcceptOptionalConstraintAsOneElementArray()
|
||||
{
|
||||
$collection1 = new Collection(array(
|
||||
"fields" => array(
|
||||
"alternate_email" => array(
|
||||
'fields' => array(
|
||||
'alternate_email' => array(
|
||||
new Optional(new Email()),
|
||||
),
|
||||
),
|
||||
));
|
||||
|
||||
$collection2 = new Collection(array(
|
||||
"fields" => array(
|
||||
"alternate_email" => new Optional(new Email()),
|
||||
'fields' => array(
|
||||
'alternate_email' => new Optional(new Email()),
|
||||
),
|
||||
));
|
||||
|
||||
@ -94,16 +94,16 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
|
||||
public function testAcceptRequiredConstraintAsOneElementArray()
|
||||
{
|
||||
$collection1 = new Collection(array(
|
||||
"fields" => array(
|
||||
"alternate_email" => array(
|
||||
'fields' => array(
|
||||
'alternate_email' => array(
|
||||
new Required(new Email()),
|
||||
),
|
||||
),
|
||||
));
|
||||
|
||||
$collection2 = new Collection(array(
|
||||
"fields" => array(
|
||||
"alternate_email" => new Required(new Email()),
|
||||
'fields' => array(
|
||||
'alternate_email' => new Required(new Email()),
|
||||
),
|
||||
));
|
||||
|
||||
|
@ -94,10 +94,10 @@ class LengthValidatorTest extends AbstractConstraintValidatorTest
|
||||
}
|
||||
|
||||
return array(
|
||||
array("é", "utf8", true),
|
||||
array("\xE9", "CP1252", true),
|
||||
array("\xE9", "XXX", false),
|
||||
array("\xE9", "utf8", false),
|
||||
array('é', 'utf8', true),
|
||||
array("\xE9", 'CP1252', true),
|
||||
array("\xE9", 'XXX', false),
|
||||
array("\xE9", 'utf8', false),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$required_locales = array('fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252');
|
||||
if (false === setlocale(LC_ALL, $required_locales)) {
|
||||
$this->markTestSkipped('Could not set any of required locales: '.implode(", ", $required_locales));
|
||||
$this->markTestSkipped('Could not set any of required locales: '.implode(', ', $required_locales));
|
||||
}
|
||||
|
||||
$this->assertEquals('1.2', Inline::dump(1.2));
|
||||
|
@ -259,8 +259,8 @@ bar: >-
|
||||
|
||||
EOF;
|
||||
$expected = array(
|
||||
'foo' => "one two",
|
||||
'bar' => "one two",
|
||||
'foo' => 'one two',
|
||||
'bar' => 'one two',
|
||||
);
|
||||
$tests['Folded block chomping strip with single trailing newline'] = array($expected, $yaml);
|
||||
|
||||
@ -276,8 +276,8 @@ bar: >-
|
||||
|
||||
EOF;
|
||||
$expected = array(
|
||||
'foo' => "one two",
|
||||
'bar' => "one two",
|
||||
'foo' => 'one two',
|
||||
'bar' => 'one two',
|
||||
);
|
||||
$tests['Folded block chomping strip with multiple trailing newlines'] = array($expected, $yaml);
|
||||
|
||||
@ -290,8 +290,8 @@ bar: >-
|
||||
two
|
||||
EOF;
|
||||
$expected = array(
|
||||
'foo' => "one two",
|
||||
'bar' => "one two",
|
||||
'foo' => 'one two',
|
||||
'bar' => 'one two',
|
||||
);
|
||||
$tests['Folded block chomping strip without trailing newline'] = array($expected, $yaml);
|
||||
|
||||
@ -337,7 +337,7 @@ bar: >
|
||||
EOF;
|
||||
$expected = array(
|
||||
'foo' => "one two\n",
|
||||
'bar' => "one two",
|
||||
'bar' => 'one two',
|
||||
);
|
||||
$tests['Folded block chomping clip without trailing newline'] = array($expected, $yaml);
|
||||
|
||||
@ -383,7 +383,7 @@ bar: >+
|
||||
EOF;
|
||||
$expected = array(
|
||||
'foo' => "one two\n",
|
||||
'bar' => "one two",
|
||||
'bar' => 'one two',
|
||||
);
|
||||
$tests['Folded block chomping keep without trailing newline'] = array($expected, $yaml);
|
||||
|
||||
@ -455,9 +455,9 @@ EOF;
|
||||
}
|
||||
|
||||
$yamls = array(
|
||||
iconv("UTF-8", "ISO-8859-1", "foo: 'äöüß'"),
|
||||
iconv("UTF-8", "ISO-8859-15", "euro: '€'"),
|
||||
iconv("UTF-8", "CP1252", "cp1252: '©ÉÇáñ'"),
|
||||
iconv('UTF-8', 'ISO-8859-1', "foo: 'äöüß'"),
|
||||
iconv('UTF-8', 'ISO-8859-15', "euro: '€'"),
|
||||
iconv('UTF-8', 'CP1252', "cp1252: '©ÉÇáñ'"),
|
||||
);
|
||||
|
||||
foreach ($yamls as $yaml) {
|
||||
|
Reference in New Issue
Block a user