From b63107338efeeb34e0a7fd5b40b7d5330c9316b9 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 18 May 2012 09:37:57 +0100 Subject: [PATCH 01/10] [Yaml] Fixed double quotes escaping in Dumper. --- src/Symfony/Component/Yaml/Escaper.php | 4 ++-- .../Tests/Component/Yaml/Fixtures/escapedCharacters.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Yaml/Escaper.php b/src/Symfony/Component/Yaml/Escaper.php index 81a7d5fe1b..9a0203c692 100644 --- a/src/Symfony/Component/Yaml/Escaper.php +++ b/src/Symfony/Component/Yaml/Escaper.php @@ -25,13 +25,13 @@ class Escaper // first to ensure proper escaping because str_replace operates iteratively // on the input arrays. This ordering of the characters avoids the use of strtr, // which performs more slowly. - static private $escapees = array('\\\\', '\\"', + static private $escapees = array('\\\\', '\\"', '"', "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9"); - static private $escaped = array('\\"', '\\\\', + static private $escaped = array('\\"', '\\\\', '\\"', "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/escapedCharacters.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/escapedCharacters.yml index 7f17ed5c12..09bf86e790 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/escapedCharacters.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/escapedCharacters.yml @@ -137,3 +137,11 @@ yaml: | \x41 \u0041 \U00000041" php: | "Fun with \x5C\n\x22 \x07 \x08 \x1B \x0C\n\x0A \x0D \x09 \x0B \x00\n\x20 \xA0 \x85 \xe2\x80\xa8 \xe2\x80\xa9\nA A A" +--- +test: Double quotes with a line feed +yaml: | + { double: "some value\n \"some quoted string\" and 'some single quotes one'" } +php: | + array( + 'double' => "some value\n \"some quoted string\" and 'some single quotes one'" + ) From aaa5cca19db7e9a0d3b3120f712999e124881241 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 30 May 2012 18:57:09 +0200 Subject: [PATCH 02/10] updated vendors for 2.0.15 --- vendors.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vendors.php b/vendors.php index d260099d79..cbbea0816b 100755 --- a/vendors.php +++ b/vendors.php @@ -32,12 +32,12 @@ if (isset($argv[1]) && in_array($argv[1], array('--transport=http', '--transport } $deps = array( - array('doctrine', 'http://github.com/doctrine/doctrine2.git', '2.1.6'), - array('doctrine-dbal', 'http://github.com/doctrine/dbal.git', '2.1.6'), + array('doctrine', 'http://github.com/doctrine/doctrine2.git', '2.1.7'), + array('doctrine-dbal', 'http://github.com/doctrine/dbal.git', '2.1.7'), array('doctrine-common', 'http://github.com/doctrine/common.git', '2.1.4'), array('monolog', 'http://github.com/Seldaek/monolog.git', '1.0.2'), array('swiftmailer', 'http://github.com/swiftmailer/swiftmailer.git', 'v4.1.7'), - array('twig', 'http://github.com/fabpot/Twig.git', 'v1.7.0'), + array('twig', 'http://github.com/fabpot/Twig.git', 'v1.8.2'), ); foreach ($deps as $dep) { From 27f9c02100873995b4e222a66becfde1b74259dc Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 30 May 2012 18:59:04 +0200 Subject: [PATCH 03/10] updated CHANGELOG for 2.0.15 --- CHANGELOG-2.0.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG-2.0.md b/CHANGELOG-2.0.md index b0285374f5..bc9acc8bee 100644 --- a/CHANGELOG-2.0.md +++ b/CHANGELOG-2.0.md @@ -7,6 +7,19 @@ in 2.0 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.0.0...v2.0.1 +* 2.0.15 (2012-05-30) + + * 20b556d: [Form] fixed a bug that caused input date validation not to be strict when using the single_text widget with a datetime field + * 7e3213c: [Form] fixed a bug that caused input date validation not to be strict when using the single_text widget with a date field + * 35b458f: fix kernel root, linux dir separator on windows, to fix cache:clear issue + * 8da880c: Fixed notice in AddCacheWarmerPass if there is no cache warmer defined. + * 7a85b43: [TwigBundle] Fixed the path to templates when using composer + * 8223632: [HttpFoundation] Fix the UploadedFilename name sanitization (fix #2577) + * f883953: TypeGuess fixed for Date/Time constraints + * 41bed29: [Form] fixed invalid 'type' option in ValidatorTypeGuesser for Date/TimeFields + * fff7221: Fixed the proxy autoloading for Doctrine 2.2 + * a450d00: [HttpFoundation] HTTP Basic authentication is broken with PHP as cgi/fastCGI under Apache + * 2.0.14 (2012-05-17) * d1c831d: Change must-proxy-revalidate by proxy-revalidate From 9f729a806be92ffb2a28ce07b2a1b9d3d1b67aae Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 30 May 2012 18:59:37 +0200 Subject: [PATCH 04/10] update CONTRIBUTORS for 2.0.15 --- CONTRIBUTORS.md | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 5f512337ed..41c059bea3 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -25,20 +25,20 @@ Symfony2 is the result of the work of many people who made the code better - Alexandre Salomé (alexandresalome) - stealth35 (stealth35) - Jonathan H. Wage (jwage) - - Thibault Duplessis (ornicar) + - Tobias Schultze (Tobion) - Jakub Zalas (jakzal) + - Thibault Duplessis (ornicar) - Eric Clemmons (ericclemmons) - Martin Hasoň (hason) - Henrik Westphal (snc) - Dariusz Górecki (canni) - - Tobias Schultze (Tobion) - Miha Vrhovnik (mvrhov) - Bulat Shakirzyanov (avalanche123) - Henrik Bjørnskov (henrikbjorn) - Andrej Hudec (pulzarraider) - Francis Besset (francisbesset) - - Kevin Bond (kbond) - Deni (yethee) + - Kevin Bond (kbond) - Arnout Boks (aboks) - Jordan Alliot (jalliot) - Marc Weistroff (marcw) @@ -56,15 +56,15 @@ Symfony2 is the result of the work of many people who made the code better - Antoine Hérault (Herzult) - Tigran Azatyan (tigranazatyan) - Helmer Aaviksoo (helmer) + - Christian Raue (craue) - Jacob Dreesen (jdreesen) - umpirsky (umpirsky) - Pierre Minnieur (pminnieur) - Michał Pipa (michal-pipa) - Fabien Pennequin (FabienPennequin) - Richard Shank (IamPersistent) - - Benjamin Dulau (benjamindulau) - Douglas Greenshields (shieldo) - - Christian Raue (craue) + - Benjamin Dulau (benjamindulau) - Grégoire Pineau (lyrixx) - Katsuhiro OGAWA (fivestar) - Richard Miller (richardmiller) @@ -79,11 +79,13 @@ Symfony2 is the result of the work of many people who made the code better - Włodzimierz Gajda (gajdaw) - Michel Weimerskirch (mweimerskirch) - Javier Eguiluz (javiereguiluz) + - Alexander (asm89) - Joseph Rouff (rouffj) - Marcel Beerta (mazen) - Daniel Gomes - Wotre (Wotre) - Matthieu Vachon (maoueh) + - Jérémie Augustin (jaugustin) - Amal Raghav (kertz) - Artur Kotyrba (udat) - Gustavo Piltcher @@ -93,7 +95,6 @@ Symfony2 is the result of the work of many people who made the code better - dbu - Julien Brochet (aerialls) - Thomas (rande) - - Alexander (asm89) - Gordon Franke (gimler) - Noel GUILBERT (noelg) - Alif Rachmawadi (subosito) @@ -123,7 +124,6 @@ Symfony2 is the result of the work of many people who made the code better - Xavier Montaña Carreras (xmontana) - Andreas Hucks (meandmymonkey) - Arjen Brouwer (arjenjb) - - Jérémie Augustin (jaugustin) - Boussekeyt Jules (gordonslondon) - Jan Sorgalla (jsor) - Daniel Gomes (danielcsgomes) @@ -132,10 +132,13 @@ Symfony2 is the result of the work of many people who made the code better - Jeroen Hoek (jdhoek) - Albert Jessurum (ajessu) - Ryan Rogers (timewasted) + - Anthon Pang (robocoder) - flevour (flevour) - Michel Salib (michelsalib) - geoffrey + - Olivier Dolbeau (odolbeau) - Kim Hemsø Rasmussen (kimhemsoe) + - clemens-tolboom (clemens-tolboom) - Manuel Kiessling (ManuelKiessling) - Bilal Amarni (bamarni) - Tobias Naumann (tna) @@ -145,12 +148,12 @@ Symfony2 is the result of the work of many people who made the code better - Adrian Rudnik (kreischweide) - Marcin Chylek (SongoQ) - Pavel Campr (pcampr) + - Sebastiaan Stok (sstok) - Josip Kruslin (aubx) - drak3 (drak3) - Chris Boden (cboden) - Dustin Dobervich (dustin10) - Sebastian Marek (proofek) - - Olivier Dolbeau (odolbeau) - Michele Orselli (micheleorselli) - Andréia Bohner (andreia) - Sebastian Bergmann (sebastianbergmann) @@ -172,17 +175,16 @@ Symfony2 is the result of the work of many people who made the code better - Matthew Lewinski - Kai - Sergey Linnik (Partugal) + - TonyMalz (TonyMalz) - Johnny Peck (johnnypeck) - Laszlo Korte (laszlokorte) - Hubert LECORCHE (hlecorche) - Sergey Skopin (grizlik) - drmonty (drmonty) - Michael Ridgway (mridgway) - - Anthon Pang (robocoder) - Stepan Tanasiychuk (stfalcon) - Bertrand Zuchuat (Garfield-fr) - Sebastien Armand (khepin) - - Sebastiaan Stok (sstok) - Jan Schumann (janschumann) - Asier Illarramendi (doup) - Shigenobu Nishikawa (shishi) @@ -217,6 +219,7 @@ Symfony2 is the result of the work of many people who made the code better - Robert Gruendler (pulse00) - Elliot Anderson (elliot) - xaav + - scoolen (scoolen) - Anton Babenko (antonbabenko) - Martin Hasoň - José Nahuel Cuesta Luengo (ncuesta) @@ -232,6 +235,7 @@ Symfony2 is the result of the work of many people who made the code better - Fabrice Bernhard (fabriceb) - develop - Hiromi Hishida (77web) + - Romain Geissler (Romain-Geissler) - Klein Florian (docteurklein) - Stéphane PY (stephpy) - Joshua Nye (zerosanity) @@ -266,8 +270,10 @@ Symfony2 is the result of the work of many people who made the code better - Julien DIDIER (juliendidier) - Chris Smith (cs278) - Derek ROTH (DerekRoth) + - Arnaud Kleinpeter (Nanocom) - mwsaz - corphi (corphi) + - Even André Fiskvik (grEvenX) - Giulio De Donato (liuggio) - Matthias (mpdude) - Emil Einarsson (Einarsson) @@ -288,6 +294,7 @@ Symfony2 is the result of the work of many people who made the code better - Adam Monsen (meonkeys) - nervo (nervo) - Oleg Stepura (olegstepura) + - ouardisoft (ouardisoft) - patrick-mcdougle (patrick-mcdougle) - Sebastian Busch (sbusch) - Benoît Merlet (trompette) @@ -304,7 +311,6 @@ Symfony2 is the result of the work of many people who made the code better - Théophile Helleboid - chtitux (chtitux) - Matthew Lewinski (lewinski) - Markus Bachmann (Baachi) - - scoolen (scoolen) - irmantas (irmantas) - tero (tero) - Vadim Tyukov (vatson) @@ -313,7 +319,9 @@ Symfony2 is the result of the work of many people who made the code better - Tobias Sjösten (tobiassjosten) - Wojciech Sznapka (wowo) - julien.galenski + - Robert Kiss (kepten) - Martijn Evers (martijn4evers) + - Jochen Bayer (jocl) - Jeremy Bush (zombor) - Evan Villemez (evillemez) - Davide Borsatto (davideborsatto) @@ -323,6 +331,7 @@ Symfony2 is the result of the work of many people who made the code better - Nicolas Fabre (nfabre) - Clément Herreman (clemherreman) - heccjj (heccjj) + - Sergey Yuferev - Ringosan (Ringosan) - Balázs Benyó (duplabe) - Sebastian Utz (seut) @@ -330,12 +339,14 @@ Symfony2 is the result of the work of many people who made the code better - George Giannoulopoulos (dotoree) - Alberto Pirovano (geezmo) - Xavier Briand (xavierbriand) - - Romain Geissler (Romain-Geissler) - Carsten Nielsen (phreaknerd) - JerikVenture (JerikVenture) - Evan Kaufman (EvanK) - meckhardt (meckhardt) - Sebastian Ionescu + - Simon Neidhold + - Kevin Dew + - Kevin Dew (kevindew) - Dirk Pahl (dirkaholic) - Konrad Mohrfeldt (kmohrf) - Nicolas Badey (Nico-B) @@ -370,6 +381,7 @@ Symfony2 is the result of the work of many people who made the code better - Pierre-Yves LEBECQ (pylebecq) - Jan Eichhorn (Exeu) - Alexander Zogheb + - aripringle (aripringle) - cim-dch (cim-dch) - Dan Ordille (dordille) - Martin Mayer (martinmayer) @@ -383,8 +395,8 @@ Symfony2 is the result of the work of many people who made the code better - agilemedialab (agilemedialab) - Alan Chen (alan0101c) - Masao Maeda (brtriver) - - clemens-tolboom (clemens-tolboom) - Gustavo Falco (comfortablynumb) + - David Windell (davidwindell) - Denis Klementjev (dklementjev) - Kévin Dunglas (dunglas) - Gabriel Birke (gbirke) @@ -399,6 +411,7 @@ Symfony2 is the result of the work of many people who made the code better - Arnaud Buathier (arnapou) - chesteroni (chesteroni) - Elnur Abdurrakhimov (elnur) + - Philipp Kräutli (pkraeutli) - Beau Simensen (simensen) - Till Klampaeckel (till) - Juan Ases García (Ases) @@ -412,7 +425,9 @@ Symfony2 is the result of the work of many people who made the code better - Pierre-Louis LAUNAY - Sébastien HOUZE - Sergiy Sokolenko + - Alexander Deruwe (aderuwe) - Adrien Brault (adrienbrault) + - André Neves (andrefgneves) - Vladimir Sazhin (cannie) - Chris Sedlmayr (catchamonkey) - Christian Stocker (chregu) @@ -439,13 +454,13 @@ Symfony2 is the result of the work of many people who made the code better - Marc Abramowitz (msabramo) - Michael Schneider (mschneid) - Oncle Tom (oncletom) - - ouardisoft (ouardisoft) - Petr Jaroš (petajaros) - pzwosta (pzwosta) - Julien 'ruian' Galenski (ruian) - Ruud Kamphuis (ruudk) - Markus Tacker (tacker) - Tyler Stroud (tystr) + - Lars Vierbergen (vierbergenlars) - Vyacheslav Slinko (vslinko) - Josiah (web-dev) - Gustavo Adrian From c2480c1e73879593ef6b88571fc733ada5a26bba Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 30 May 2012 18:59:58 +0200 Subject: [PATCH 05/10] updated VERSION for 2.0.15 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index bf7b82b364..fcb370d810 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -56,12 +56,12 @@ abstract class Kernel implements KernelInterface protected $startTime; protected $classes; - const VERSION = '2.0.15-DEV'; + const VERSION = '2.0.15'; const VERSION_ID = '20015'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '0'; const RELEASE_VERSION = '15'; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; /** * Constructor. From 9a5e6c9081dd96212d2945cbc4e4d9807ffd4c48 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 31 May 2012 17:18:01 +0200 Subject: [PATCH 06/10] bumped Symfony version to 2.0.16-DEV --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index fcb370d810..64c680345c 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -56,12 +56,12 @@ abstract class Kernel implements KernelInterface protected $startTime; protected $classes; - const VERSION = '2.0.15'; - const VERSION_ID = '20015'; + const VERSION = '2.0.16-DEV'; + const VERSION_ID = '20016'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '0'; - const RELEASE_VERSION = '15'; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = '16'; + const EXTRA_VERSION = 'DEV'; /** * Constructor. From 789fc1414555570b24606ab5b206847c8f25f09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesc=20Ros=C3=A0s?= Date: Thu, 31 May 2012 04:28:05 +0300 Subject: [PATCH 07/10] Accept calling setLenient(false) --- src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php index a448a588e2..573f1a35ca 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php @@ -416,11 +416,13 @@ class StubIntlDateFormatter * * @see http://www.php.net/manual/en/intldateformatter.setlenient.php * - * @throws MethodNotImplementedException + * @throws MethodNotImplementedException When $lenient is true */ public function setLenient($lenient) { - throw new MethodNotImplementedException(__METHOD__); + if ($lenient) { + throw new MethodNotImplementedException(__METHOD__); + } } /** From 49380804224509d55f2fbc86d6ef10bebd5e328d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesc=20Ros=C3=A0s?= Date: Thu, 31 May 2012 05:04:03 +0200 Subject: [PATCH 08/10] MethodNotImplementedException -> MethodArgumentValueNotImplementedException --- src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php | 4 ++-- .../Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php index 573f1a35ca..d236fb7845 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php @@ -416,12 +416,12 @@ class StubIntlDateFormatter * * @see http://www.php.net/manual/en/intldateformatter.setlenient.php * - * @throws MethodNotImplementedException When $lenient is true + * @throws MethodArgumentValueNotImplementedException When $lenient is true */ public function setLenient($lenient) { if ($lenient) { - throw new MethodNotImplementedException(__METHOD__); + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'lenient', $lenient, 'Only the strict parser is supported'); } } diff --git a/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php b/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php index 79bcd5299c..e289e92399 100644 --- a/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php +++ b/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php @@ -908,7 +908,7 @@ class StubIntlDateFormatterTest extends LocaleTestCase } /** - * @expectedException Symfony\Component\Locale\Exception\MethodNotImplementedException + * @expectedException Symfony\Component\Locale\Exception\MethodArgumentValueNotImplementedException */ public function testSetLenient() { From 26d416fe51318b20be63493c93ca27858e5e8a68 Mon Sep 17 00:00:00 2001 From: Raul Fraile Date: Wed, 6 Jun 2012 15:13:50 +0300 Subject: [PATCH 09/10] Fixed typo in ConstraintValidatorFactoryInterface PHPDoc (2.0) --- .../Component/Validator/ConstraintValidatorFactoryInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php b/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php index fb91ec5b59..88d55cef3b 100644 --- a/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php +++ b/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php @@ -20,7 +20,7 @@ use Symfony\Component\Validator\Constraint; interface ConstraintValidatorFactoryInterface { /** - * Given a Constrain, this returns the ConstraintValidatorInterface + * Given a Constraint, this returns the ConstraintValidatorInterface * object that should be used to verify its validity. * * @param Constraint $constraint The source constraint From ba16a51d379d83b1bd681aa947bf0a5f8801a255 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 12 Jun 2012 13:59:42 +0200 Subject: [PATCH 10/10] changed getName() to name on all Reflection* object calls (fixes #4555, refs https://bugs.php.net/bug.php?id=61384) --- src/Symfony/Bundle/DoctrineBundle/Registry.php | 2 +- .../Component/DependencyInjection/Container.php | 2 +- src/Symfony/Component/Form/Util/PropertyPath.php | 14 +++++++------- .../HttpKernel/Controller/ControllerResolver.php | 6 +++--- .../Routing/Loader/AnnotationClassLoader.php | 2 +- .../Security/Acl/Resources/bin/generateSql.php | 2 +- .../Normalizer/GetSetMethodNormalizer.php | 10 +++++----- .../Validator/Mapping/ClassMetadataFactory.php | 4 ++-- .../Validator/Mapping/Loader/AnnotationLoader.php | 12 ++++++------ .../Mapping/Loader/StaticMethodLoader.php | 4 ++-- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Symfony/Bundle/DoctrineBundle/Registry.php b/src/Symfony/Bundle/DoctrineBundle/Registry.php index 656829ffcb..a9a0440d5c 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Registry.php +++ b/src/Symfony/Bundle/DoctrineBundle/Registry.php @@ -230,7 +230,7 @@ class Registry implements RegistryInterface { $proxyClass = new \ReflectionClass($class); if ($proxyClass->implementsInterface('Doctrine\ORM\Proxy\Proxy')) { - $class = $proxyClass->getParentClass()->getName(); + $class = $proxyClass->getParentClass()->name; } foreach ($this->entityManagers as $id) { diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 6f0297bd2c..263f12c70a 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -274,7 +274,7 @@ class Container implements ContainerInterface $ids = array(); $r = new \ReflectionClass($this); foreach ($r->getMethods() as $method) { - if (preg_match('/^get(.+)Service$/', $method->getName(), $match)) { + if (preg_match('/^get(.+)Service$/', $method->name, $match)) { $ids[] = self::underscore($match[1]); } } diff --git a/src/Symfony/Component/Form/Util/PropertyPath.php b/src/Symfony/Component/Form/Util/PropertyPath.php index 529d3ce100..39180aca66 100644 --- a/src/Symfony/Component/Form/Util/PropertyPath.php +++ b/src/Symfony/Component/Form/Util/PropertyPath.php @@ -290,13 +290,13 @@ class PropertyPath implements \IteratorAggregate if ($reflClass->hasMethod($getter)) { if (!$reflClass->getMethod($getter)->isPublic()) { - throw new PropertyAccessDeniedException(sprintf('Method "%s()" is not public in class "%s"', $getter, $reflClass->getName())); + throw new PropertyAccessDeniedException(sprintf('Method "%s()" is not public in class "%s"', $getter, $reflClass->name)); } return $object->$getter(); } elseif ($reflClass->hasMethod($isser)) { if (!$reflClass->getMethod($isser)->isPublic()) { - throw new PropertyAccessDeniedException(sprintf('Method "%s()" is not public in class "%s"', $isser, $reflClass->getName())); + throw new PropertyAccessDeniedException(sprintf('Method "%s()" is not public in class "%s"', $isser, $reflClass->name)); } return $object->$isser(); @@ -305,7 +305,7 @@ class PropertyPath implements \IteratorAggregate return $object->$property; } elseif ($reflClass->hasProperty($property)) { if (!$reflClass->getProperty($property)->isPublic()) { - throw new PropertyAccessDeniedException(sprintf('Property "%s" is not public in class "%s". Maybe you should create the method "%s()" or "%s()"?', $property, $reflClass->getName(), $getter, $isser)); + throw new PropertyAccessDeniedException(sprintf('Property "%s" is not public in class "%s". Maybe you should create the method "%s()" or "%s()"?', $property, $reflClass->name, $getter, $isser)); } return $object->$property; @@ -313,7 +313,7 @@ class PropertyPath implements \IteratorAggregate // needed to support \stdClass instances return $object->$property; } else { - throw new InvalidPropertyException(sprintf('Neither property "%s" nor method "%s()" nor method "%s()" exists in class "%s"', $property, $getter, $isser, $reflClass->getName())); + throw new InvalidPropertyException(sprintf('Neither property "%s" nor method "%s()" nor method "%s()" exists in class "%s"', $property, $getter, $isser, $reflClass->name)); } } } @@ -341,7 +341,7 @@ class PropertyPath implements \IteratorAggregate if ($reflClass->hasMethod($setter)) { if (!$reflClass->getMethod($setter)->isPublic()) { - throw new PropertyAccessDeniedException(sprintf('Method "%s()" is not public in class "%s"', $setter, $reflClass->getName())); + throw new PropertyAccessDeniedException(sprintf('Method "%s()" is not public in class "%s"', $setter, $reflClass->name)); } $objectOrArray->$setter($value); @@ -350,7 +350,7 @@ class PropertyPath implements \IteratorAggregate $objectOrArray->$property = $value; } elseif ($reflClass->hasProperty($property)) { if (!$reflClass->getProperty($property)->isPublic()) { - throw new PropertyAccessDeniedException(sprintf('Property "%s" is not public in class "%s". Maybe you should create the method "%s()"?', $property, $reflClass->getName(), $setter)); + throw new PropertyAccessDeniedException(sprintf('Property "%s" is not public in class "%s". Maybe you should create the method "%s()"?', $property, $reflClass->name, $setter)); } $objectOrArray->$property = $value; @@ -358,7 +358,7 @@ class PropertyPath implements \IteratorAggregate // needed to support \stdClass instances $objectOrArray->$property = $value; } else { - throw new InvalidPropertyException(sprintf('Neither element "%s" nor method "%s()" exists in class "%s"', $property, $setter, $reflClass->getName())); + throw new InvalidPropertyException(sprintf('Neither element "%s" nor method "%s()" exists in class "%s"', $property, $setter, $reflClass->name)); } } else { $objectOrArray[$property] = $value; diff --git a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php index 56d0d6f141..8da79c1d4b 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php @@ -110,8 +110,8 @@ class ControllerResolver implements ControllerResolverInterface $attributes = $request->attributes->all(); $arguments = array(); foreach ($parameters as $param) { - if (array_key_exists($param->getName(), $attributes)) { - $arguments[] = $attributes[$param->getName()]; + if (array_key_exists($param->name, $attributes)) { + $arguments[] = $attributes[$param->name]; } elseif ($param->getClass() && $param->getClass()->isInstance($request)) { $arguments[] = $request; } elseif ($param->isDefaultValueAvailable()) { @@ -125,7 +125,7 @@ class ControllerResolver implements ControllerResolverInterface $repr = $controller; } - throw new \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument (because there is no default value or because there is a non optional argument after this one).', $repr, $param->getName())); + throw new \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument (because there is no default value or because there is a non optional argument after this one).', $repr, $param->name)); } } diff --git a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php index 8af77b368f..5f292d4589 100644 --- a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php +++ b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php @@ -200,7 +200,7 @@ abstract class AnnotationClassLoader implements LoaderInterface */ protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) { - $name = strtolower(str_replace('\\', '_', $class->getName()).'_'.$method->getName()); + $name = strtolower(str_replace('\\', '_', $class->name).'_'.$method->name); if ($this->defaultRouteIndex > 0) { $name .= '_'.$this->defaultRouteIndex; } diff --git a/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php b/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php index dc247d4596..86633f9ecd 100644 --- a/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php +++ b/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php @@ -47,6 +47,6 @@ foreach ($finder as $file) { } $platform = $reflection->newInstance(); - $targetFile = sprintf(__DIR__.'/../schema/%s.sql', $platform->getName()); + $targetFile = sprintf(__DIR__.'/../schema/%s.sql', $platform->name); file_put_contents($targetFile, implode("\n\n", $schema->toSql($platform))); } diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index c6bd56caf4..047c60d175 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -46,7 +46,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer $attributes = array(); foreach ($reflectionMethods as $method) { if ($this->isGetMethod($method)) { - $attributeName = strtolower(substr($method->getName(), 3)); + $attributeName = strtolower(substr($method->name, 3)); $attributeValue = $method->invoke($object); if (null !== $attributeValue && !is_scalar($attributeValue)) { @@ -73,7 +73,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer $params = array(); foreach ($constructorParameters as $constructorParameter) { - $paramName = strtolower($constructorParameter->getName()); + $paramName = strtolower($constructorParameter->name); if (isset($data[$paramName])) { $params[] = $data[$paramName]; @@ -83,7 +83,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer throw new RuntimeException( 'Cannot create an instance of '.$class. ' from serialized data because its constructor requires '. - 'parameter "'.$constructorParameter->getName(). + 'parameter "'.$constructorParameter->name. '" to be present.'); } } @@ -147,8 +147,8 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer private function isGetMethod(\ReflectionMethod $method) { return ( - 0 === strpos($method->getName(), 'get') && - 3 < strlen($method->getName()) && + 0 === strpos($method->name, 'get') && + 3 < strlen($method->name) && 0 === $method->getNumberOfRequiredParameters() ); } diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php index 42fa7d7976..cf8a35c41d 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php @@ -57,12 +57,12 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface // Include constraints from the parent class if ($parent = $metadata->getReflectionClass()->getParentClass()) { - $metadata->mergeConstraints($this->getClassMetadata($parent->getName())); + $metadata->mergeConstraints($this->getClassMetadata($parent->name)); } // Include constraints from all implemented interfaces foreach ($metadata->getReflectionClass()->getInterfaces() as $interface) { - $metadata->mergeConstraints($this->getClassMetadata($interface->getName())); + $metadata->mergeConstraints($this->getClassMetadata($interface->name)); } $this->loader->loadClassMetadata($metadata); diff --git a/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php index 2474dba79f..0286677cc9 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php @@ -32,7 +32,7 @@ class AnnotationLoader implements LoaderInterface public function loadClassMetadata(ClassMetadata $metadata) { $reflClass = $metadata->getReflectionClass(); - $className = $reflClass->getName(); + $className = $reflClass->name; $loaded = false; foreach ($this->reader->getClassAnnotations($reflClass) as $constraint) { @@ -46,10 +46,10 @@ class AnnotationLoader implements LoaderInterface } foreach ($reflClass->getProperties() as $property) { - if ($property->getDeclaringClass()->getName() == $className) { + if ($property->getDeclaringClass()->name == $className) { foreach ($this->reader->getPropertyAnnotations($property) as $constraint) { if ($constraint instanceof Constraint) { - $metadata->addPropertyConstraint($property->getName(), $constraint); + $metadata->addPropertyConstraint($property->name, $constraint); } $loaded = true; @@ -58,13 +58,13 @@ class AnnotationLoader implements LoaderInterface } foreach ($reflClass->getMethods() as $method) { - if ($method->getDeclaringClass()->getName() == $className) { + if ($method->getDeclaringClass()->name == $className) { foreach ($this->reader->getMethodAnnotations($method) as $constraint) { if ($constraint instanceof Constraint) { - if (preg_match('/^(get|is)(.+)$/i', $method->getName(), $matches)) { + if (preg_match('/^(get|is)(.+)$/i', $method->name, $matches)) { $metadata->addGetterConstraint(lcfirst($matches[2]), $constraint); } else { - throw new MappingException(sprintf('The constraint on "%s::%s" cannot be added. Constraints can only be added on methods beginning with "get" or "is".', $className, $method->getName())); + throw new MappingException(sprintf('The constraint on "%s::%s" cannot be added. Constraints can only be added on methods beginning with "get" or "is".', $className, $method->name)); } } diff --git a/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php index a74ffbb429..e8622d2f09 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php @@ -34,10 +34,10 @@ class StaticMethodLoader implements LoaderInterface $reflMethod = $reflClass->getMethod($this->methodName); if (!$reflMethod->isStatic()) { - throw new MappingException(sprintf('The method %s::%s should be static', $reflClass->getName(), $this->methodName)); + throw new MappingException(sprintf('The method %s::%s should be static', $reflClass->name, $this->methodName)); } - if ($reflMethod->getDeclaringClass()->getName() != $reflClass->getName()) { + if ($reflMethod->getDeclaringClass()->name != $reflClass->name) { return false; }