Skip to content

Commit

Permalink
Merge branch '2.2' into 2.3
Browse files Browse the repository at this point in the history
* 2.2:
  updated VERSION for 2.2.11
  update CONTRIBUTORS for 2.2.11
  updated CHANGELOG for 2.2.11
  [HttpKernel] made a small optimization to Bundle initialization
  minor optimalization at bundle initialization
  [EventDispatcher] tweaked README
  removed observer pattern, in favour of mediator
  [DoctrineBridge] normalized class names in the ORM type guesser
  Fix `extract` method to avoid recalculating count() for each iteration.
  use the correct class name to retrieve mapped class' metadata and repository
  [WebProfilerBundle] Fixed js escaping in time.html.twig

Conflicts:
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig
	src/Symfony/Component/HttpKernel/Kernel.php
  • Loading branch information
fabpot committed Dec 3, 2013
2 parents a9b8dfe + 6a9c223 commit 40c0972
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 27 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG-2.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ in 2.2 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.2.0...v2.2.1

* 2.2.11 (2013-12-02)

* bug #9656 [DoctrineBridge] normalized class names in the ORM type guesser (fabpot)
* bug #9647 use the correct class name to retrieve mapped class' metadata and reposi... (xabbuh)
* bug #9643 [WebProfilerBundle] Fixed js escaping in time.html.twig (hason)
* bug #9639 Modified guessDefaultEscapingStrategy to not escape txt templates (fabpot)
* bug #9314 [Form] Fix DateType for 32bits computers. (WedgeSama)
* bug #9443 [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled (hason)
* bug #9625 [HttpFoundation] Do not return an empty session id if the session was closed (Taluu)
* bug #9447 [BrowserKit] fixed protocol-relative url redirection (jong99)
* bug #9535 No Entity Manager defined exception (armetiz)
* bug #9485 [Acl] Fix for issue #9433 (guilro)
* bug #9516 [AclProvider] Fix incorrect behavior when partial results returned from cache (superdav42)
* bug #9537 [FrameworkBundle] Fix mistake in translation's service definition. (phpmike)
* bug #9367 [Process] Check if the pipe array is empty before calling stream_select() (jfposton)
* bug #9469 [Propel1] re-factor Propel1 ModelChoiceList (havvg)

* 2.2.10 (2013-11-13)

