diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index da27714faf..e10ae01026 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -16,8 +16,8 @@ Symfony is the result of the work of many people who made the code better - Kris Wallsmith (kriswallsmith) - Jakub Zalas (jakubzalas) - Ryan Weaver (weaverryan) - - Javier Eguiluz (javier.eguiluz) - Kévin Dunglas (dunglas) + - Javier Eguiluz (javier.eguiluz) - Hugo Hamon (hhamon) - Abdellatif Ait boudad (aitboudad) - Pascal Borreli (pborreli) @@ -56,17 +56,18 @@ Symfony is the result of the work of many people who made the code better - Ener-Getick (energetick) - Iltar van der Berg (kjarli) - Kevin Bond (kbond) + - Andrej Hudec (pulzarraider) - Gábor Egyed (1ed) - Michel Weimerskirch (mweimerskirch) - Eric Clemmons (ericclemmons) - Matthias Pigulla (mpdude) - - Andrej Hudec (pulzarraider) - Christian Raue + - Arnout Boks (aboks) - Charles Sarrazin (csarrazi) + - Robin Chalas (chalas_r) - Deni - Henrik Westphal (snc) - Dariusz Górecki (canni) - - Arnout Boks (aboks) - Douglas Greenshields (shieldo) - Lee McDermott - Brandon Turner @@ -80,14 +81,14 @@ Symfony is the result of the work of many people who made the code better - Toni Uebernickel (havvg) - Fran Moreno (franmomu) - Antoine Hérault (herzult) - - Robin Chalas (chalas_r) - Arnaud Le Blanc (arnaud-lb) - Jérôme Tamarelle (gromnan) - Paráda József (paradajozsef) + - Titouan Galopin (tgalopin) - Michal Piotrowski (eventhorizon) - Tim Nagel (merk) - - Brice BERNARD (brikou) - Konstantin Myakshin (koc) + - Brice BERNARD (brikou) - Alexander M. Turek (derrabus) - Dariusz Ruminski - marc.weistroff @@ -114,15 +115,14 @@ Symfony is the result of the work of many people who made the code better - Théo FIDRY (theofidry) - Robert Schönthal (digitalkaoz) - Florian Lonqueu-Brochard (florianlb) - - Titouan Galopin (tgalopin) - Stefano Sala (stefano.sala) + - Evgeniy (ewgraf) - Juti Noppornpitak (shiroyuki) - Tigran Azatyan (tigranazatyan) - Sebastian Hörl (blogsh) - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) - Sebastiaan Stok (sstok) - - Evgeniy (ewgraf) - Tugdual Saunier (tucksaun) - Guilherme Blanco (guilhermeblanco) - Pablo Godel (pgodel) @@ -132,6 +132,7 @@ Symfony is the result of the work of many people who made the code better - Arnaud Kleinpeter (nanocom) - Joel Wurtz (brouznouf) - Philipp Wahala (hifi) + - Vyacheslav Pavlov - Richard Shank (iampersistent) - Thomas Rabaix (rande) - Vincent AUBERT (vincent) @@ -161,9 +162,9 @@ Symfony is the result of the work of many people who made the code better - Noel Guilbert (noel) - Stepan Anchugov (kix) - bronze1man + - Roland Franssen (ro0) - sun (sun) - Larry Garfield (crell) - - Vyacheslav Pavlov - Martin Schuhfuß (usefulthink) - Matthieu Bontemps (mbontemps) - Pierre Minnieur (pminnieur) @@ -179,12 +180,15 @@ Symfony is the result of the work of many people who made the code better - Justin Hileman (bobthecow) - Blanchon Vincent (blanchonvincent) - Michele Orselli (orso) + - Tom Van Looy (tvlooy) - Sven Paulus (subsven) - Lars Strojny (lstrojny) - Rui Marinho (ruimarinho) - Daniel Espendiller + - Dawid Nowak - Eugene Wissner - Julien Brochet (mewt) + - Yonel Ceruto González (yonelceruto) - Sergey Linnik (linniksa) - Michaël Perrin (michael.perrin) - Marcel Beerta (mazen) @@ -205,8 +209,8 @@ Symfony is the result of the work of many people who made the code better - Danny Berger (dpb587) - Jérôme Vasseur - Roman Marintšenko (inori) + - Christian Schmidt - Xavier Montaña Carreras (xmontana) - - Tom Van Looy (tvlooy) - Chris Wilkinson (thewilkybarkid) - Mickaël Andrieu (mickaelandrieu) - Xavier Perez @@ -214,8 +218,8 @@ Symfony is the result of the work of many people who made the code better - Katsuhiro OGAWA - Alif Rachmawadi - Kristen Gilden (kgilden) - - Dawid Nowak - Pierre-Yves LEBECQ (pylebecq) + - Alex Pott - Jakub Kucharovic (jkucharovic) - Eugene Leonovich (rybakit) - Filippo Tessarotto @@ -227,8 +231,10 @@ Symfony is the result of the work of many people who made the code better - Ray - Grégoire Paris (greg0ire) - Chekote + - Tobias Nyholm (tobias) - Thomas Adam - Albert Casademont (acasademont) + - Jhonny Lidfors (jhonne) - Diego Agulló (aeoris) - jdhoek - Nikita Konstantinov @@ -242,7 +248,6 @@ Symfony is the result of the work of many people who made the code better - Roumen Damianoff (roumen) - Antonio J. García Lagar (ajgarlag) - Kim Hemsø Rasmussen (kimhemsoe) - - Christian Schmidt - Wouter Van Hecke - Peter Kruithof (pkruithof) - Michael Holm (hollo) @@ -257,17 +262,15 @@ 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) - - Tobias Nyholm (tobias) - Grégoire Passault (gregwar) + - Leo Feyer - Ismael Ambrosi (iambrosi) - Uwe Jäger (uwej711) - Aurelijus Valeiša (aurelijus) - Jan Decavele (jandc) - - Yonel Ceruto González (yonelceruto) - Gustavo Piltcher - Stepan Tanasiychuk (stfalcon) - Tiago Ribeiro (fixe) @@ -306,8 +309,8 @@ Symfony is the result of the work of many people who made the code better - Felix Labrecque - Yaroslav Kiliba - Terje Bråten - - Roland Franssen (ro0) - Robbert Klarenbeek (robbertkl) + - Marek Štípek (maryo) - Alessandro Chitolina - JhonnyL - hossein zolfi (ocean) @@ -317,6 +320,8 @@ Symfony is the result of the work of many people who made the code better - Stéphane PY (steph_py) - Philipp Kräutli (pkraeutli) - Kirill chEbba Chebunin (chebba) + - Tristan Darricau (nicofuma) + - SpacePossum - Greg Thornton (xdissent) - Costin Bereveanu (schniper) - Loïc Chardonnet (gnusat) @@ -328,7 +333,6 @@ Symfony is the result of the work of many people who made the code better - Endre Fejes - Tobias Naumann (tna) - Daniel Beyer - - Jhonny Lidfors (jhonne) - Shein Alexey - Baptiste Lafontaine - Joe Lencioni @@ -383,7 +387,6 @@ Symfony is the result of the work of many people who made the code better - cedric lombardot (cedriclombardot) - Jonas Flodén (flojon) - Christian Schmidt - - Marek Štípek (maryo) - Marcin Sikoń (marphi) - Dominik Zogg (dominik.zogg) - Marek Pietrzak @@ -393,6 +396,7 @@ Symfony is the result of the work of many people who made the code better - Christian Wahler - Mathieu Lemoine - Gintautas Miselis + - James Halsall (jaitsu) - David Badura (davidbadura) - Zander Baldwin - Adam Harvey @@ -409,7 +413,6 @@ Symfony is the result of the work of many people who made the code better - Benoît Burnichon (bburnichon) - Sebastian Bergmann - Pablo Díez (pablodip) - - SpacePossum - Kevin McBride - Philipp Rieber (bicpi) - Manuel de Ruiter (manuel) @@ -428,6 +431,7 @@ Symfony is the result of the work of many people who made the code better - Filip Procházka (fprochazka) - mmoreram - Markus Lanthaler (lanthaler) + - Remi Collet - Vicent Soria Durá (vicentgodella) - Nicolas Dewez (nicolas_dewez) - Anthony Ferrara @@ -435,7 +439,7 @@ Symfony is the result of the work of many people who made the code better - Jakub Škvára (jskvara) - Andrew Udvare (audvare) - alexpods - - Tristan Darricau (nicofuma) + - Michele Locati - Erik Trapman (eriktrapman) - De Cock Xavier (xdecock) - Almog Baku (almogbaku) @@ -449,13 +453,13 @@ Symfony is the result of the work of many people who made the code better - DUPUCH (bdupuch) - Benjamin Leveque (benji07) - Nate (frickenate) + - Timothée Barray (tyx) - jhonnyL - sasezaki - Dawid Pakuła (zulusx) - Florian Rey (nervo) - Oskar Stark (oskarstark) - Rodrigo Borrego Bernabé (rodrigobb) - - Leo Feyer - MatTheCat - Denis Gorbachev (starfall) - Peter van Dommelen @@ -557,6 +561,7 @@ Symfony is the result of the work of many people who made the code better - Hossein Bukhamsin - Disparity - origaminal + - Maxime STEINHAUSSER - Paweł Wacławczyk (pwc) - Oleg Zinchenko (cystbear) - Johannes Klauss (cloppy) @@ -567,6 +572,7 @@ Symfony is the result of the work of many people who made the code better - Tiago Brito (blackmx) - Richard van den Brand (ricbra) - develop + - ReenExe - Mark Sonnabaum - Richard Quadling - jochenvdv @@ -596,7 +602,6 @@ Symfony is the result of the work of many people who made the code better - Lars Vierbergen - Dennis Hotson - Andrew Tchircoff (andrewtch) - - Remi Collet - michaelwilliams - 1emming - Leevi Graham (leevigraham) @@ -619,7 +624,6 @@ Symfony is the result of the work of many people who made the code better - possum - Denis Zunke (donalberto) - Olivier Maisonneuve (olineuve) - - Michele Locati - Masterklavi - Francis Turmel (fturmel) - cgonzalez @@ -630,6 +634,7 @@ Symfony is the result of the work of many people who made the code better - Harm van Tilborg - Jan Prieser - Adrien Lucas (adrienlucas) + - Zhuravlev Alexander (scif) - James Michael DuPont - Tom Klingenberg - Christopher Hall (mythmakr) @@ -681,7 +686,6 @@ Symfony is the result of the work of many people who made the code better - abdul malik ikhsan (samsonasik) - Henry Snoek (snoek09) - Simone Di Maulo (toretto460) - - Timothée Barray (tyx) - Sander Toonen (xatoo) - Christian Morgan - Alexander Miehe (engerim) @@ -801,7 +805,6 @@ Symfony is the result of the work of many people who made the code better - Ken Marfilla (marfillaster) - benatespina (benatespina) - Denis Kop - - Maxime STEINHAUSSER - jfcixmedia - Martijn Evers - Benjamin Paap (benjaminpaap) @@ -834,6 +837,7 @@ Symfony is the result of the work of many people who made the code better - Rodrigo Díez Villamuera (rodrigodiez) - e-ivanov - Jochen Bayer (jocl) + - Matteo Beccati (matteobeccati) - Jeremy Bush - wizhippo - Viacheslav Sychov @@ -855,6 +859,7 @@ Symfony is the result of the work of many people who made the code better - Gustavo Adrian - Yannick - spdionis + - Taras Girnyk - Eduardo García Sanz (coma) - James Gilliland - Rhodri Pugh (rodnaph) @@ -882,6 +887,7 @@ Symfony is the result of the work of many people who made the code better - Christian Sciberras - Clement Herreman (clemherreman) - Dan Ionut Dumitriu (danionut90) + - David Maicher (dmaicher) - Nyro (nyro) - Marco - Marc Torres @@ -946,6 +952,7 @@ Symfony is the result of the work of many people who made the code better - ShiraNai7 - Vašek Purchart (vasek-purchart) - Janusz Jabłoński (yanoosh) + - Sandro Hopf - Łukasz Makuch - George Giannoulopoulos - Daniel Richter (richtermeister) @@ -971,7 +978,6 @@ Symfony is the result of the work of many people who made the code better - WedgeSama - Felds Liscia - Ahmed TAILOULOUTE (ahmedtai) - - James Halsall (jaitsu) - Maxime Veber (nek-) - Sullivan SENECHAL - Tadcka @@ -1026,6 +1032,7 @@ Symfony is the result of the work of many people who made the code better - Valentin VALCIU - Kevin Dew - James Cowgill + - 1ma (jautenim) - Nicolas Schwartz (nicoschwartz) - Patrik Gmitter (patie) - Jonathan Gough @@ -1102,8 +1109,8 @@ Symfony is the result of the work of many people who made the code better - David Stone - Jovan Perovic (jperovic) - Pablo Maria Martelletti (pmartelletti) - - Zhuravlev Alexander (scif) - Yassine Guedidi (yguedidi) + - Waqas Ahmed - Luis Muñoz - Andreas - Thomas Chmielowiec @@ -1185,6 +1192,7 @@ Symfony is the result of the work of many people who made the code better - Adam - devel - taiiiraaa + - Johann Pardanaud - Trevor Suarez - gedrox - dropfen @@ -1313,6 +1321,7 @@ Symfony is the result of the work of many people who made the code better - Joseph Deray - Damian Sromek - Ben + - Evgeniy Tetenchuk - dasmfm - Arnaud Buathier (arnapou) - chesteroni (chesteroni) @@ -1403,6 +1412,7 @@ Symfony is the result of the work of many people who made the code better - Benjamin Long - Matt Janssen - Peter Gribanov + - Ben Johnson - kwiateusz - David Soria Parra - Sergiy Sokolenko @@ -1526,6 +1536,7 @@ Symfony is the result of the work of many people who made the code better - smokeybear87 - Gustavo Adrian - Kevin Weber + - Dionysis Arvanitis - Sergey Fedotov - Michael - fh-github@fholzhauer.de diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index a93b20eed5..a0f8b5c46a 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -336,7 +336,7 @@ abstract class AbstractDoctrineExtension extends Extension $memcacheClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.memcache.class').'%'; $memcacheInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.memcache_instance.class').'%'; $memcacheHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.memcache_host').'%'; - $memcachePort = !empty($cacheDriver['port']) || (isset($cacheDriver['port']) && $cacheDriver['port'] === 0) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%'; + $memcachePort = !empty($cacheDriver['port']) || (isset($cacheDriver['port']) && $cacheDriver['port'] === 0) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%'; $cacheDef = new Definition($memcacheClass); $memcacheInstance = new Definition($memcacheInstanceClass); $memcacheInstance->addMethodCall('connect', array( diff --git a/src/Symfony/Bridge/Twig/Command/DebugCommand.php b/src/Symfony/Bridge/Twig/Command/DebugCommand.php index 861de86909..a18b817870 100644 --- a/src/Symfony/Bridge/Twig/Command/DebugCommand.php +++ b/src/Symfony/Bridge/Twig/Command/DebugCommand.php @@ -139,7 +139,6 @@ EOF return; } if ($type === 'functions' || $type === 'filters') { - $args = array(); $cb = $entity->getCallable(); if (is_null($cb)) { return; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php index eb3508449b..46fbc9204a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php @@ -82,7 +82,6 @@ EOF throw new \RuntimeException(sprintf('File or directory "%s" is not readable', $filename)); } - $files = array(); if (is_file($filename)) { $files = array($filename); } elseif (is_dir($filename)) { diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php index 6c20c83af1..b521175506 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php @@ -35,6 +35,10 @@ class AddConsoleCommandPass implements CompilerPassInterface $class = $container->getParameterBag()->resolveValue($definition->getClass()); if (!is_subclass_of($class, 'Symfony\\Component\\Console\\Command\\Command')) { + if (!class_exists($class, false)) { + throw new \InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); + } + throw new \InvalidArgumentException(sprintf('The service "%s" tagged "console.command" must be a subclass of "Symfony\\Component\\Console\\Command\\Command".', $id)); } $container->setAlias($serviceId = 'console.command.'.strtolower(str_replace('\\', '_', $class)), $id); diff --git a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php index ab67078dd6..2dc0b618d5 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php +++ b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php @@ -108,8 +108,6 @@ class WebDebugToolbarListener implements EventSubscriberInterface /** * Injects the web debug toolbar into the given Response. - * - * @param Response $response A Response instance */ protected function injectToolbar(Response $response, Request $request) { diff --git a/src/Symfony/Component/BrowserKit/Cookie.php b/src/Symfony/Component/BrowserKit/Cookie.php index 604d12d84d..eeef805d72 100644 --- a/src/Symfony/Component/BrowserKit/Cookie.php +++ b/src/Symfony/Component/BrowserKit/Cookie.php @@ -76,7 +76,7 @@ class Cookie throw new \UnexpectedValueException(sprintf('The cookie expiration time "%s" is not valid.', $expires)); } - $this->expires = $timestampAsDateTime->getTimestamp(); + $this->expires = $timestampAsDateTime->format('U'); } } @@ -205,13 +205,13 @@ class Cookie foreach (self::$dateFormats as $dateFormat) { if (false !== $date = \DateTime::createFromFormat($dateFormat, $dateValue, new \DateTimeZone('GMT'))) { - return $date->getTimestamp(); + return $date->format('U'); } } // attempt a fallback for unusual formatting if (false !== $date = date_create($dateValue, new \DateTimeZone('GMT'))) { - return $date->getTimestamp(); + return $date->format('U'); } throw new \InvalidArgumentException(sprintf('Could not parse date "%s".', $dateValue)); @@ -304,6 +304,6 @@ class Cookie */ public function isExpired() { - return null !== $this->expires && 0 !== $this->expires && $this->expires < time(); + return null !== $this->expires && 0 != $this->expires && $this->expires < time(); } } diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php index 61b364e6d1..5a724333d3 100644 --- a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php @@ -178,7 +178,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException UnexpectedValueException + * @expectedException \UnexpectedValueException * @expectedExceptionMessage The cookie expiration time "string" is not valid. */ public function testConstructException() diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index d212a32547..0d5001bb18 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -572,6 +572,8 @@ class Command * Add a command usage example. * * @param string $usage The usage, it'll be prefixed with the command name + * + * @return Command The current instance */ public function addUsage($usage) { diff --git a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php index d3d76a4201..2eb9944d62 100644 --- a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php @@ -98,7 +98,7 @@ class MarkdownDescriptor extends Descriptor .'* Description: '.($command->getDescription() ?: '')."\n" .'* Usage:'."\n\n" .array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) { - return $carry .= ' * `'.$usage.'`'."\n"; + return $carry.' * `'.$usage.'`'."\n"; }) ); diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index c6f5a409c3..4012b088f2 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -198,6 +198,7 @@ class QuestionHelper extends Helper * * @param OutputInterface $output * @param Question $question + * @param resource $inputStream * * @return string */ @@ -314,7 +315,8 @@ class QuestionHelper extends Helper /** * Gets a hidden response from user. * - * @param OutputInterface $output An Output instance + * @param OutputInterface $output An Output instance + * @param resource $inputStream The handler resource * * @return string The answer * diff --git a/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php b/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php index 04edd30411..998249dbc1 100644 --- a/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php @@ -108,13 +108,6 @@ class HelperSetTest extends \PHPUnit_Framework_TestCase } } - /** - * Create a generic mock for the helper interface. Optionally check for a call to setHelperSet with a specific - * helperset instance. - * - * @param string $name - * @param HelperSet $helperset allows a mock to verify a particular helperset set is being added to the Helper - */ private function getGenericMockHelper($name, HelperSet $helperset = null) { $mock_helper = $this->getMock('\Symfony\Component\Console\Helper\HelperInterface'); diff --git a/src/Symfony/Component/CssSelector/XPath/Translator.php b/src/Symfony/Component/CssSelector/XPath/Translator.php index 8cbea5ca95..2cc2b110c9 100644 --- a/src/Symfony/Component/CssSelector/XPath/Translator.php +++ b/src/Symfony/Component/CssSelector/XPath/Translator.php @@ -70,9 +70,6 @@ class Translator implements TranslatorInterface */ private $attributeMatchingTranslators = array(); - /** - * Constructor. - */ public function __construct(ParserInterface $parser = null) { $this->mainParser = $parser ?: new Parser(); diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php index 04fba93ac8..b089737cbc 100644 --- a/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/Symfony/Component/Debug/ErrorHandler.php @@ -348,10 +348,12 @@ class ErrorHandler /** * Handles errors by filtering then logging them according to the configured bit fields. * - * @param int $type One of the E_* constants + * @param int $type One of the E_* constants + * @param string $message * @param string $file * @param int $line * @param array $context + * @param array $backtrace * * @return bool Returns false when no handling happens so that the PHP engine can handle the error itself * diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php index 056be7fa3f..e3c793c4f4 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php @@ -39,7 +39,7 @@ class ServiceReferenceGraphEdge /** * Returns the value of the edge. * - * @return ServiceReferenceGraphNode + * @return string */ public function getValue() { diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php index a81118e498..2331731f64 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -208,6 +208,18 @@ class ContainerTest extends \PHPUnit_Framework_TestCase } } + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExcepionMessage You have requested a synthetic service ("request"). The DIC does not know how to construct this service. + */ + public function testGetSyntheticServiceAlwaysThrows() + { + require_once __DIR__.'/Fixtures/php/services9.php'; + + $container = new \ProjectServiceContainer(); + $container->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE); + } + public function testHas() { $sc = new ProjectServiceContainer(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index d155a9ac76..180658082a 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -189,7 +189,7 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase /** * @dataProvider provideInvalidFactories - * @expectedException Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException * @expectedExceptionMessage Cannot dump definition */ public function testInvalidFactories($factory) diff --git a/src/Symfony/Component/ExpressionLanguage/TokenStream.php b/src/Symfony/Component/ExpressionLanguage/TokenStream.php index ac9599769f..6c4af745b2 100644 --- a/src/Symfony/Component/ExpressionLanguage/TokenStream.php +++ b/src/Symfony/Component/ExpressionLanguage/TokenStream.php @@ -60,6 +60,10 @@ class TokenStream /** * Tests a token. + * + * @param array|int $type The type to test + * @param string|null $value The token value + * @param string|null $message The syntax error message */ public function expect($type, $value = null, $message = null) { diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 72ab9bf8cf..eda9679fed 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -285,6 +285,8 @@ class Filesystem * * @param string $filename Path to the file * + * @return bool + * * @throws IOException When windows path is longer than 258 characters */ private function isReadable($filename) diff --git a/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php b/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php index f027ea3290..dbf8f36b97 100644 --- a/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php @@ -177,12 +177,13 @@ class ArrayChoiceList implements ChoiceListInterface /** * Flattens an array into the given output variables. * - * @param array $choices The array to flatten - * @param callable $value The callable for generating choice values - * @param array $choicesByValues The flattened choices indexed by the - * corresponding values - * @param array $keysByValues The original keys indexed by the - * corresponding values + * @param array $choices The array to flatten + * @param callable $value The callable for generating choice values + * @param array $choicesByValues The flattened choices indexed by the + * corresponding values + * @param array $keysByValues The original keys indexed by the + * corresponding values + * @param array $structuredValues The values indexed by the original keys * * @internal Must not be used by user-land code */ diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php index 4e15feb148..22d655f60e 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php @@ -177,8 +177,6 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer /** * Checks if the pattern contains only a date. * - * @param string $pattern The input pattern - * * @return bool */ protected function isPatternDateOnly() diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php index ec89c88364..fbb28b1bc0 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php @@ -23,14 +23,8 @@ use Symfony\Component\Validator\ConstraintViolationInterface; */ class FormDataExtractor implements FormDataExtractorInterface { - /** - * @var ValueExporter - */ private $valueExporter; - /** - * Constructs a new data extractor. - */ public function __construct(ValueExporter $valueExporter = null) { $this->valueExporter = $valueExporter ?: new ValueExporter(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php index c51132518b..3295e3d85f 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php @@ -108,10 +108,10 @@ class IntegerToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCas public function testReverseTransformWithGrouping() { - // Since we test against "de_AT", we need the full implementation + // Since we test against "de_DE", we need the full implementation IntlTestHelper::requireFullIntl($this); - \Locale::setDefault('de_AT'); + \Locale::setDefault('de_DE'); $transformer = new IntegerToLocalizedStringTransformer(null, true); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php index 2ea4e9dd2a..ab58d3685d 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php @@ -54,8 +54,8 @@ class NumberToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCase public function provideTransformationsWithGrouping() { return array( - array(1234.5, '1.234,5', 'de_AT'), - array(12345.912, '12.345,912', 'de_AT'), + array(1234.5, '1.234,5', 'de_DE'), + array(12345.912, '12.345,912', 'de_DE'), array(1234.5, '1 234,5', 'fr'), array(1234.5, '1 234,5', 'ru'), array(1234.5, '1 234,5', 'fi'), @@ -393,10 +393,10 @@ class NumberToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCase */ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot() { - // Since we test against "de_AT", we need the full implementation + // Since we test against "de_DE", we need the full implementation IntlTestHelper::requireFullIntl($this); - \Locale::setDefault('de_AT'); + \Locale::setDefault('de_DE'); $transformer = new NumberToLocalizedStringTransformer(null, true); @@ -408,10 +408,10 @@ class NumberToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCase */ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGroupSep() { - // Since we test against "de_AT", we need the full implementation + // Since we test against "de_DE", we need the full implementation IntlTestHelper::requireFullIntl($this); - \Locale::setDefault('de_AT'); + \Locale::setDefault('de_DE'); $transformer = new NumberToLocalizedStringTransformer(null, true); diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index daacb82a44..c183372e2d 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -27,7 +27,7 @@ class JsonResponse extends Response protected $data; protected $callback; - // Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML. + // Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML. // 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT const DEFAULT_ENCODING_OPTIONS = 15; @@ -51,7 +51,18 @@ class JsonResponse extends Response } /** - * {@inheritdoc} + * Factory method for chainability. + * + * Example: + * + * return JsonResponse::create($data, 200) + * ->setSharedMaxAge(300); + * + * @param mixed $data The json response data + * @param int $status The response status code + * @param array $headers An array of response headers + * + * @return JsonResponse */ public static function create($data = null, $status = 200, $headers = array()) { diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php index 80e97f17cd..25f3d57b54 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php @@ -72,6 +72,8 @@ interface FlashBagInterface extends SessionBagInterface /** * Sets all flash messages. + * + * @param array $messages */ public function setAll(array $messages); diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index 7efc1348c8..8408f000cd 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -214,6 +214,8 @@ class MongoDbSessionHandler implements \SessionHandlerInterface * Return an instance of a MongoDate or \MongoDB\BSON\UTCDateTime * * @param int $seconds An integer representing UTC seconds since Jan 1 1970. Defaults to now. + * + * @return \MongoDate|\MongoDB\BSON\UTCDateTime */ private function createDateTime($seconds = null) { diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php b/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php index 7899562376..3559e39e90 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php @@ -42,6 +42,7 @@ class LazyLoadingFragmentHandler extends FragmentHandler /** * Adds a service as a fragment renderer. * + * @param string $name The service name * @param string $renderer The render service id */ public function addRendererService($name, $renderer) diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php index af0721f57e..f31e243770 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php @@ -78,7 +78,7 @@ class Profiler * * @param Response $response A Response instance * - * @return Profile A Profile instance + * @return Profile|false A Profile instance */ public function loadProfileFromResponse(Response $response) { diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php index 842a3869cb..b9d8f06f00 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php @@ -21,7 +21,7 @@ use Symfony\Component\HttpKernel\KernelEvents; class ValidateRequestListenerTest extends \PHPUnit_Framework_TestCase { /** - * @expectedException Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException + * @expectedException \Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException */ public function testListenerThrowsWhenMasterRequestHasInconsistentClientIps() { diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php index 8587aa3aae..ee3d999361 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php @@ -303,7 +303,7 @@ class HttpKernelTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Symfony\Component\HttpKernel\Exception\BadRequestHttpException + * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException */ public function testInconsistentClientIpsOnMasterRequests() { diff --git a/src/Symfony/Component/HttpKernel/UriSigner.php b/src/Symfony/Component/HttpKernel/UriSigner.php index c2d0d79664..fa84899064 100644 --- a/src/Symfony/Component/HttpKernel/UriSigner.php +++ b/src/Symfony/Component/HttpKernel/UriSigner.php @@ -98,7 +98,7 @@ class UriSigner $host = isset($url['host']) ? $url['host'] : ''; $port = isset($url['port']) ? ':'.$url['port'] : ''; $user = isset($url['user']) ? $url['user'] : ''; - $pass = isset($url['pass']) ? ':'.$url['pass'] : ''; + $pass = isset($url['pass']) ? ':'.$url['pass'] : ''; $pass = ($user || $pass) ? "$pass@" : ''; $path = isset($url['path']) ? $url['path'] : ''; $query = isset($url['query']) && $url['query'] ? '?'.$url['query'] : ''; diff --git a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php index 592969475e..e689638573 100644 --- a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php +++ b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php @@ -550,7 +550,7 @@ class IntlDateFormatter try { $this->dateTimeZone = new \DateTimeZone($timeZoneId); if ('GMT' !== $timeZoneId && $this->dateTimeZone->getName() !== $timeZoneId) { - $timeZoneId = $timeZone = $this->getTimeZoneId(); + $timeZone = $this->getTimeZoneId(); } } catch (\Exception $e) { $timeZoneId = $timeZone = $this->getTimeZoneId(); diff --git a/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php b/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php index cfe82ca3c3..d12b892a10 100644 --- a/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php +++ b/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php @@ -42,6 +42,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter * @param string $path * @param BundleEntryReaderInterface $reader * @param LocaleDataProvider $localeProvider + * @param ScriptDataProvider $scriptProvider */ public function __construct($path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider, ScriptDataProvider $scriptProvider) { diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 317b5ef69f..cd57f3a8c3 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -939,7 +939,7 @@ class ProcessTest extends \PHPUnit_Framework_TestCase /** * @dataProvider provideMethodsThatNeedATerminatedProcess - * @expectedException Symfony\Component\Process\Exception\LogicException + * @expectedException \Symfony\Component\Process\Exception\LogicException * @expectedExceptionMessage Process must be terminated before calling */ public function testMethodsThatNeedATerminatedProcess($method) diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php index 7309042d47..cd2f1b8735 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php @@ -101,7 +101,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Symfony\Component\Security\Core\Exception\AuthenticationException + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationException * @expectedExceptionMessage Authentication failed. */ public function testOnCoreSecurityIgnoresAuthenticationOptionallyRethrowsExceptionThrownAuthenticationManagerImplementation() diff --git a/src/Symfony/Component/Templating/PhpEngine.php b/src/Symfony/Component/Templating/PhpEngine.php index 0d34d9d384..41b7daef4e 100644 --- a/src/Symfony/Component/Templating/PhpEngine.php +++ b/src/Symfony/Component/Templating/PhpEngine.php @@ -142,6 +142,7 @@ class PhpEngine implements EngineInterface, \ArrayAccess throw new \InvalidArgumentException('Invalid parameter (view)'); } + // the view variable is exposed to the require file below $view = $this; if ($this->evalTemplate instanceof FileStorage) { extract($this->evalParameters, EXTR_SKIP); diff --git a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php index f9aae42d8c..00a33d253a 100644 --- a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php @@ -26,7 +26,7 @@ class MoFileDumper extends FileDumper */ public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) { - $output = $sources = $targets = $sourceOffsets = $targetOffsets = ''; + $sources = $targets = $sourceOffsets = $targetOffsets = ''; $offsets = array(); $size = 0; diff --git a/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/src/Symfony/Component/Translation/Loader/MoFileLoader.php index 2fcada2847..025fcd89cc 100644 --- a/src/Symfony/Component/Translation/Loader/MoFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/MoFileLoader.php @@ -80,7 +80,7 @@ class MoFileLoader extends FileLoader $messages = array(); for ($i = 0; $i < $count; ++$i) { - $singularId = $pluralId = null; + $pluralId = null; $translated = null; fseek($stream, $offsetId + $i * 8); diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index 8a9627b016..7e85e2a07b 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -17,7 +17,7 @@ namespace Symfony\Component\Validator\Constraints; * When validating a group sequence, each group will only be validated if all * of the previous groups in the sequence succeeded. For example: * - * $validator->validate($address, null, new GroupSequence('Basic', 'Strict')); + * $validator->validate($address, null, new GroupSequence(array('Basic', 'Strict'))); * * In the first step, all constraints that belong to the group "Basic" will be * validated. If none of the constraints fail, the validator will then validate diff --git a/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php b/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php index 3b13c09618..1141779ca3 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php @@ -37,6 +37,7 @@ abstract class AbstractTest extends AbstractValidatorTest /** * @param MetadataFactoryInterface $metadataFactory + * @param array $objectInitializers * * @return ValidatorInterface */ diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index fe1763c1a5..6a3b451bda 100644 --- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -25,7 +25,6 @@ class VarCloner extends AbstractCloner protected function doClone($var) { $useExt = $this->useExt; - $i = 0; // Current iteration position in $queue $len = 1; // Length of $queue $pos = 0; // Number of cloned items past the first level $refsCounter = 0; // Hard references counter diff --git a/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php b/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php index 685a7ffd3a..f3e951f393 100644 --- a/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php @@ -146,8 +146,9 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface /** * Generic line dumper callback. * - * @param string $line The line to write - * @param int $depth The recursive depth in the dumped structure + * @param string $line The line to write + * @param int $depth The recursive depth in the dumped structure + * @param string $indentPad The line indent pad */ protected function echoLine($line, $depth, $indentPad) {