Merge branch '2.6' into 2.7

* 2.6: (25 commits)
  Added information when an error occured during validation of an answer of a question
  Adding note about known BC issues
  Adding note about the PdoSessionHandler BC break
  [Console] fixes some typos and phpdoc.
  fix phpdoc's alignment
  [2.6] CS Fixes And Removed An Unused Import
  Minor phpcs fixes
  [ClassLoader] Fix undefined index in ClassCollectionLoader
  CS fixes
  Revert "minor #12821 Remove deprecated class (MasterB)"
  [2.3] More cs fixes
  Removed unused imports
  CS fixes
  bumped Symfony version to 2.6.2
  updated VERSION for 2.6.1
  updated CHANGELOG for 2.6.1
  bumped Symfony version to 2.5.9
  updated VERSION for 2.5.8
  update CONTRIBUTORS for 2.5.8
  updated CHANGELOG for 2.5.8
  ...

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
This commit is contained in:
Fabien Potencier 2014-12-08 09:43:57 +01:00
commit d0d7ae24e4
157 changed files with 578 additions and 449 deletions

View File

@ -7,6 +7,16 @@ 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.23 (2014-12-03)
* bug #12811 Configure firewall's kernel exception listener with configured entry point or a default entry point (rjkip)
* bug #12784 [DependencyInjection] make paths relative to __DIR__ in the generated container (nicolas-grekas)
* bug #12716 [ClassLoader] define constant only if it wasn't defined before (xabbuh)
* bug #12553 [Debug] fix error message on double exception (nicolas-grekas)
* bug #12550 [FrameworkBundle] backport #12489 (xabbuh)
* bug #12570 Fix initialized() with aliased services (Daniel Wehner)
* bug #12137 [FrameworkBundle] cache:clear command fills *.php.meta files with wrong data (Strate)
* 2.3.22 (2014-11-20)
* bug #12525 [Bundle][FrameworkBundle] be smarter when guessing the document root (xabbuh)

View File

@ -7,6 +7,17 @@ in 2.5 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.5.0...v2.5.1
* 2.5.8 (2014-12-03)
* bug #12811 Configure firewall's kernel exception listener with configured entry point or a default entry point (rjkip)
* bug #12784 [DependencyInjection] make paths relative to __DIR__ in the generated container (nicolas-grekas)
* bug #12716 [ClassLoader] define constant only if it wasn't defined before (xabbuh)
* bug #12553 [Debug] fix error message on double exception (nicolas-grekas)
* bug #12550 [FrameworkBundle] backport #12489 (xabbuh)
* bug #12570 Fix initialized() with aliased services (Daniel Wehner)
* bug #12267 [Form][WebProfiler] Empty form names fix (kix)
* bug #12137 [FrameworkBundle] cache:clear command fills *.php.meta files with wrong data (Strate)
* 2.5.7 (2014-11-20)
* bug #12525 [Bundle][FrameworkBundle] be smarter when guessing the document root (xabbuh)

View File

@ -7,6 +7,14 @@ in 2.6 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.6.0...v2.6.1
* 2.6.1 (2014-12-03)
* bug #12823 [DependencyInjection] fix PhpDumper (nicolas-grekas)
* bug #12811 Configure firewall's kernel exception listener with configured entry point or a default entry point (rjkip)
* bug #12770 [Filesystem] fix lock file permissions (nicolas-grekas)
* bug #12784 [DependencyInjection] make paths relative to __DIR__ in the generated container (nicolas-grekas)
* bug #12716 [ClassLoader] define constant only if it wasn't defined before (xabbuh)
* 2.6.0 (2014-11-28)
* bug #12553 [Debug] fix error message on double exception (nicolas-grekas)

View File