* bug #9499 Request::overrideGlobals() may call invalid ini value (denkiryokuhatsuden)
Expand Down
51 changes: 35 additions & 16 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ Symfony2 is the result of the work of many people who made the code better
- Brandon Turner
- Daniel Holmes (dholmes)
- Jordan Alliot (jalliot)
- Douglas Greenshields (shieldo)
- John Wards (johnwards)
- Fran Moreno (franmomu)
- Bart van den Burg (burgov)
- Antoine Hérault (herzult)
- Michel Weimerskirch (mweimerskirch)
- Toni Uebernickel (havvg)
- Michel Weimerskirch (mweimerskirch)
- Christian Raue
- Douglas Greenshields (shieldo)
- Arnaud Le Blanc (arnaud-lb)
- marc.weistroff
- Brice BERNARD (brikou)
Expand All @@ -68,9 +68,9 @@ Symfony2 is the result of the work of many people who made the code better
- Włodzimierz Gajda (gajdaw)
- Colin Frei
- excelwebzone
- Kevin Bond (kbond)
- Fabien Pennequin (fabienpennequin)
- Jacob Dreesen (jdreesen)
- Kevin Bond (kbond)
- Wouter De Jong (wouterj)
- Adrien Brault (adrienbrault)
- Michal Piotrowski (eventhorizon)
Expand All @@ -81,8 +81,10 @@ Symfony2 is the result of the work of many people who made the code better
- Gábor Egyed (1ed)
- David Buchmann (dbu)
- Daniel Gomes (danielcsgomes)
- Peter Kokot (maastermedia)
- Jérémie Augustin (jaugustin)
- Tigran Azatyan (tigranazatyan)
- Rafael Dohms (rdohms)
- Richard Shank (iampersistent)
- Gordon Franke (gimler)
- Helmer Aaviksoo
Expand All @@ -97,40 +99,39 @@ Symfony2 is the result of the work of many people who made the code better
- Dmitrii Chekaliuk (lazyhammer)
- Clément JOBEILI (dator)
- Hiromi Hishida (77web)
- Dorian Villet (gnutix)
- Richard Miller (mr_r_miller)
- Arnaud Kleinpeter (nanocom)
- Rafael Dohms (rdohms)
- Mario A. Alvarez Garcia (nomack84)
- Dennis Benkert (denderello)
- Eric GELOEN (gelo)
- Benjamin Dulau (dbenjamin)
- Andreas Hucks (meandmymonkey)
- Noel Guilbert (noel)
- Jérôme Tamarelle (gromnan)
- Larry Garfield (crell)
- Dorian Villet (gnutix)
- Guilherme Blanco (guilhermeblanco)
- Martin Schuhfuß (usefulthink)
- Thomas Rabaix (rande)
- Ait Boudad Abdellatif (aitboudad)
- Matthieu Bontemps (mbontemps)
- Pierre Minnieur (pminnieur)
- fivestar
- Dominique Bongiraud
- Leszek Prabucki (l3l0)
- François Zaninotto (fzaninotto)
- Dustin Whittle (dustinwhittle)
- jeff
- Clemens Tolboom
- Peter Kokot (maastermedia)
- Justin Hileman (bobthecow)
- Sven Paulus (subsven)
- Joel Wurtz (brouznouf)
- Rui Marinho (ruimarinho)
- Jérôme Tamarelle (gromnan)
- Julien Brochet (mewt)
- Sergey Linnik (linniksa)
- Marcel Beerta (mazen)
- Francois Zaninotto
- Alexander Kotynia (olden)
- François Zaninotto (fzaninotto)
- Danny Berger (dpb587)
- Xavier Montaña Carreras (xmontana)
- Xavier Perez
Expand All @@ -143,7 +144,6 @@ Symfony2 is the result of the work of many people who made the code better
- GordonsLondon
- Jan Sorgalla (jsor)
- Ray
- Ait Boudad Abdellatif (aitboudad)
- Thomas Adam
- Albert Casademont (acasademont)
- jdhoek
Expand All @@ -162,11 +162,14 @@ Symfony2 is the result of the work of many people who made the code better
- Manuel Kiessling (manuelkiessling)
- Christian Flothmann (xabbuh)
- Bertrand Zuchuat (garfield-fr)
- Thomas Tourlourat (armetiz)
- Andrey Esaulov (andremaha)
- Grégoire Passault (gregwar)
- Uwe Jäger (uwej711)
- Aurelijus Valeiša (aurelijus)
- Gustavo Piltcher
- Stepan Tanasiychuk (stfalcon)
- Bob den Otter (bopp)
- Adrian Rudnik (kreischweide)
- Francesc Rosàs (frosas)
- Bongiraud Dominique
Expand All @@ -188,6 +191,7 @@ Symfony2 is the result of the work of many people who made the code better
- Kristen Gilden (kgilden)
- hossein zolfi (ocean)
- Philipp Kräutli (pkraeutli)
- Kirill chEbba Chebunin (chebba)
- Greg Thornton (xdissent)
- Atsuhiro KUBO (iteman)
- sun (sun)
Expand Down Expand Up @@ -243,6 +247,7 @@ Symfony2 is the result of the work of many people who made the code better
- Fabrice Bernhard (fabriceb)
- Fabian Lange (codingfabian)
- Yoshio HANAWA
- Peter Rehm
- Sebastian Bergmann
- Pablo Díez (pablodip)
- Kevin McBride
Expand Down Expand Up @@ -280,7 +285,6 @@ Symfony2 is the result of the work of many people who made the code better
- Ivan Rey (ivanrey)
- Marcin Chyłek (songoq)
- Ned Schwartz
- Thomas Tourlourat (armetiz)
- Ziumin
- Lenar Lõhmus
- Zach Badgett (zachbadgett)
Expand All @@ -289,6 +293,7 @@ Symfony2 is the result of the work of many people who made the code better
- Pavel Campr (pcampr)
- Miha Vrhovnik
- Geoffrey Tran (geoff)
- Jan Behrens
- Thomas Lallement (raziel057)
- vitaliytv
- Markus Bachmann (baachi)
Expand Down Expand Up @@ -344,12 +349,12 @@ Symfony2 is the result of the work of many people who made the code better
- Lars Vierbergen
- Mark Challoner
- Andrew Tchircoff (andrewtch)
- Daniel Tschinder
- michaelwilliams
- Leevi Graham (leevigraham)
- Casper Valdemar Poulsen
- Eduardo Gulias (egulias)
- Josiah (josiah)
- Peter Rehm
- John Bohn (jbohn)
- Andrew Hilobok (hilobok)
- Christian Soronellas (theunic)
Expand Down Expand Up @@ -383,12 +388,11 @@ Symfony2 is the result of the work of many people who made the code better
- Cyril Quintin (cyqui)
- Gerard van Helden (drm)
- Patrick Allaert
- Kirill chEbba Chebunin (chebba)
- Gustavo Falco (gfalco)
- Aleksey Podskrebyshev
- Bob den Otter (bopp)
- David Marín Carreño (davefx)
- Jörn Lang (j.lang)
- Baptiste Clavié (talus)
- julien pauli (jpauli)
- mwsaz
- Benoît Bourgeois
Expand Down Expand Up @@ -423,7 +427,6 @@ Symfony2 is the result of the work of many people who made the code better
- Robert Gruendler (pulse00)
- Simon Terrien (sterrien)
- Benoît Merlet (trompette)
- Jan Behrens
- Raul Fraile (raulfraile)
- sensio
- Patrick Kaufmann
Expand All @@ -446,6 +449,7 @@ Symfony2 is the result of the work of many people who made the code better
- dantleech
- Tero Alén (tero)
- DerManoMann
- Guillaume Royer
- Artem (digi)
- dantleech
- Vadim Tyukov (vatson)
Expand All @@ -455,6 +459,7 @@ Symfony2 is the result of the work of many people who made the code better
- Máximo Cuadros (mcuadros)
- Alex Bogomazov
- julien.galenski
- Christian Schmidt
- Sébastien Lavoie (lavoiesl)
- Per Sandström (per)
- Lin Clark
Expand All @@ -463,6 +468,7 @@ Symfony2 is the result of the work of many people who made the code better
- Ville Mattila
- Ben Davies
- Max Beutel
- Catalin Dan
- Piotr Antosik (antek88)
- Artem Lopata
- Marcos Quesada (marcos_quesada)
Expand Down Expand Up @@ -541,16 +547,19 @@ Symfony2 is the result of the work of many people who made the code better
- ShiraNai7
- Janusz Jabłoński (yanoosh)
- George Giannoulopoulos
- Daniel Richter (richtermeister)
- Chris Wilkinson (thewilkybarkid)
- Ilya Biryukov
- Jason Desrosiers
- m.chwedziak
- Lance McNearney
- Giorgio Premi
- caponica
- Matt Daum (daum)
- Alberto Pirovano (geezmo)
- Martin Pärtel
- Xavier Briand (xavierbriand)
- WedgeSama
- Romain Geissler
- Charles Sarrazin (csarrazi)
- Marcus Stöhr (dafish)
Expand Down Expand Up @@ -584,6 +593,7 @@ Symfony2 is the result of the work of many people who made the code better
- Jeremy Livingston (jeremylivingston)
- Nicolas Schwartz (nicoschwartz)
- Patrik Gmitter (patie)
- Jonathan Gough
- Benjamin Bender
- Konrad Mohrfeldt
- Benoit Lévêque (benoit_leveque)
Expand All @@ -598,6 +608,7 @@ Symfony2 is the result of the work of many people who made the code better
- Jakub Škvára (jskvara)
- Nicolas Badey (nico-b)
- povilas
- Alexander Obuhovich
- Alessandro Tagliapietra (alex88)
- Gunnar Lium (gunnarlium)
- Tiago Garcia (tiagojsag)
Expand All @@ -606,6 +617,7 @@ Symfony2 is the result of the work of many people who made the code better
- Harm van Tilborg
- Martin Eckhardt
- Leonid Terentyev
- Jonathan Poston
- Przemysław Piechota (kibao)
- Adam Prager (padam87)
- Francisco Facioni (fran6co)
Expand All @@ -617,7 +629,6 @@ Symfony2 is the result of the work of many people who made the code better
- 2manypeople
- Thomas Bibb
- Josef Cech
- Andrey Esaulov (andremaha)
- Matthew Foster (mfoster)
- Paul Seiffert (seiffert)
- Vasily Khayrulin (sirian)
Expand All @@ -626,6 +637,7 @@ Symfony2 is the result of the work of many people who made the code better
- stloyd
- Chris Tickner
- Andrew Coulton
- David Stone
- Luis Muñoz
- Strate
- Thomas Chmielowiec
Expand Down Expand Up @@ -690,6 +702,7 @@ Symfony2 is the result of the work of many people who made the code better
- Julien DIDIER (juliendidier)
- Martin Mayer (martin)
- Grzegorz Łukaszewicz (newicz)
- Rouven Weßling (realityking)
- Robert Campbell
- Matt Lehner
- Alex Pods
Expand Down Expand Up @@ -722,27 +735,31 @@ Symfony2 is the result of the work of many people who made the code better
- Osman Üngür (import)
- Jorge Martin (jorgemartind)
- Kevin Herrera (kherge)
- Marek Štípek (maryo)
- Matthew Davis (mdavis1982)
- Muriel (metalmumu)
- Michaël Perrin (michael.perrin)
- Pablo Monterde Perez (plebs)
- Rafał Wrzeszcz (rafalwrzeszcz)
- Jimmy Leger (redpanda)
- Baptiste Clavié (talus)
- Cyrille Jouineau (tuxosaurus)
- Yorkie Chadwick (yorkie76)
- Yanick Witschi
- Ondrej Mirtes
- srsbiz
- Nicolas A. Bérard-Nault
- Gladhon
- Saem Ghani
- Stefan Oderbolz
- Daniel Tschinder
- Alexey Popkov
- Joseph Deray
- Arnaud Buathier (arnapou)
- chesteroni (chesteroni)
- Alexander M. Turek (derrabus)
- Mauricio Lopez (diaspar)
- Daniele Cesarini (ijanki)
- Ismail Asci (ismailasci)
- Simon CONSTANS (kosssi)
- Ramon Henrique Ornelas (ramonornela)
- Till Klampaeckel (till)
Expand Down Expand Up @@ -790,6 +807,7 @@ Symfony2 is the result of the work of many people who made the code better
- Abdulkadir N. A.
- Sema
- Thorsten Hallwas
- Daisuke Ohata
- Michael Squires
- Chris Smith
- kwiateusz
Expand All @@ -806,6 +824,7 @@ Symfony2 is the result of the work of many people who made the code better
- Christian Stocker
- tirnanog06
- phc
- Michaël VEROUX
- sualko
- Nicolas Roudaire
- Lee Rowlands
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Symfony\Component\Form\Guess\Guess;
use Symfony\Component\Form\Guess\TypeGuess;
use Symfony\Component\Form\Guess\ValueGuess;
use Doctrine\Common\Util\ClassUtils;

class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
{
Expand Down Expand Up @@ -153,6 +154,9 @@ public function guessPattern($class, $property)

protected function getMetadata($class)
{
// normalize class name
$class = ClassUtils::getRealClass(ltrim($class, '\\'));

if (array_key_exists($class, $this->cache)) {
return $this->cache[$class];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ public function validate($entity, Constraint $constraint)
}
}

$className = $this->context->getClassName();
$class = $em->getClassMetadata($className);
$class = $em->getClassMetadata(get_class($entity));
/* @var $class \Doctrine\Common\Persistence\Mapping\ClassMetadata */

$criteria = array();
Expand Down Expand Up @@ -110,7 +109,7 @@ public function validate($entity, Constraint $constraint)
}
}

$repository = $em->getRepository($className);
$repository = $em->getRepository(get_class($entity));
$result = $repository->{$constraint->repositoryMethod}($criteria);

/* If the result is a MongoCursor, it must be advanced to the first
Expand Down
Loading

0 comments on commit 40c0972

Please sign in to comment.