@ -38,9 +38,9 @@ Symfony is the result of the work of many people who made the code better
- Bulat Shakirzyanov (avalanche123)
- Francis Besset (francisbesset)
- Saša Stamenković (umpirsky)
- Wouter De Jong (wouterj)
- Miha Vrhovnik
- Henrik Bjørnskov (henrikbjorn)
- Wouter De Jong (wouterj)
- Konstantin Kudryashov (everzet)
- Bilal Amarni (bamarni)
- Florin Patan (florinpatan)
@ -62,10 +62,10 @@ Symfony is the result of the work of many people who made the code better
- Fran Moreno (franmomu)
- Antoine Hérault (herzult)
- Toni Uebernickel (havvg)
- Ait Boudad Abdellatif (aitboudad)
- Luis Cordova (cordoval)
- Arnaud Le Blanc (arnaud-lb)
- Kevin Bond (kbond)
- Ait Boudad Abdellatif (aitboudad)
- Tim Nagel (merk)
- Brice BERNARD (brikou)
- marc.weistroff
@ -75,10 +75,10 @@ Symfony is the result of the work of many people who made the code better
- excelwebzone
- Jacob Dreesen (jdreesen)
- Florian Voutzinos (florianv)
- Jérôme Tamarelle (gromnan)
- Adrien Brault (adrienbrault)
- Gábor Egyed (1ed)
- Fabien Pennequin (fabienpennequin)
- Jérôme Tamarelle (gromnan)
- Michal Piotrowski (eventhorizon)
- Gordon Franke (gimler)
- Robert Schönthal (digitalkaoz)
@ -97,6 +97,7 @@ Symfony is the result of the work of many people who made the code better
- Javier Eguiluz (javier.eguiluz)
- Richard Shank (iampersistent)
- Kévin Dunglas (dunglas)
- Stefano Sala (stefano.sala)
- Clemens Tolboom
- Helmer Aaviksoo
- Sebastiaan Stok (sstok)
@ -108,7 +109,6 @@ Symfony is the result of the work of many people who made the code better
- Artur Kotyrba
- Guilherme Blanco (guilhermeblanco)
- Rouven Weßling (realityking)
- Stefano Sala (stefano.sala)
- Dmitrii Chekaliuk (lazyhammer)
- Clément JOBEILI (dator)
- Dorian Villet (gnutix)
@ -117,6 +117,7 @@ Symfony is the result of the work of many people who made the code better
- Mario A. Alvarez Garcia (nomack84)
- Dennis Benkert (denderello)
- Benjamin Dulau (dbenjamin)
- Matthias Pigulla (mpdude)
- Andreas Hucks (meandmymonkey)
- Andréia Bohner (andreia)
- Noel Guilbert (noel)
@ -140,9 +141,9 @@ Symfony is the result of the work of many people who made the code better
- Lars Strojny (lstrojny)
- Joel Wurtz (brouznouf)
- Rui Marinho (ruimarinho)
- Matthias Pigulla (mpdude)
- Julien Brochet (mewt)
- Tugdual Saunier (tucksaun)
- Graham Campbell (graham)
- Sergey Linnik (linniksa)
- Marcel Beerta (mazen)
- hacfi (hifi)
@ -280,7 +281,9 @@ Symfony is the result of the work of many people who made the code better
- Seb Koelen
- Christoph Mewes (xrstf)
- Vitaliy Tverdokhlib (vitaliytv)
- Ariel Ferrandini (aferrandini)
- Dirk Pahl (dirkaholic)
- Stepan Anchugov (kix)
- cedric lombardot (cedriclombardot)
- Jonas Flodén (flojon)
- Marcin Sikoń (marphi)
@ -290,6 +293,7 @@ Symfony is the result of the work of many people who made the code better
- François-Xavier de Guillebon (de-gui_f)
- boombatower
- Fabrice Bernhard (fabriceb)
- Jérôme Macias (jeromemacias)
- Fabian Lange (codingfabian)
- Yoshio HANAWA
- Baptiste Clavié (talus)
@ -317,14 +321,19 @@ Symfony is the result of the work of many people who made the code better
- Erik Trapman (eriktrapman)
- De Cock Xavier (xdecock)
- Norbert Orzechowicz (norzechowicz)
- Tobias Nyholm (tobias)
- Matthijs van den Bos (matthijs)
- Lenard Palko
- Nils Adermann (naderman)
- Gábor Fási
- Benjamin Leveque (benji07)
- Maximilian Reichel (phramz)
- sasezaki
- Florian Rey (nervo)
- Rodrigo Borrego Bernabé (rodrigobb)
- Denis Gorbachev (starfall)
- Steven Surowiec
- Kevin Saliou (kbsali)
- Daniel Tschinder
- Ryan
- Alexander Deruwe (aderuwe)
@ -338,9 +347,11 @@ Symfony is the result of the work of many people who made the code better
- Aurélien Fredouelle
- Pavel Campr (pcampr)
- Disquedur
- Marc Morales Valldepérez (kuert)
- Geoffrey Tran (geoff)
- Jan Behrens
- Sebastian Krebs
- Lorenz Schori
- Christopher Davis (chrisguitarguy)
- Thomas Lallement (raziel057)
- alcaeus
@ -364,11 +375,13 @@ Symfony is the result of the work of many people who made the code better
- Åsmund Garfors
- Maxime Douailin
- Javier López (loalf)
- Reinier Kip
- Dustin Dobervich (dustin10)
- Warnar Boekkooi
- Alexander M. Turek (derrabus)
- Sebastian Marek (proofek)
- Erkhembayar Gantulga (erheme318)
- David Fuhr
- Kamil Kokot (pamil)
- Florian Lonqueu-Brochard (florianlb)
- Rostyslav Kinash
@ -378,6 +391,7 @@ Symfony is the result of the work of many people who made the code better
- Stefan Warman
- Tristan Maindron (tmaindron)
- Ke WANG (yktd26)
- Strate
- Jakub Kucharovic
- Miquel Rodríguez Telep (mrtorrent)
- Sergey Kolodyazhnyy (skolodyazhnyy)
@ -419,6 +433,7 @@ Symfony is the result of the work of many people who made the code better
- Alex Xandra Albert Sim
- Yuen-Chi Lian
- Besnik Br
- Jerzy Zawadzki (jzawadzki)
- Joshua Nye
- avorobiev
- Venu
@ -444,16 +459,17 @@ Symfony is the result of the work of many people who made the code better
- Krzysiek Łabuś
- Xavier Lacot (xavier)
- Olivier Maisonneuve (olineuve)
- Blanchon Vincent (blanchonvincent)
- Francis Turmel (fturmel)
- Loick Piera (pyrech)
- cgonzalez
- Ben
- Lee Rowlands
- Jayson Xu (superjavason)
- Tobias Nyholm (tobias)
- Jaik Dean (jaikdean)
- Harm van Tilborg
- Jan Prieser
- Damien Alexandre (damienalexandre)
- James Michael DuPont
- Tom Klingenberg
- Christopher Hall (mythmakr)
@ -466,6 +482,7 @@ Symfony is the result of the work of many people who made the code better
- frost-nzcr4
- Abhoryo
- Fabian Vogler (fabian)
- Korvin Szanto
- Maksim Kotlyar (makasim)
- Neil Ferreira
- Dmitry Parnas (parnas)
@ -474,6 +491,7 @@ Symfony is the result of the work of many people who made the code better
- Tony Malzhacker
- Cyril Quintin (cyqui)
- Gerard van Helden (drm)
- David Romaní
- Patrick Allaert
- Gustavo Falco (gfalco)
- Aleksey Podskrebyshev
@ -488,6 +506,7 @@ Symfony is the result of the work of many people who made the code better
- Geert De Deckere (geertdd)
- Jan Kramer (jankramer)
- abdul malik ikhsan (samsonasik)
- Henry Snoek (snoek09)
- Timothée Barray (tyx)
- Benjamin Laugueux (yzalis)
- Christian Morgan
@ -501,6 +520,7 @@ Symfony is the result of the work of many people who made the code better
- Marc Abramowitz
- Martijn Evers
- Jacques Moati
- Balazs Csaba (balazscsaba2006)
- Harry Walter (haswalt)
- Michael Roterman (wtfzdotnet)
- Arno Geurts
@ -509,6 +529,7 @@ Symfony is the result of the work of many people who made the code better
- Maks
- Gábor Tóth
- Daniel Cestari
- Brunet Laurent (lbrunet)
- Magnus Nordlander (magnusnordlander)
- Mikhail Yurasov (mym)
- LOUARDI Abdeltif (ouardisoft)
@ -524,6 +545,7 @@ Symfony is the result of the work of many people who made the code better
- Ben Ramsey (ramsey)
- Christian Jul Jensen
- The Whole Life to Learn
- Farhad Safarov
- Liverbool (liverbool)
- Sam Malone
- Phan Thanh Ha (haphan)
@ -541,12 +563,10 @@ Symfony is the result of the work of many people who made the code better
- fabios
- Sander Coolen (scoolen)
- Nicolas Le Goff (nlegoff)
- Ariel Ferrandini (aferrandini)
- Manuele Menozzi
- Anton Babenko (antonbabenko)
- Irmantas Šiupšinskas (irmantas)
- Danilo Silva
- Stepan Anchugov (kix)
- Zachary Tong (polyfractal)
- Hryhorii Hrebiniuk
- dantleech
@ -643,7 +663,6 @@ Symfony is the result of the work of many people who made the code better
- Krzysztof Przybyszewski
- Paul Matthews
- Juan Traverso
- Jerzy Zawadzki (jzawadzki)
- Philipp Strube
- Christian Sciberras
- Clement Herreman (clemherreman)
@ -749,6 +768,7 @@ Symfony is the result of the work of many people who made the code better
- Vladyslav Petrovych
- Matthew J Mucklo
- fdgdfg (psampaz)
- Stéphane Seng
- Maxwell Vandervelde
- kaywalker
- Mike Meier
@ -775,6 +795,7 @@ Symfony is the result of the work of many people who made the code better
- Dan Harper
- moldcraft
- Ramon Kleiss (akathos)
- César Suárez (csuarez)
- Nicolas Badey (nico-b)
- Shane Preece (shane)
- povilas
@ -802,9 +823,9 @@ Symfony is the result of the work of many people who made the code better
- catch
- Alexandre Segura
- Josef Cech
- Arnau González (arnaugm)
- Nate (frickenate)
- Matthew Foster (mfoster)
- Maximilian Reichel (phramz)
- Paul Seiffert (seiffert)
- Vasily Khayrulin (sirian)
- Stefan Koopmanschap (skoop)
@ -820,7 +841,6 @@ Symfony is the result of the work of many people who made the code better
- Yassine Guedidi (yguedidi)
- Luis Muñoz
- Andreas
- Strate
- Thomas Chmielowiec
- Andrey Ryaguzov
- Manatsawin Hanmongkolchai
@ -835,6 +855,7 @@ Symfony is the result of the work of many people who made the code better
- Thierry Marianne (thierrymarianne)
- Nick Stemerdink
- jjanvier
- Julius Beckmann
- Romain Dorgueil
- Grayson Koonce (breerly)
- Benjamin Zikarsky (bzikarsky)
@ -850,6 +871,7 @@ Symfony is the result of the work of many people who made the code better
- Mike Meier
- Warwick
- Chris
- Daniel Wehner
- efeen
- Michał Dąbrowski (defrag)
- Dominik Zogg (dominik.zogg)
@ -857,7 +879,6 @@ Symfony is the result of the work of many people who made the code better
- Kevin Vergauwen (innocenzo)
- Alessio Baglio (ioalessio)
- John Bafford (jbafford)
- Jérôme Macias (jeromemacias)
- Jordi Llonch (jordillonch)
- Cédric Dugat (ph3nol)
- Philip Dahlstrøm (phidah)
@ -874,6 +895,7 @@ Symfony is the result of the work of many people who made the code better
- Julien Moulin (lizjulien)
- Yannick Warnier (ywarnier)
- Kevin Decherf
- Jason Woods
- dened
- Sam Ward
- Walther Lalk
@ -888,6 +910,7 @@ Symfony is the result of the work of many people who made the code better
- Alexey Prilipko
- bertillon
- Hans Nilsson (hansnilsson)
- Ioana Hazsda (ioana-hazsda)
- Jan Marek (janmarek)
- Mark de Haan (markdehaan)
- Dan Patrick (mdpatrick)
@ -906,6 +929,7 @@ Symfony is the result of the work of many people who made the code better
- Ari Pringle (apringle)
- Dan Ordille (dordille)
- Jan Eichhorn (exeu)
- Grégory Pelletier (ip512)
- John Nickell (jrnickell)
- Julien DIDIER (juliendidier)
- Florian Pfitzer (marmelatze)
@ -943,6 +967,7 @@ Symfony is the result of the work of many people who made the code better
- Rafał
- Adria Lopez (adlpz)
- Rosio (ben-rosio)
- Simon Paarlberg (blamh)
- Masao Maeda (brtriver)
- Darius Leskauskas (darles)
- Dave Hulbert (dave1010)
@ -955,12 +980,16 @@ Symfony is the result of the work of many people who made the code better
- gondo (gondo)
- Gusakov Nikita (hell0w0rd)
- Osman Üngür (import)
- Javier Núñez Berrocoso (javiernuber)
- Jelle Bekker (jbekker)
- Ian Jenkins (jenkoian)
- Jorge Martin (jorgemartind)
- Kevin Herrera (kherge)
- Luis Ramón López López (lrlopez)
- Muriel (metalmumu)
- Michaël Perrin (michael.perrin)
- Michael Pohlers (mick_the_big)
- Cayetano Soriano Gallego (neoshadybeat)
- Pablo Monterde Perez (plebs)
- Jimmy Leger (redpanda)
- Cyrille Jouineau (tuxosaurus)
@ -1067,9 +1096,11 @@ Symfony is the result of the work of many people who made the code better
- Michaël VEROUX
- sualko
- Nicolas Roudaire
- Alfonso (afgar)
- Andreas Forsblom (aforsblo)
- Alaattin Kahramanlar (alaattin)
- Alex Olmos (alexolmos)
- Antonio Mansilla (amansilla)
- Juan Ases García (ases)
- Daniel Basten (axhm3a)
- Bill Hance (billhance)
@ -1078,7 +1109,6 @@ Symfony is the result of the work of many people who made the code better
- Kousuke Ebihara (co3k)
- Loïc Vernet (coil)
- Christoph Schaefer (cvschaefer)
- Damien Alexandre (damienalexandre)
- Damon Jones (damon__jones)
- Daniel Londero (dlondero)
- Adel ELHAIBA (eadel)
@ -1088,6 +1118,7 @@ Symfony is the result of the work of many people who made the code better
- Sorin Gitlan (forapathy)
- Yohan Giarelli (frequence-web)
- Massimiliano Arione (garak)
- Gerry Vandermaesen (gerryvdm)
- Ghazy Ben Ahmed (ghazy)
- Arash Tabriziyan (ghost098)
- ibasaw (ibasaw)
@ -1099,6 +1130,7 @@ Symfony is the result of the work of many people who made the code better
- Justin Rainbow (jrainbow)
- JuntaTom (juntatom)
- Johnson Page (jwpage)
- Ismail Faizi (kanafghan)
- Sébastien Armand (khepin)
- Krzysztof Menżyk (krymen)
- samuel laulhau (lalop)
@ -1131,6 +1163,7 @@ Symfony is the result of the work of many people who made the code better
- Vincent (vincent1870)
- Eugene Babushkin (warl)
- Xavier Amado (xamado)
- Alexander Schwenn (xelaris)
- Dawid Pakuła (zulusx)
- Florent Cailhol
- szymek

View File

@ -1,6 +1,12 @@
UPGRADE FROM 2.5 to 2.6
=======================
Known Backwards-Compatability Breaks
------------------------------------
* If you use the `PdoSessionHandler`, the session table now has a different
schema and must be modified. Look below for more details.
Form
----
@ -106,6 +112,20 @@ HttpFoundation
--------------
* The `PdoSessionHandler` to store sessions in a database changed significantly.
This introduced a **backwards-compatability** break in the schema of the
session table. The following changes must be made to your session table:
- Add a new integer column called `sess_lifetime`. Assuming you have the
default column and table names, in MySQL this would be:
ALTER TABLE `session` ADD `sess_lifetime` INT NOT NULL ;
- Change the data column (default: `sess_value`) to be a Blob type. In
MySQL this would be:
ALTER TABLE `session` CHANGE `sess_value` `session_value` BLOB NOT NULL;
There is also an [issue](https://github.com/symfony/symfony/issues/12834)
that affects Windows servers.
The changes to the `PdoSessionHandler` are:
- By default, it now implements session locking to prevent loss of data by concurrent access to the same session.
- It does so using a transaction between opening and closing a session. For this reason, it's not
recommended to use the same database connection that you also use for your application logic.

View File

@ -310,10 +310,10 @@ abstract class AbstractDoctrineExtension extends Extension
/**
* Loads a cache driver.
*
* @param string $cacheDriverServiceId The cache driver name.
* @param string $objectManagerName The object manager name.
* @param array $cacheDriver The cache driver mapping.
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container The ContainerBuilder instance.
* @param string $cacheDriverServiceId The cache driver name.
* @param string $objectManagerName The object manager name.
* @param array $cacheDriver The cache driver mapping.
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container The ContainerBuilder instance.
*
* @return string
*

View File

@ -196,7 +196,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
* @return string a service definition name
*
* @throws ParameterNotFoundException if none of the managerParameters has a
* non-empty value.
* non-empty value.
*/
private function getConfigurationServiceName(ContainerBuilder $container)
{

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\Doctrine\DependencyInjection\Security\UserProvider;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\UserProviderFactoryInterface;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View File

@ -54,17 +54,17 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
public function testFixManagersAutoMappingsWithTwoAutomappings()
{
$emConfigs = array(
'em1'=> array(
'auto_mapping' => true
'em1' => array(
'auto_mapping' => true,
),
'em2'=> array(
'auto_mapping' => true
'em2' => array(
'auto_mapping' => true,
),
);
$bundles = array(
'FristBundle'=> 'My\FristBundle',
'SecondBundle'=> 'My\SecondBundle',
'FristBundle' => 'My\FristBundle',
'SecondBundle' => 'My\SecondBundle',
);
$reflection = new \ReflectionClass(get_class($this->extension));
@ -79,34 +79,34 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
return array(
array(
array( // no auto mapping on em1
'auto_mapping' => false
'auto_mapping' => false,
),
array( // no auto mapping on em2
'auto_mapping' => false
'auto_mapping' => false,
),
array(),
array()
array(),
),
array(
array( // no auto mapping on em1
'auto_mapping' => false
'auto_mapping' => false,
),
array( // auto mapping enabled on em2
'auto_mapping' => true
'auto_mapping' => true,
),
array(),
array(
'mappings' => array(
'FristBundle' => array(
'mapping' => true,
'is_bundle' => true
'is_bundle' => true,
),
'SecondBundle' => array(
'mapping' => true,
'is_bundle' => true
)
)
)
'is_bundle' => true,
),
),
),
),
array(
array( // no auto mapping on em1, but it defines SecondBundle as own
@ -114,30 +114,30 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
'mappings' => array(
'SecondBundle' => array(
'mapping' => true,
'is_bundle' => true
)
)
'is_bundle' => true,
),
),
),
array( // auto mapping enabled on em2
'auto_mapping' => true
'auto_mapping' => true,
),
array(
'mappings' => array(
'SecondBundle' => array(
'mapping' => true,
'is_bundle' => true
)
)
'is_bundle' => true,
),
),
),
array(
'mappings' => array(
'FristBundle' => array(
'mapping' => true,
'is_bundle' => true
)
)
)
)
'is_bundle' => true,
),
),
),
),
);
}
@ -147,13 +147,13 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
public function testFixManagersAutoMappings(array $originalEm1, array $originalEm2, array $expectedEm1, array $expectedEm2)
{
$emConfigs = array(
'em1'=> $originalEm1,
'em2'=> $originalEm2,
'em1' => $originalEm1,
'em2' => $originalEm2,
);
$bundles = array(
'FristBundle'=> 'My\FristBundle',
'SecondBundle'=> 'My\SecondBundle',
'FristBundle' => 'My\FristBundle',
'SecondBundle' => 'My\SecondBundle',
);
$reflection = new \ReflectionClass(get_class($this->extension));
@ -163,10 +163,10 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
$newEmConfigs = $method->invoke($this->extension, $emConfigs, $bundles);
$this->assertEquals($newEmConfigs["em1"], array_merge(array(
'auto_mapping' => false
'auto_mapping' => false,
), $expectedEm1));
$this->assertEquals($newEmConfigs["em2"], array_merge(array(
'auto_mapping' => false
'auto_mapping' => false,
), $expectedEm2));
}

View File

@ -167,7 +167,7 @@ class ConsoleHandler extends AbstractProcessingHandler implements EventSubscribe
/**
* Updates the logging level based on the verbosity setting of the console output.
*
* @return bool Whether the handler is enabled and verbosity is not set to quiet.
* @return bool Whether the handler is enabled and verbosity is not set to quiet.
*/
private function updateLevel()
{

View File

@ -11,9 +11,9 @@
namespace Symfony\Bridge\Propel1\Form\ChoiceList;
use \ModelCriteria;
use \BaseObject;
use \Persistent;
use ModelCriteria;
use BaseObject;
use Persistent;
use Symfony\Component\Form\Exception\StringCastException;
use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList;
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;

View File

@ -11,7 +11,7 @@
namespace Symfony\Bridge\Propel1\Form\DataTransformer;
use \PropelObjectCollection;
use PropelObjectCollection;
use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Exception\TransformationFailedException;

View File

@ -24,8 +24,8 @@ use Symfony\Bridge\Propel1\Form\EventListener\TranslationFormListener;
class TranslationType extends AbstractType
{
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->addEventSubscriber(

View File

@ -11,7 +11,7 @@
namespace Symfony\Bridge\Propel1\Tests\Fixtures;
use \PropelPDO;
use PropelPDO;
class Item implements \Persistent
{

View File

@ -11,7 +11,7 @@
namespace Symfony\Bridge\Propel1\Tests\Form\DataTransformer;
use \PropelObjectCollection;
use PropelObjectCollection;
use Symfony\Bridge\Propel1\Form\DataTransformer\CollectionToArrayTransformer;
use Symfony\Bridge\Propel1\Tests\Propel1TestCase;

View File

@ -141,5 +141,4 @@ EOT
// We use a custom iterator to ignore VCS files
$filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir));
}
}

View File

@ -108,9 +108,9 @@ EOF
}
/**
* @param string $warmupDir
* @param string $realCacheDir
* @param bool $enableOptionalWarmers
* @param string $warmupDir
* @param string $realCacheDir
* @param bool $enableOptionalWarmers
*/
protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = true)
{

View File

@ -81,8 +81,8 @@ abstract class Descriptor implements DescriptorInterface
/**
* Writes content to output.
*
* @param string $content
* @param bool $decorated
* @param string $content
* @param bool $decorated
*/
protected function write($content, $decorated = false)
{
@ -189,16 +189,16 @@ abstract class Descriptor implements DescriptorInterface
* Common options are:
* * name: name of listened event
*
* @param EventDispatcherInterface $eventDispatcher
* @param array $options
* @param EventDispatcherInterface $eventDispatcher
* @param array $options
*/
abstract protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = array());
/**
* Describes a callable.
*
* @param callable $callable
* @param array $options
* @param callable $callable
* @param array $options
*/
abstract protected function describeCallable($callable, array $options = array());

View File

@ -242,7 +242,7 @@ class JsonDescriptor extends Descriptor
/**
* @param EventDispatcherInterface $eventDispatcher
* @param string|null $event
* @param string|null $event
*
* @return array
*/
@ -270,7 +270,7 @@ class JsonDescriptor extends Descriptor
/**
* @param callable $callable
* @param array $options
* @param array $options
*
* @return array
*/

View File

@ -412,8 +412,8 @@ class XmlDescriptor extends Descriptor
}
/**
* @param EventDispatcherInterface $eventDispatcher
* @param string|null $event
* @param EventDispatcherInterface $eventDispatcher
* @param string|null $event
*
* @return \DOMDocument
*/

View File

@ -122,6 +122,7 @@ class ControllerNameParser
* Attempts to find a bundle that is *similar* to the given bundle name
*
* @param string $nonExistentBundleName
*
* @return string
*/
private function findAlternative($nonExistentBundleName)

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

View File

@ -12,9 +12,7 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

View File

@ -12,9 +12,7 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\TwigBundle\Controller;
use Symfony\Component\Debug\Exception\FlattenException;
use Symfony\Component\HttpKernel\Exception\FlattenException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpFoundation\Request;

View File

@ -48,10 +48,10 @@ class AssetsExtension extends \Twig_Extension
*
* Absolute paths (i.e. http://...) are returned unmodified.
*
* @param string $path A public path
* @param string $packageName The name of the asset package to use
* @param bool $absolute Whether to return an absolute URL or a relative one
* @param string|bool|null $version A specific version
* @param string $path A public path
* @param string $packageName The name of the asset package to use
* @param bool $absolute Whether to return an absolute URL or a relative one
* @param string|bool|null $version A specific version
*
* @return string A public path which takes into account the base path and URL path
*/
@ -93,8 +93,9 @@ class AssetsExtension extends \Twig_Extension
*
* @param string $url The URL that has to be absolute
*
* @return string The absolute URL
* @throws \RuntimeException
*
* @return string The absolute URL
*/
private function ensureUrlIsAbsolute($url)
{

View File

@ -38,7 +38,7 @@ class PreviewErrorControllerTest extends TestCase
$self->assertEquals($logicalControllerName, $request->attributes->get('_controller'));
$exception = $request->attributes->get('exception');
$self->assertInstanceOf('Symfony\Component\HttpKernel\Exception\FlattenException', $exception);
$self->assertInstanceOf('Symfony\Component\Debug\Exception\FlattenException', $exception);
$self->assertEquals($code, $exception->getStatusCode());
$self->assertFalse($request->attributes->get('showException'));

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\DependencyInjection;
use Symfony\Bundle\WebProfilerBundle\Tests\TestCase;
use Symfony\Bundle\WebProfilerBundle\DependencyInjection\WebProfilerExtension;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View File

@ -353,14 +353,17 @@ class ClassCollectionLoader
$unresolved = new \ArrayObject();
}
$nodeName = $node->getName();
$unresolved[$nodeName] = $node;
foreach ($tree[$nodeName] as $dependency) {
if (!$resolved->offsetExists($dependency->getName())) {
self::resolveDependencies($tree, $dependency, $resolved, $unresolved);
if (isset($tree[$nodeName])) {
$unresolved[$nodeName] = $node;
foreach ($tree[$nodeName] as $dependency) {
if (!$resolved->offsetExists($dependency->getName())) {
self::resolveDependencies($tree, $dependency, $resolved, $unresolved);
}
}
$resolved[$nodeName] = $node;
unset($unresolved[$nodeName]);
}
$resolved[$nodeName] = $node;
unset($unresolved[$nodeName]);
return $resolved;
}

View File

@ -77,7 +77,7 @@ class Psr4ClassLoader
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend
* @param bool $prepend
*/
public function register($prepend = false)
{

View File

@ -146,6 +146,38 @@ class ClassCollectionLoaderTest extends \PHPUnit_Framework_TestCase
);
}
public function testFixClassWithTraitsOrdering()
{
if (PHP_VERSION_ID < 50400) {
$this->markTestSkipped('Requires PHP > 5.4');
return;
}
require_once __DIR__.'/Fixtures/ClassesWithParents/CTrait.php';
require_once __DIR__.'/Fixtures/ClassesWithParents/F.php';
require_once __DIR__.'/Fixtures/ClassesWithParents/G.php';
$classes = array(
'ClassesWithParents\\F',
'ClassesWithParents\\G',
);
$expected = array(
'ClassesWithParents\\CTrait',
'ClassesWithParents\\F',
'ClassesWithParents\\G',
);
$r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader');
$m = $r->getMethod('getOrderedClasses');
$m->setAccessible(true);
$ordered = $m->invoke('Symfony\Component\ClassLoader\ClassCollectionLoader', $classes);
$this->assertEquals($expected, array_map(function ($class) { return $class->getName(); }, $ordered));
}
/**
* @dataProvider getFixNamespaceDeclarationsData
*/

View File

@ -0,0 +1,8 @@
<?php
namespace ClassesWithParents;
class F
{
use CTrait;
}

View File

@ -0,0 +1,8 @@
<?php
namespace ClassesWithParents;
class G
{
use CTrait;
}

View File

@ -43,7 +43,7 @@ class FileLoaderLoadException extends \Exception
if (null === $sourceResource) {
$message .= sprintf('(which is loaded in resource "%s")', $this->varToString($resource));
} else {
$message .= sprintf('(which is being imported from "%s")',$this->varToString($sourceResource));
$message .= sprintf('(which is being imported from "%s")', $this->varToString($sourceResource));
}
$message .= '.';
@ -51,14 +51,14 @@ class FileLoaderLoadException extends \Exception
} elseif (null === $sourceResource) {
$message .= sprintf('Cannot load resource "%s".', $this->varToString($resource));
} else {
$message .= sprintf('Cannot import resource "%s" from "%s".',$this->varToString($resource),$this->varToString($sourceResource));
$message .= sprintf('Cannot import resource "%s" from "%s".', $this->varToString($resource), $this->varToString($sourceResource));
}
// Is the resource located inside a bundle?
if ('@' === $resource[0]) {
$parts = explode(DIRECTORY_SEPARATOR, $resource);
$bundle = substr($parts[0], 1);
$message .= ' '.sprintf('Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.',$bundle);
$message .= ' '.sprintf('Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle);
}
parent::__construct($message, $code, $previous);

View File

@ -800,8 +800,8 @@ class Application
*
* Can be useful to force terminal dimensions for functional tests.
*
* @param int $width The width
* @param int $height The height
* @param int $width The width
* @param int $height The height
*
* @return Application The current application
*/
@ -1041,8 +1041,8 @@ class Application
* Finds alternative of $name among $collection,
* if nothing is found in $collection, try in $abbrevs
*
* @param string $name The string
* @param array|\Traversable $collection The collection
* @param string $name The string
* @param array|\Traversable $collection The collection
*
* @return array A sorted array of similar string
*/

View File

@ -59,8 +59,8 @@ abstract class Descriptor implements DescriptorInterface
/**
* Writes content to output.
*
* @param string $content
* @param bool $decorated
* @param string $content
* @param bool $decorated
*/
protected function write($content, $decorated = false)
{

View File

@ -151,7 +151,7 @@ class ProgressBar
/**
* Gets the progress bar start time.
*
* @return int The progress bar start time
* @return int The progress bar start time
*/
public function getStartTime()
{
@ -161,7 +161,7 @@ class ProgressBar
/**
* Gets the progress bar maximal steps.
*
* @return int The progress bar max steps
* @return int The progress bar max steps
*/
public function getMaxSteps()
{
@ -173,7 +173,7 @@ class ProgressBar
*
* @deprecated since 2.6, to be removed in 3.0. Use {@link getProgress()} instead.
*
* @return int The progress bar step
* @return int The progress bar step
*/
public function getStep()
{
@ -195,7 +195,7 @@ class ProgressBar
*
* @internal This method is public for PHP 5.3 compatibility, it should not be used.
*
* @return int The progress bar step width
* @return int The progress bar step width
*/
public function getStepWidth()
{
@ -215,7 +215,7 @@ class ProgressBar
/**
* Sets the progress bar width.
*
* @param int $size The progress bar size
* @param int $size The progress bar size
*/
public function setBarWidth($size)
{
@ -225,7 +225,7 @@ class ProgressBar
/**
* Gets the progress bar width.
*
* @return int The progress bar size
* @return int The progress bar size
*/
public function getBarWidth()
{
@ -318,7 +318,7 @@ class ProgressBar
/**
* Sets the redraw frequency.
*
* @param int $freq The frequency in steps
* @param int $freq The frequency in steps
*/
public function setRedrawFrequency($freq)
{
@ -346,7 +346,7 @@ class ProgressBar
/**
* Advances the progress output X steps.
*
* @param int $step Number of steps to advance
* @param int $step Number of steps to advance
*
* @throws \LogicException
*/
@ -360,7 +360,7 @@ class ProgressBar
*
* @deprecated since 2.6, to be removed in 3.0. Use {@link setProgress()} instead.
*
* @param int $step The current progress
* @param int $step The current progress
*
* @throws \LogicException
*/
@ -382,7 +382,7 @@ class ProgressBar
/**
* Sets the current progress.
*
* @param int $step The current progress
* @param int $step The current progress
*
* @throws \LogicException
*/

View File

@ -164,7 +164,7 @@ class QuestionHelper extends Helper
* Autocompletes a question.
*
* @param OutputInterface $output
* @param Question $question
* @param Question $question
*
* @return string
*/
@ -281,9 +281,9 @@ class QuestionHelper extends Helper
/**
* Gets a hidden response from user.
*
* @param OutputInterface $output An Output instance
* @param OutputInterface $output An Output instance
*
* @return string The answer
* @return string The answer
*
* @throws \RuntimeException In case the fallback is deactivated and the response cannot be hidden
*/
@ -341,11 +341,11 @@ class QuestionHelper extends Helper
/**
* Validates an attempt.
*
* @param callable $interviewer A callable that will ask for a question and return the result
* @param OutputInterface $output An Output instance
* @param Question $question A Question instance
* @param callable $interviewer A callable that will ask for a question and return the result
* @param OutputInterface $output An Output instance
* @param Question $question A Question instance
*
* @return string The validated response
* @return string The validated response
*
* @throws \Exception In case the max number of attempts has been reached and no valid response has been given
*/
@ -355,7 +355,13 @@ class QuestionHelper extends Helper
$attempts = $question->getMaxAttempts();
while (null === $attempts || $attempts--) {
if (null !== $error) {
$output->writeln($this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error'));
if (null !== $this->getHelperSet() && $this->getHelperSet()->has('formatter')) {
$message = $this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error');
} else {
$message = '<error>'.$error->getMessage().'</error>';
}
$output->writeln($message);
}
try {
@ -370,7 +376,7 @@ class QuestionHelper extends Helper
/**
* Returns a valid unix shell.
*
* @return string|bool The valid shell name, false in case no valid shell is found
* @return string|bool The valid shell name, false in case no valid shell is found
*/
private function getShell()
{

View File

@ -296,9 +296,9 @@ class Table
/**
* Renders table cell with padding.
*
* @param array $row
* @param int $column
* @param string $cellFormat
* @param array $row
* @param int $column
* @param string $cellFormat
*/
private function renderCell(array $row, $column, $cellFormat)
{
@ -339,7 +339,7 @@ class Table
/**
* Gets column width.
*
* @param int $column
* @param int $column
*
* @return int
*/
@ -364,8 +364,8 @@ class Table
/**
* Gets cell width.
*
* @param array $row
* @param int $column
* @param array $row
* @param int $column
*
* @return int
*/

View File

@ -228,7 +228,7 @@ class TableStyle
/**
* Sets cell padding type.
*
* @param int $padType STR_PAD_*
* @param int $padType STR_PAD_*
*
* @return TableStyle
*/

View File

@ -96,8 +96,10 @@ class ConsoleLogger extends AbstractLogger
* Interpolates context values into the message placeholders
*
* @author PHP Framework Interoperability Group
* @param string $message
* @param array $context
*
* @param string $message
* @param array $context
*
* @return string
*/
private function interpolate($message, array $context)

View File

@ -23,6 +23,13 @@ class ChoiceQuestion extends Question
private $prompt = ' > ';
private $errorMessage = 'Value "%s" is invalid';
/**
* Constructor.
*
* @param string $question The question to ask to the user
* @param array $choices The list of available choices
* @param mixed $default The default answer to return
*/
public function __construct($question, array $choices, $default = null)
{
parent::__construct($question, $default);
@ -47,7 +54,7 @@ class ChoiceQuestion extends Question
*
* When multiselect is set to true, multiple choices can be answered.
*
* @param bool $multiselect
* @param bool $multiselect
*
* @return ChoiceQuestion The current instance
*/
@ -100,6 +107,11 @@ class ChoiceQuestion extends Question
return $this;
}
/**
* Returns the default answer validator.
*
* @return callable
*/
private function getDefaultValidator()
{
$choices = $this->choices;

View File

@ -18,6 +18,12 @@ namespace Symfony\Component\Console\Question;
*/
class ConfirmationQuestion extends Question
{
/**
* Constructor.
*
* @param string $question The question to ask to the user
* @param bool $default The default answer to return, true or false
*/
public function __construct($question, $default = true)
{
parent::__construct($question, (bool) $default);
@ -25,6 +31,11 @@ class ConfirmationQuestion extends Question
$this->setNormalizer($this->getDefaultNormalizer());
}
/**
* Returns the default answer normalizer.
*
* @return callable
*/
private function getDefaultNormalizer()
{
$default = $this->getDefault();

View File

@ -72,7 +72,7 @@ class Question
/**
* Sets whether the user response must be hidden or not.
*
* @param bool $hidden
* @param bool $hidden
*
* @return Question The current instance
*
@ -102,7 +102,7 @@ class Question
/**
* Sets whether to fallback on non-hidden question if the response can not be hidden.
*
* @param bool $fallback
* @param bool $fallback
*
* @return Question The current instance
*/
@ -116,7 +116,7 @@ class Question
/**
* Gets values for the autocompleter.
*
* @return null|array|Traversable
* @return null|array|\Traversable
*/
public function getAutocompleterValues()
{
@ -126,7 +126,7 @@ class Question
/**
* Sets values for the autocompleter.
*
* @param null|array|Traversable $values
* @param null|array|\Traversable $values
*
* @return Question The current instance
*
@ -165,7 +165,7 @@ class Question
}
/**
* Gets the validator for the question
* Gets the validator for the question.
*
* @return null|callable
*/
@ -179,7 +179,7 @@ class Question
*
* Null means an unlimited number of attempts.
*
* @param null|int $attempts
* @param null|int $attempts
*
* @return Question The current instance
*
@ -211,9 +211,9 @@ class Question
/**
* Sets a normalizer for the response.
*
* The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
* The normalizer can be a callable (a string), a closure or a class implementing __invoke.
*
* @param string|Closure $normalizer
* @param string|\Closure $normalizer
*
* @return Question The current instance
*/
@ -229,7 +229,7 @@ class Question
*
* The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
*
* @return string|Closure
* @return string|\Closure
*/
public function getNormalizer()
{

View File

@ -119,7 +119,7 @@ class ApplicationTester
/**
* Gets the status code returned by the last execution of the application.
*
* @return int The status code
* @return int The status code
*/
public function getStatusCode()
{

View File

@ -123,7 +123,7 @@ class CommandTester
/**
* Gets the status code returned by the last execution of the application.
*
* @return int The status code
* @return int The status code
*/
public function getStatusCode()
{

View File

@ -81,6 +81,7 @@ class Specificity
* 0 if they are equal, and 1 if the argument is lower
*
* @param Specificity $specificity
*
* @return int
*/
public function compareTo(Specificity $specificity)

View File

@ -141,7 +141,7 @@ class DebugClassLoader
*
* @param string $class The name of the class
*
* @return bool|null True, if loaded
* @return bool|null True, if loaded
*
* @throws \RuntimeException
*/
@ -214,7 +214,7 @@ class DebugClassLoader
chdir($cwd);
}
if ( 0 === substr_compare($real, $tail, -strlen($tail), strlen($tail), true)
if (0 === substr_compare($real, $tail, -strlen($tail), strlen($tail), true)
&& 0 !== substr_compare($real, $tail, -strlen($tail), strlen($tail), false)
) {
throw new \RuntimeException(sprintf('Case mismatch between class and source file names: %s vs %s', $class, $real));

View File

@ -338,7 +338,7 @@ 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 $file
* @param int $line
* @param array $context
@ -584,7 +584,7 @@ class ErrorHandler
/**
* Sets the level at which the conversion to Exception is done.
*
* @param int|null $level The level (null to use the error_reporting() value and 0 to disable)
* @param int|null $level The level (null to use the error_reporting() value and 0 to disable)
*
* @deprecated since 2.6, to be removed in 3.0. Use throwAt() instead.
*/
@ -597,7 +597,7 @@ class ErrorHandler
/**
* Sets the display_errors flag value.
*
* @param int $displayErrors The display_errors flag value
* @param int $displayErrors The display_errors flag value
*
* @deprecated since 2.6, to be removed in 3.0. Use throwAt() instead.
*/

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Reference;

View File

@ -30,7 +30,7 @@ class DecoratorServicePass implements CompilerPassInterface
}
$definition->setDecoratedService(null);
list ($inner, $renamedId) = $decorated;
list($inner, $renamedId) = $decorated;
if (!$renamedId) {
$renamedId = $id.'.inner';
}

View File

@ -142,7 +142,7 @@ class XmlDumper extends Dumper
$service->setAttribute('lazy', 'true');
}
if (null !== $decorated = $definition->getDecoratedService()) {
list ($decorated, $renamedId) = $decorated;
list($decorated, $renamedId) = $decorated;
$service->setAttribute('decorates', $decorated);
if (null !== $renamedId) {
$service->setAttribute('decoration-inner-name', $renamedId);

View File

@ -140,7 +140,7 @@ class YamlDumper extends Dumper
}
if (null !== $decorated = $definition->getDecoratedService()) {
list ($decorated, $renamedId) = $decorated;
list($decorated, $renamedId) = $decorated;
$code .= sprintf(" decorates: %s\n", $decorated);
if (null !== $renamedId) {
$code .= sprintf(" decoration_inner_name: %s\n", $renamedId);

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Compiler\Compiler;
use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass;
use Symfony\Component\DependencyInjection\Compiler\RepeatedPass;
use Symfony\Component\DependencyInjection\Reference;

View File

@ -12,13 +12,9 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass;
use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass;
use Symfony\Component\DependencyInjection\Compiler\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class CheckCircularReferencesPassTest extends \PHPUnit_Framework_TestCase

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
use Symfony\Component\DependencyInjection\Scope;
use Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Reference;

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass;
use Symfony\Component\DependencyInjection\Compiler\Compiler;
use Symfony\Component\DependencyInjection\Compiler\RepeatedPass;
use Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass;
use Symfony\Component\DependencyInjection\Definition;

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Loader;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Definition;

View File

@ -20,10 +20,10 @@ namespace Symfony\Component\EventDispatcher;
* You can call the method stopPropagation() to abort the execution of
* further listeners in your event listener.
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @api
*/

View File

@ -17,13 +17,13 @@ namespace Symfony\Component\EventDispatcher;
* Listeners are registered on the manager and events are dispatched through the
* manager.
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Jordan Alliot <jordan.alliot@gmail.com>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Jordan Alliot <jordan.alliot@gmail.com>
*
* @api
*/

View File

@ -17,10 +17,10 @@ namespace Symfony\Component\EventDispatcher;
* {@link getSubscribedEvents} and registers the subscriber as a listener for all
* returned events.
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @api
*/

View File

@ -22,6 +22,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest
protected function createEventDispatcher()
{
$container = new Container();
return new ContainerAwareEventDispatcher($container);
}

View File

@ -41,25 +41,25 @@ class ExpressionFunction
* @param callable $compiler A callable able to compile the function
* @param callable $evaluator A callable able to evaluate the function
*/
public function __construct($name, $compiler, $evaluator)
{
$this->name = $name;
$this->compiler = $compiler;
$this->evaluator = $evaluator;
}
public function __construct($name, $compiler, $evaluator)
{
$this->name = $name;
$this->compiler = $compiler;
$this->evaluator = $evaluator;
}
public function getName()
{
return $this->name;
}
public function getName()
{
return $this->name;
}
public function getCompiler()
{
return $this->compiler;
}
public function getCompiler()
{
return $this->compiler;
}
public function getEvaluator()
{
return $this->evaluator;
}
public function getEvaluator()
{
return $this->evaluator;
}
}

View File

@ -32,7 +32,7 @@ class ExpressionLanguage
protected $functions = array();
/**
* @param ParserCacheInterface $cache
* @param ParserCacheInterface $cache
* @param ExpressionFunctionProviderInterface[] $providers
*/
public function __construct(ParserCacheInterface $cache = null, array $providers = array())

View File

@ -57,7 +57,7 @@ class ExpressionLanguageTest extends \PHPUnit_Framework_TestCase
public function testProviders()
{
$expressionLanguage = new ExpressionLanguage(null, array(new TestProvider));
$expressionLanguage = new ExpressionLanguage(null, array(new TestProvider()));
$this->assertEquals('foo', $expressionLanguage->evaluate('identity("foo")'));
$this->assertEquals('"foo"', $expressionLanguage->compile('identity("foo")'));
}

View File

@ -32,9 +32,9 @@ class Token
/**
* Constructor.
*
* @param int $type The type of the token
* @param string $value The token value
* @param int $cursor The cursor position in the source
* @param int $type The type of the token
* @param string $value The token value
* @param int $cursor The cursor position in the source
*/
public function __construct($type, $value, $cursor)
{
@ -56,8 +56,8 @@ class Token
/**
* Tests the current token for a type and/or a value.
*
* @param array|int $type The type to test
* @param string|null $value The token value
* @param array|int $type The type to test
* @param string|null $value The token value
*
* @return bool
*/

View File

@ -32,8 +32,8 @@ class Filesystem
* @param string $targetFile The target filename
* @param bool $override Whether to override an existing file or not
*
* @throws FileNotFoundException When originFile doesn't exist
* @throws IOException When copy fails
* @throws FileNotFoundException When originFile doesn't exist
* @throws IOException When copy fails
*/
public function copy($originFile, $targetFile, $override = false)
{
@ -290,6 +290,7 @@ class Filesystem
if ($onWindows && $copyOnWindows) {
$this->mirror($originDir, $targetDir);
return;
}

View File

@ -65,7 +65,7 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase
}
/**
* @param int $expectedFilePerms expected file permissions as three digits (i.e. 755)
* @param int $expectedFilePerms expected file permissions as three digits (i.e. 755)
* @param string $filePath
*/
protected function assertFilePermissions($expectedFilePerms, $filePath)

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface;

View File

@ -242,9 +242,9 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
/**
* Rounds a number according to the configured precision and rounding mode.
*
* @param int|float $number A number.
* @param int|float $number A number.
*
* @return int|float The rounded number.
* @return int|float The rounded number.
*/
private function round($number)
{

View File

@ -1176,8 +1176,8 @@ class Form implements \IteratorAggregate, FormInterface
/**
* Utility function for indenting multi-line strings.
*
* @param string $string The string
* @param int $level The number of spaces to use for indentation
* @param string $string The string
* @param int $level The number of spaces to use for indentation
*
* @return string The indented string
*/

View File

@ -61,12 +61,12 @@ class FormError implements \Serializable
* Any array key in $messageParameters will be used as a placeholder in
* $messageTemplate.
*
* @param string $message The translated error message
* @param string|null $messageTemplate The template for the error message
* @param array $messageParameters The parameters that should be
* substituted in the message template
* @param int|null $messagePluralization The value for error message pluralization
* @param mixed $cause The cause of the error
* @param string $message The translated error message
* @param string|null $messageTemplate The template for the error message
* @param array $messageParameters The parameters that should be
* substituted in the message template
* @param int|null $messagePluralization The value for error message pluralization
* @param mixed $cause The cause of the error
*
* @see \Symfony\Component\Translation\Translator
*/

View File

@ -128,7 +128,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Returns the current position of the iterator.
*
* @return int The 0-indexed position.
* @return int The 0-indexed position.
*/
public function key()
{
@ -138,7 +138,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Returns whether the iterator's position is valid.
*
* @return bool Whether the iterator is valid.
* @return bool Whether the iterator is valid.
*/
public function valid()
{
@ -159,9 +159,9 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Returns whether a position exists in the iterator.
*
* @param int $position The position
* @param int $position The position
*
* @return bool Whether that position exists
* @return bool Whether that position exists
*/
public function offsetExists($position)
{
@ -171,7 +171,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Returns the element at a position in the iterator.
*
* @param int $position The position
* @param int $position The position
*
* @return FormError|FormErrorIterator The element at the given position
*
@ -210,7 +210,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
* Returns whether the current element of the iterator can be recursed
* into.
*
* @return bool Whether the current element is an instance of this class
* @return bool Whether the current element is an instance of this class
*/
public function hasChildren()
{
@ -240,7 +240,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
*
* $count = count($form->getErrors(true, true));
*
* @return int The number of iterated elements
* @return int The number of iterated elements
*/
public function count()
{
@ -250,7 +250,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/**
* Sets the position of the iterator.
*
* @param int $position The new position
* @param int $position The new position
*
* @throws OutOfBoundsException If the position is invalid
*/

View File

@ -96,9 +96,9 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable
/**
* Returns the errors of this form.
*
* @param bool $deep Whether to include errors of child forms as well
* @param bool $flatten Whether to flatten the list of errors in case
* $deep is set to true
* @param bool $deep Whether to include errors of child forms as well
* @param bool $flatten Whether to flatten the list of errors in case
* $deep is set to true
*
* @return FormErrorIterator An iterator over the {@link FormError}
* instances that where added to this form

View File

@ -1886,8 +1886,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
$this->assertMatchesXpath($this->renderWidget($form->createView()),
'//input[@type="hidden"][@id="_token"][@name="_token"]
|
//input[@type="text"][@id="child"][@name="child"]'
, 2);
//input[@type="text"][@id="child"][@name="child"]', 2);
}
public function testButton()

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer;
use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList;
use Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer;
class ChoicesToValuesTransformerTest extends \PHPUnit_Framework_TestCase

View File

@ -376,7 +376,7 @@ class FormValidatorTest extends AbstractConstraintValidatorTest
$object = $this->getMock('\stdClass');
$options = array('validation_groups' => function (FormInterface $form) {
return array('group1', 'group2');
},);
});
$form = $this->getBuilder('name', '\stdClass', $options)
->setData($object)
->getForm();

View File

@ -213,7 +213,7 @@ class ViolationMapperTest extends \PHPUnit_Framework_TestCase
$violation = $this->getConstraintViolation('children[address].data.street');
$parent = $this->getForm('parent');
$child = $this->getForm('address', 'address');
$grandChild = $this->getForm('street' , 'street');
$grandChild = $this->getForm('street', 'street');
$parent->add($child);
$child->add($grandChild);

View File

@ -28,7 +28,7 @@ class ServerParams
/**
* Returns maximum post size in bytes.
*
* @return null|int The maximum post size in bytes
* @return null|int The maximum post size in bytes
*/
public function getPostMaxSize()
{

View File

@ -139,7 +139,7 @@ class JsonResponse extends Response
/**
* Sets options used while encoding data to JSON.
*
* @param int $encodingOptions
* @param int $encodingOptions
*
* @return JsonResponse
*/

View File

@ -256,11 +256,11 @@ class ParameterBag implements \IteratorAggregate, \Countable
/**
* Returns the parameter value converted to boolean.
*
* @param string $key The parameter key
* @param mixed $default The default value if the parameter key does not exist
* @param bool $deep If true, a path like foo[bar] will find deeper items
* @param string $key The parameter key
* @param mixed $default The default value if the parameter key does not exist
* @param bool $deep If true, a path like foo[bar] will find deeper items
*
* @return bool The filtered value
* @return bool The filtered value
*/
public function getBoolean($key, $default = false, $deep = false)
{

View File

@ -148,7 +148,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta
/**
* Returns the number of attributes.
*
* @return int The number of attributes
* @return int The number of attributes
*/
public function count()
{

View File

@ -56,8 +56,8 @@ class MetadataBag implements SessionBagInterface
/**
* Constructor.
*
* @param string $storageKey The key used to store bag in the session.
* @param int $updateThreshold The time to wait between two UPDATED updates
* @param string $storageKey The key used to store bag in the session.
* @param int $updateThreshold The time to wait between two UPDATED updates
*/
public function __construct($storageKey = '_sf2_meta', $updateThreshold = 0)
{

View File

@ -19,9 +19,9 @@ class ValueExporter
/**
* Converts a PHP value to a string.
*
* @param mixed $value The PHP value
* @param int $depth only for internal usage
* @param bool $deep only for internal usage
* @param mixed $value The PHP value
* @param int $depth only for internal usage
* @param bool $deep only for internal usage
*
* @return string The string representation of the given value
*/

View File

@ -90,7 +90,7 @@ class KernelEvent extends Event
/**
* Checks if this is a master request.
*
* @return bool True if the request is a master request
* @return bool True if the request is a master request
*
* @api
*/

View File

@ -28,8 +28,8 @@ class DumpListener implements EventSubscriberInterface
private $dumper;
/**
* @param ClonerInterface $cloner Cloner service.
* @param DataDumperInterface $dumper Dumper service.
* @param ClonerInterface $cloner Cloner service.
* @param DataDumperInterface $dumper Dumper service.
*/
public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper)
{

View File

@ -104,7 +104,7 @@ class ExceptionListener implements EventSubscriberInterface
* Clones the request for the exception.
*
* @param \Exception $exception The thrown exception.
* @param Request $request The original request.
* @param Request $request The original request.
*
* @return Request $request The cloned request.
*/

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\HttpKernel\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\KernelEvents;
/**

View File

@ -21,9 +21,9 @@ class UnprocessableEntityHttpException extends HttpException
/**
* Constructor.
*
* @param string $message The internal exception message
* @param \Exception $previous The previous exception
* @param int $code The internal exception code
* @param string $message The internal exception message
* @param \Exception $previous The previous exception
* @param int $code The internal exception code
*/
public function __construct($message = null, \Exception $previous = null, $code = 0)
{

View File

@ -73,7 +73,7 @@ class Esi implements SurrogateInterface
*
* @param Request $request A Request instance
*
* @return bool true if one surrogate has ESI/1.0 capability, false otherwise
* @return bool true if one surrogate has ESI/1.0 capability, false otherwise
*
* @deprecated Deprecated since version 2.6, to be removed in 3.0. Use hasSurrogateCapability() instead
*/
@ -142,7 +142,7 @@ class Esi implements SurrogateInterface
*
* @param Response $response A Response instance
*
* @return bool true if the Response needs to be parsed, false otherwise
* @return bool true if the Response needs to be parsed, false otherwise
*
* @deprecated Deprecated since version 2.6, to be removed in 3.0. Use needsParsing() instead
*/

View File

@ -167,6 +167,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
* Gets the Esi instance
*
* @throws \LogicException
*
* @return Esi An Esi instance
*
* @deprecated Deprecated since version 2.6, to be removed in 3.0. Use getSurrogate() instead

View File

@ -35,7 +35,7 @@ interface SurrogateInterface
*
* @param Request $request A Request instance
*
* @return bool true if one surrogate has Surrogate capability, false otherwise
* @return bool true if one surrogate has Surrogate capability, false otherwise
*/
public function hasSurrogateCapability(Request $request);
@ -60,17 +60,17 @@ interface SurrogateInterface
*
* @param Response $response A Response instance
*
* @return bool true if the Response needs to be parsed, false otherwise
* @return bool true if the Response needs to be parsed, false otherwise
*/
public function needsParsing(Response $response);
/**
* Renders a Surrogate tag.
*
* @param string $uri A URI
* @param string $alt An alternate URI
* @param bool $ignoreErrors Whether to ignore errors or not
* @param string $comment A comment to add as an esi:include tag
* @param string $uri A URI
* @param string $alt An alternate URI
* @param bool $ignoreErrors Whether to ignore errors or not
* @param string $comment A comment to add as an esi:include tag
*
* @return string
*/

View File

@ -11,8 +11,6 @@
namespace Symfony\Component\HttpKernel\Tests\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle;
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand;
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle;

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\HttpKernel\Tests;
use Symfony\Component\HttpKernel\Client;
use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;

View File

@ -29,7 +29,8 @@ class DumpDataCollectorTest extends \PHPUnit_Framework_TestCase
$this->assertSame('dump', $collector->getName());
$collector->dump($data); $line = __LINE__;
$collector->dump($data);
$line = __LINE__;
$this->assertSame(1, $collector->getDumpsCount());
$dump = $collector->getDumps('html');
@ -61,7 +62,8 @@ class DumpDataCollectorTest extends \PHPUnit_Framework_TestCase
{
$data = new Data(array(array(456)));
$collector = new DumpDataCollector();
$collector->dump($data); $line = __LINE__;
$collector->dump($data);
$line = __LINE__;
ob_start();
$collector = null;

View File

@ -164,7 +164,7 @@ class CurrencyDataGenerator extends AbstractDataGenerator
}
/**
* @param $rootBundle
* @param ArrayAccessibleResourceBundle $rootBundle
*
* @return array
*/

Some files were not shown because too many files have changed in this diff Show More