diff --git a/CHANGELOG-2.1.md b/CHANGELOG-2.1.md index 5efad38e2e..bccfd09742 100644 --- a/CHANGELOG-2.1.md +++ b/CHANGELOG-2.1.md @@ -7,6 +7,41 @@ in 2.1 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.1.0...v2.1.1 +* 2.1.9 (2013-03-26) + + * 9875c4b: Added '@@' escaping strategy for YamlFileLoader and YamlDumper + * bbcdfe2: [Yaml] fixed bugs with folded scalar parsing + * 5afea04: [Form] made DefaultCsrfProvider using session_status() when available + * c928ddc: [HttpFoudantion] fixed Request::getPreferredLanguage() + * e6b7515: [DomCrawler] added support for query string with slash + * 17dc2ff: [HttpRequest] fixes Request::getLanguages() bug + * e51432a: sub-requests are now created with the same class as their parent + * ef53456: [DoctrineBridge] Avoids blob values to be logged by doctrine + * 6575df6: [Security] use current request attributes to generate redirect url? + * 7216cb0: [Validator] fix showing wrong max file size for upload errors + * c423f16: [2.1][TwigBridge] Fixes Issue #7342 in TwigBridge + * 7d87ecd: [FrameworkBundle] fixed cahe:clear command's warmup + * fe4cc24: [TwigBridge] fixed fixed scope & trans_default_domain node visitor + * fc47589: [BrowserKit] added ability to ignored malformed set-cookie header + * 5bc30bb: [Translation] added xliff loader/dumper with resname support + * 7241be9: [Finder] fixed a potential issue on Solaris where INF value is wrong (refs #7269) + * 1d3da29: [FrameworkBundle] avoids cache:clear to break if new/old folders already exist + * b9cdb9a: [HttpKernel] Fixed possible profiler token collision (closes #7272, closes #7171) + * d1f5d25: [FrameworkBundle] Fixes invalid serialized objects in cache + * c82c754: RedisProfilerStorage wrong db-number/index-number selected + * e86fefa: Unset loading[$id] in ContainerBuilder on exception + * 73bead7: [ClassLoader] made DebugClassLoader idempotent + * a4ec677: [DomCrawler] Fix relative path handling in links + * 6681df0: [Console] fixed StringInput binding + * 5b19c89: [Console] fixed unparsed StringInput tokens + * bae83c7: [TwigBridge] fixed trans twig extractor + * 8f8ba38: [DomCrawler] fix handling of schemes by Link::getUri() + * 83382bc: [TwigBridge] fixed the translator extractor that were not trimming the text in trans tags (closes #7056) + * b1ea8e5: Fixed handling absent href attribute in base tag + * 8d9cd42: Routing issue with installation in a sub-directory ref: https://github.com/symfony/symfony/issues/7129 + * 0690709: added a DebuClassLoader::findFile() method to make the wrapping less invasive + * 635b1fc: StringInput resets the given options. + * 2.1.8 (2013-02-23) * b2080c4: [HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes #6750) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 81162dda5b..9171ad5d0b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -20,10 +20,10 @@ Symfony2 is the result of the work of many people who made the code better - Joseph Bielawski (stloyd) - Igor Wiedler (igorw) - Benjamin Eberlei (beberlei) + - Jean-François Simon (jfsimon) - Hugo Hamon (hhamon) - Eriksen Costa (eriksencosta) - Martin Hasoň (hason) - - Jean-François Simon (jfsimon) - Jonathan Wage (jwage) - William Durand (couac) - Alexandre Salomé (alexandresalome) @@ -40,11 +40,11 @@ Symfony2 is the result of the work of many people who made the code better - Arnaud Le Blanc (arnaud-lb) - Florin Patan (florinpatan) - Eric Clemmons (ericclemmons) + - Bilal Amarni (bamarni) - Henrik Westphal (snc) - Romain Neutron (romain) - Deni - Dariusz Górecki (canni) - - Bilal Amarni (bamarni) - Marc Weistroff (futurecat) - Jordan Alliot (jalliot) - Arnout Boks (aboks) @@ -54,25 +54,25 @@ Symfony2 is the result of the work of many people who made the code better - Andrej Hudec (pulzarraider) - Brikou Carré (brikou) - John Wards (johnwards) - - Antoine Hérault (herzult) - Fran Moreno (franmomu) + - Antoine Hérault (herzult) - Daniel Holmes (dholmes) - - Bart van den Burg (burgov) - - Christian Raue - Tim Nagel (merk) - Włodzimierz Gajda (gajdaw) + - Bart van den Burg (burgov) + - Christian Raue - Michal Piotrowski (eventhorizon) + - Toni Uebernickel (havvg) - Colin Frei - lenar - - Toni Uebernickel (havvg) - Fabien Pennequin (fabienpennequin) - excelwebzone - woodspire + - Michel Weimerskirch (mweimerskirch) - Grégoire Pineau (lyrixx) - Mario A. Alvarez Garcia (nomack84) - Douglas Greenshields (shieldo) - Kevin Bond (kbond) - - Michel Weimerskirch (mweimerskirch) - Richard Miller (mr_r_miller) - Jacob Dreesen (jdreesen) - Richard Shank (iampersistent) @@ -81,6 +81,7 @@ Symfony2 is the result of the work of many people who made the code better - Robert Schönthal (digitalkaoz) - Felix Labrecque - Michał Pipa (michal.pipa) + - Gordon Franke (gimler) - Daniel Gomes (danielcsgomes) - Gábor Egyed (1ed) - Tigran Azatyan (tigranazatyan) @@ -89,7 +90,6 @@ Symfony2 is the result of the work of many people who made the code better - Arnaud Kleinpeter (nanocom) - David Buchmann (dbu) - Jonathan Ingram (jonathaningram) - - Gordon Franke (gimler) - Sebastiaan Stok (sstok) - Javier Eguiluz (javier.eguiluz) - Matthieu Ouellette-Vachon (maoueh) @@ -132,6 +132,7 @@ Symfony2 is the result of the work of many people who made the code better - Alif Rachmawadi - boombatower - Florian Klein (docteurklein) + - Adrien Brault (adrienbrault) - jules boussekeyt (gordonslondon) - Jan Sorgalla (jsor) - jdhoek @@ -148,7 +149,6 @@ Symfony2 is the result of the work of many people who made the code better - Eric GELOEN (gelo) - Sebastian Bergmann - arjen - - Adrien Brault (adrienbrault) - sun (sun) - Manuel Kiessling (manuelkiessling) - Sergey Linnik @@ -171,8 +171,10 @@ Symfony2 is the result of the work of many people who made the code better - Jeanmonod David (jeanmonod) - Thomas Lallement (raziel057) - Niklas Fiekas + - Francesco Levorato - Tom Van Looy (tvlooy) - Brouznouf + - Peter Kruithof (pkruithof) - Greg Thornton (xdissent) - Lars Strojny - Terje Bråten @@ -194,13 +196,17 @@ Symfony2 is the result of the work of many people who made the code better - Christophe L. (christophelau) - Michael Ridgway - Pavel Campr (pcampr) + - Emanuele Gaspari (inmarelibero) - Brian King - Ricard Clau (ricardclau) - Jan Schumann + - Erin Millard - Olivier Dolbeau (odolbeau) - Konstantin Myakshin (koc) + - Elnur Abdurrakhimov (elnur) - Michele Orselli (orso) - Asier Illarramendi (doup) + - Javier López (loalf) - Chris Heng (gigablah) - Christoph Mewes (xrstf) - Jonas Flodén (flojon) @@ -226,7 +232,6 @@ Symfony2 is the result of the work of many people who made the code better - mcben - Maks Slesarenko - Vicent Soria Durá (vicentgodella) - - Peter Kruithof (pkruithof) - Erik Trapman (eriktrapman) - De Cock Xavier (xdecock) - Manuel Reinhard (sprain) @@ -253,15 +258,14 @@ Symfony2 is the result of the work of many people who made the code better - Lenar Lõhmus - Zach Badgett (zachbadgett) - Aurélien Fredouelle - - Francesco Levorato - Karoly Negyesi (chx) + - janschoenherr - Thomas Tourlourat (armetiz) - jamogon - Geoffrey Tran (geoff) - Florian Rey (nervo) - Maks - Christian Schaefer (caefer) - - Emanuele Gaspari (inmarelibero) - Elliot Anderson (elliot) - Patrick Kaufmann - Ben Ramsey (ramsey) @@ -272,7 +276,6 @@ Symfony2 is the result of the work of many people who made the code better - aubx - Max Rath (drak3) - Ruben Gonzalez (rubenrua) - - Elnur Abdurrakhimov (elnur) - Sinan Eldem - DerManoMann - Nahuel Cuesta (ncuesta) @@ -280,7 +283,6 @@ Symfony2 is the result of the work of many people who made the code better - Roumen Damianoff (roumen) - Pierre du Plessis (pierredup) - Åsmund Garfors - - Erin Millard - Jeremy David (jeremy.david) - Tobias Sjösten (tobiassjosten) - Dustin Dobervich (dustin10) @@ -293,12 +295,15 @@ Symfony2 is the result of the work of many people who made the code better - yktd26 - Jakub Kucharovic - umpirski + - Dmitrii Chekaliuk - cedric lombardot (cedriclombardot) - John Kary (johnkary) - Hossein Bukhamsin - Pierre-Yves LEBECQ (pylebecq) - Fabrice Bernhard (fabriceb) + - Oleg Zinchenko (cystbear) - Johannes Klauss (cloppy) + - fzerorubigd - Mark Sonnabaum - develop - Atsuhiro KUBO (iteman) @@ -382,7 +387,6 @@ Symfony2 is the result of the work of many people who made the code better - Miha Vrhovnik - Moritz Borgmann - Daniel Cestari - - Javier López (loalf) - Magnus Nordlander (magnusnordlander) - Adam Monsen (meonkeys) - LOUARDI Abdeltif (ouardisoft) @@ -405,6 +409,7 @@ Symfony2 is the result of the work of many people who made the code better - Irmantas Šiupšinskas (irmantas) - dantleech - Tero Alén (tero) + - Artem (digi) - Vadim Tyukov (vatson) - Sortex - arjenjb @@ -415,15 +420,16 @@ Symfony2 is the result of the work of many people who made the code better - Sébastien Lavoie - Per Sandström (per) - Ville Mattila + - Marcos Quesada (marcos_quesada) - Robert Kiss (kepten) - Vitaliy Tverdokhlib (vitaliytv) - Martijn Evers - Sergii Smertin (nfx) + - Eddie Jaoude - Nerijus Arlauskas - Haritz Iturbe (hizai) - SPolischook - Diego Sapriza - - fzerorubigd - Joan Cruz - Antoine Corcy - inspiran @@ -433,11 +439,11 @@ Symfony2 is the result of the work of many people who made the code better - Alex Demchenko (pilot) - Tomasz Kowalczyk (thunderer) - Vincent AUBERT (vincent) + - Benoit Garret - DerManoMann - Jochen Bayer (jocl) - Jeremy Bush - Evan Villemez - - Dmitrii Chekaliuk - Davide Borsatto (davide.borsatto) - kaiwa - Albert Ganiev (helios-ag) @@ -468,6 +474,7 @@ Symfony2 is the result of the work of many people who made the code better - Janusz Jablonski - George Giannoulopoulos - Ilya Biryukov + - Lance McNearney - Alberto Pirovano (geezmo) - Xavier Briand (xavierbriand) - Evan Kaufman @@ -490,10 +497,14 @@ Symfony2 is the result of the work of many people who made the code better - Simon Neidhold - Kevin Dew - James Cowgill + - Thomas Ploch (tploch) + - Benjamin Bender - Konrad Mohrfeldt + - Benoit Lévêque (benoit_leveque) - Mephistofeles - pscheit - Nicolas Badey (nico-b) + - Gunnar Lium - povilas - Lars Strojny - Bouke Haarsma @@ -504,8 +515,10 @@ Symfony2 is the result of the work of many people who made the code better - Francisco Facioni (fran6co) - Paweł Wacławczyk (pwc) - Eric Caron + - 2manypeople - Thomas Bibb - Josef Cech + - Ait Boudad Abdellatif (aitboudad) - Andrey Esaulov (andremaha) - hicham ELGUAROUANI (hiiimoo) - Stefan Koopmanschap (skoop) @@ -514,7 +527,6 @@ Symfony2 is the result of the work of many people who made the code better - Chris Tickner (tickner) - Luis Muñoz - Thomas Chmielowiec - - Oleg Zinchenko - Christoph Nissle (derstoffel) - Xavier HAUSHERR - Benjamin Zikarsky @@ -538,6 +550,7 @@ Symfony2 is the result of the work of many people who made the code better - Artyom Protaskin - Nathanael d. Noblet - helmer + - Julien Moulin (lizjulien) - devel - gedrox - hirocaster @@ -569,6 +582,7 @@ Symfony2 is the result of the work of many people who made the code better - Haritz - Grummfy - Rowan Manning + - Kevin Herrera - David Windell - Gabriel Birke - Alan Chen @@ -595,6 +609,7 @@ Symfony2 is the result of the work of many people who made the code better - Jorge Martin (jorgemartind) - giulio de donato (liuggio) - Matthew Davis (mdavis1982) + - Muriel Lusseau (metalmumu) - Matthias Pigulla (mpdude) - Pablo Monterde Perez (plebs) - Jimmy Leger (redpanda) @@ -650,6 +665,7 @@ Symfony2 is the result of the work of many people who made the code better - kwiateusz - David Soria Parra - Sergiy Sokolenko + - dinitrol - Penny Leach - Gábor Fási - oscartv @@ -663,6 +679,8 @@ Symfony2 is the result of the work of many people who made the code better - dorkitude - tirnanog06 - Besnik Br + - sualko + - Nicolas Roudaire - Alex Olmos (alexolmos) - Juan Ases García (ases) - Bernd Matzner (bmatzner) @@ -693,6 +711,7 @@ Symfony2 is the result of the work of many people who made the code better - Alex Carol (picard89) - Daniel Perez Pinazo (pitiflautico) - Ruud Kamphuis (ruudk) + - Sarah Khalil (saro0h) - Sebastian Busch (sebu) - Simon Terrien (sterrien) - Markus Tacker (tacker) diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php index 16a65ebf40..fabd25f7c2 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -113,7 +113,7 @@ class EntityChoiceList extends ObjectChoiceList $this->idField = $identifier[0]; $this->idAsValue = true; - if ('integer' === $this->classMetadata->getTypeOfField($this->idField)) { + if (in_array($this->classMetadata->getTypeOfField($this->idField), array('integer', 'smallint', 'bigint'))) { $this->idAsIndex = true; } } diff --git a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php index af636a752b..3d103e215c 100644 --- a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php +++ b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php @@ -61,10 +61,17 @@ class DbalLogger implements SQLLogger continue; } - // too long string must be shorten - if (self::MAX_STRING_LENGTH < strlen($params[$index])) { - $params[$index] = substr($params[$index], 0, self::MAX_STRING_LENGTH - 6).' [...]'; - continue; + // detect if the too long string must be shorten + if (function_exists('mb_detect_encoding') && false !== $encoding = mb_detect_encoding($params[$index])) { + if (self::MAX_STRING_LENGTH < mb_strlen($params[$index], $encoding)) { + $params[$index] = mb_substr($params[$index], 0, self::MAX_STRING_LENGTH - 6, $encoding).' [...]'; + continue; + } + } else { + if (self::MAX_STRING_LENGTH < strlen($params[$index])) { + $params[$index] = substr($params[$index], 0, self::MAX_STRING_LENGTH - 6).' [...]'; + continue; + } } } } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php index 64cdef8e12..6b0e24bbb6 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php @@ -81,8 +81,10 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase ->getMock() ; - $shortString = str_repeat('a', DbalLogger::MAX_STRING_LENGTH); - $longString = str_repeat('a', DbalLogger::MAX_STRING_LENGTH + 1); + $testString = 'abc'; + + $shortString = str_pad('', DbalLogger::MAX_STRING_LENGTH, $testString); + $longString = str_pad('', DbalLogger::MAX_STRING_LENGTH+1, $testString); $dbalLogger ->expects($this->once()) @@ -95,4 +97,43 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase 'long' => $longString, )); } + + public function testLogUTF8LongString() + { + if (!function_exists('mb_detect_encoding')) { + $this->markTestSkipped('Testing log shortening of utf8 charsets requires the mb_detect_encoding() function.'); + } + + $logger = $this->getMock('Symfony\\Component\\HttpKernel\\Log\\LoggerInterface'); + + $dbalLogger = $this + ->getMockBuilder('Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger') + ->setConstructorArgs(array($logger, null)) + ->setMethods(array('log')) + ->getMock() + ; + + $testStringArray = array('é', 'á', 'ű', 'ő', 'ú', 'ö', 'ü', 'ó', 'í'); + $testStringCount = count($testStringArray); + + $shortString = ''; + $longString = ''; + for($i=1; $i<=DbalLogger::MAX_STRING_LENGTH; $i++) { + $shortString .= $testStringArray[$i % $testStringCount]; + $longString .= $testStringArray[$i % $testStringCount]; + } + $longString .= $testStringArray[$i % $testStringCount]; + + $dbalLogger + ->expects($this->once()) + ->method('log') + ->with('SQL', array('short' => $shortString, 'long' => mb_substr($longString, 0, DbalLogger::MAX_STRING_LENGTH - 6, mb_detect_encoding($longString)).' [...]')) + ; + + $dbalLogger->startQuery('SQL', array( + 'short' => $shortString, + 'long' => $longString, + )); + } + } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php index e077cc1b55..7fd96e9508 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php @@ -28,6 +28,8 @@ class FormPass implements CompilerPassInterface return; } + $definition = $container->getDefinition('form.extension'); + // Builds an array with service IDs as keys and tag aliases as values $types = array(); @@ -40,7 +42,7 @@ class FormPass implements CompilerPassInterface $types[$alias] = $serviceId; } - $container->getDefinition('form.extension')->replaceArgument(1, $types); + $definition->replaceArgument(1, $types); $typeExtensions = array(); @@ -52,11 +54,11 @@ class FormPass implements CompilerPassInterface $typeExtensions[$alias][] = $serviceId; } - $container->getDefinition('form.extension')->replaceArgument(2, $typeExtensions); + $definition->replaceArgument(2, $typeExtensions); // Find all services annotated with "form.type_guesser" $guessers = array_keys($container->findTaggedServiceIds('form.type_guesser')); - $container->getDefinition('form.extension')->replaceArgument(3, $guessers); + $definition->replaceArgument(3, $guessers); } } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php index 692d2329d2..de825b9c4d 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php @@ -301,8 +301,7 @@ class MainConfiguration implements ConfigurationInterface ->children() ->arrayNode('providers') ->example(array( - 'memory' => array( - 'name' => 'memory', + 'my_memory_provider' => array( 'memory' => array( 'users' => array( 'foo' => array('password' => 'foo', 'roles' => 'ROLE_USER'), @@ -310,7 +309,7 @@ class MainConfiguration implements ConfigurationInterface ), ) ), - 'entity' => array('entity' => array('class' => 'SecurityBundle:User', 'property' => 'username')) + 'my_entity_provider' => array('entity' => array('class' => 'SecurityBundle:User', 'property' => 'username')) )) ->disallowNewKeysInSubsequentConfigs() ->isRequired() diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml index 92a0022d40..eec67aa868 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml +++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml @@ -45,11 +45,6 @@ class="%security.authentication.rememberme.services.persistent.class%" parent="security.authentication.rememberme.services.abstract" abstract="true"> - - - - - diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig index 3deb423a6a..da5ac20a03 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -5,15 +5,26 @@ {% set icon %} Symfony - {{ collector.symfonyversion }} + + {% if collector.applicationname %} + {{ collector.applicationname }} {{ collector.applicationversion }} + {% else %} + {{ collector.symfonyversion }} + {% endif %} + {% endset %} {% set text %} + {% if collector.applicationname %} +
+ {{ collector.applicationname }} {{ collector.applicationversion }} +
+ {% endif %}
Symfony {{ collector.symfonyversion }}
{% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %} @@ -106,8 +117,13 @@ Value - Symfony version - {{ collector.symfonyversion }} + {% if collector.applicationname %} + Application + {{ collector.applicationname }} {{ collector.applicationversion }} (on Symfony {{ collector.symfonyversion }}) + {% else %} + Symfony version + {{ collector.symfonyversion }} + {% endif %} {% if 'n/a' != collector.appname %} diff --git a/src/Symfony/Component/DomCrawler/Field/FileFormField.php b/src/Symfony/Component/DomCrawler/Field/FileFormField.php index a00e65613a..4f822206ad 100644 --- a/src/Symfony/Component/DomCrawler/Field/FileFormField.php +++ b/src/Symfony/Component/DomCrawler/Field/FileFormField.php @@ -59,11 +59,17 @@ class FileFormField extends FormField if (null !== $value && is_readable($value)) { $error = UPLOAD_ERR_OK; $size = filesize($value); - $name = basename($value); + $info = pathinfo($value); + $name = $info['basename']; // copy to a tmp location - $tmp = tempnam(sys_get_temp_dir(), 'upload'); - unlink($tmp); + $tmp = sys_get_temp_dir().'/'.sha1(uniqid(mt_rand(), true)); + if (array_key_exists('extension', $info)) { + $tmp .= '.'.$info['extension']; + } + if (is_file($tmp)) { + unlink($tmp); + } copy($value, $tmp); $value = $tmp; } else { diff --git a/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php b/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php index ea3840a18d..066cdb0ef3 100644 --- a/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php @@ -56,8 +56,26 @@ class FileFormFieldTest extends FormFieldTestCase $this->assertEquals(basename(__FILE__), $value['name'], "->$method() sets the name of the file field"); $this->assertEquals('', $value['type'], "->$method() sets the type of the file field"); $this->assertInternalType('string', $value['tmp_name'], "->$method() sets the tmp_name of the file field"); + $this->assertFileExists($value['tmp_name'], "->$method() creates a copy of the file at the tmp_name path"); $this->assertEquals(0, $value['error'], "->$method() sets the error of the file field"); $this->assertEquals(filesize(__FILE__), $value['size'], "->$method() sets the size of the file field"); + + $origInfo = pathinfo(__FILE__); + $tmpInfo = pathinfo($value['tmp_name']); + $this->assertEquals( + $origInfo['extension'], + $tmpInfo['extension'], + "->$method() keeps the same file extension in the tmp_name copy" + ); + + $field->$method(__DIR__.'/../Fixtures/no-extension'); + $value = $field->getValue(); + + $this->assertArrayNotHasKey( + 'extension', + pathinfo($value['tmp_name']), + "->$method() does not add a file extension in the tmp_name copy" + ); } public function getSetValueMethods() diff --git a/src/Symfony/Component/DomCrawler/Tests/Fixtures/no-extension b/src/Symfony/Component/DomCrawler/Tests/Fixtures/no-extension new file mode 100644 index 0000000000..345e6aef71 --- /dev/null +++ b/src/Symfony/Component/DomCrawler/Tests/Fixtures/no-extension @@ -0,0 +1 @@ +Test diff --git a/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php b/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php index 8a66d134ba..6f45708016 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php @@ -19,7 +19,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase public static function setUpBeforeClass() { - self::$tmpDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'symfony2_finder'; + self::$tmpDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'symfony2_finder'; self::$files = array( '.git/', @@ -75,7 +75,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase * Without the call to setUpBeforeClass() property can be null. */ if (!self::$tmpDir) { - self::$tmpDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'symfony2_finder'; + self::$tmpDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'symfony2_finder'; } if (is_array($files)) { diff --git a/src/Symfony/Component/Form/README.md b/src/Symfony/Component/Form/README.md index c336935dd8..2bb5255556 100644 --- a/src/Symfony/Component/Form/README.md +++ b/src/Symfony/Component/Form/README.md @@ -14,7 +14,7 @@ https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/FormServiceProvid Documentation: -http://symfony.com/doc/2.0/book/forms.html +http://symfony.com/doc/2.2/book/forms.html Resources --------- diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php index 75dc226f85..03671d61eb 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php @@ -117,6 +117,6 @@ class DateTimeToRfc3339TransformerTest extends DateTimeTestCase { $transformer = new DateTimeToRfc3339Transformer('UTC', 'UTC'); - var_dump($transformer->reverseTransform('2010-04-31T04:05Z')); + $transformer->reverseTransform('2010-04-31T04:05Z'); } } diff --git a/src/Symfony/Component/HttpFoundation/HeaderBag.php b/src/Symfony/Component/HttpFoundation/HeaderBag.php index f3895f464e..b579eb991a 100644 --- a/src/Symfony/Component/HttpFoundation/HeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/HeaderBag.php @@ -149,7 +149,7 @@ class HeaderBag implements \IteratorAggregate, \Countable * * @param string $key The key * @param string|array $values The value or an array of values - * @param Boolean $replace Whether to replace the actual value of not (true by default) + * @param Boolean $replace Whether to replace the actual value or not (true by default) * * @api */ diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 3cd17b12cf..9475431816 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -25,10 +25,24 @@ use Symfony\Component\HttpFoundation\Response; class ConfigDataCollector extends DataCollector { private $kernel; + private $name; + private $version; /** * Constructor. * + * @param string $name The name of the application using the web profiler + * @param string $version The version of the application using the web profiler + */ + public function __construct($name = null, $version = null) + { + $this->name = $name; + $this->version = $version; + } + + /** + * Sets the Kernel associated with this Request. + * * @param KernelInterface $kernel A KernelInterface instance */ public function setKernel(KernelInterface $kernel = null) @@ -42,6 +56,8 @@ class ConfigDataCollector extends DataCollector public function collect(Request $request, Response $response, \Exception $exception = null) { $this->data = array( + 'app_name' => $this->name, + 'app_version' => $this->version, 'token' => $response->headers->get('X-Debug-Token'), 'symfony_version' => Kernel::VERSION, 'name' => isset($this->kernel) ? $this->kernel->getName() : 'n/a', @@ -64,6 +80,16 @@ class ConfigDataCollector extends DataCollector } } + public function getApplicationName() + { + return $this->data['app_name']; + } + + public function getApplicationVersion() + { + return $this->data['app_version']; + } + /** * Gets the token. * diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccess.php b/src/Symfony/Component/PropertyAccess/PropertyAccess.php index 6fb747578f..eeefc549e5 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccess.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -21,7 +21,7 @@ final class PropertyAccess /** * Creates a property accessor with the default configuration. * - * @return PropertyAccessor The new property accessor. + * @return PropertyAccessor The new property accessor */ public static function getPropertyAccessor() { diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index d318f1c0c5..f38e9943a4 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -96,9 +96,9 @@ class PropertyAccessor implements PropertyAccessorInterface /** * Reads the path from an object up to a given path index. * - * @param object|array $objectOrArray The object or array to read from. - * @param PropertyPathInterface $propertyPath The property path to read. - * @param integer $lastIndex The integer up to which should be read. + * @param object|array $objectOrArray The object or array to read from + * @param PropertyPathInterface $propertyPath The property path to read + * @param integer $lastIndex The index up to which should be read * * @return array The values read in the path. * @@ -139,12 +139,12 @@ class PropertyAccessor implements PropertyAccessorInterface /** * Reads a key from an array-like structure. * - * @param \ArrayAccess|array $array The array or \ArrayAccess object to read from. - * @param string|integer $index The key to read. + * @param \ArrayAccess|array $array The array or \ArrayAccess object to read from + * @param string|integer $index The key to read * * @return mixed The value of the key * - * @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array. + * @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array */ private function &readIndex(&$array, $index) { @@ -180,9 +180,9 @@ class PropertyAccessor implements PropertyAccessorInterface * * @return mixed The value of the read property * - * @throws NoSuchPropertyException If the property does not exist. + * @throws NoSuchPropertyException If the property does not exist * @throws PropertyAccessDeniedException If the property cannot be accessed due to - * access restrictions (private or protected). + * access restrictions (private or protected) */ private function &readProperty(&$object, $property) { @@ -250,11 +250,11 @@ class PropertyAccessor implements PropertyAccessorInterface /** * Sets the value of the property at the given index in the path * - * @param \ArrayAccess|array $array An array or \ArrayAccess object to write to. - * @param string|integer $index The index to write at. - * @param mixed $value The value to write. + * @param \ArrayAccess|array $array An array or \ArrayAccess object to write to + * @param string|integer $index The index to write at + * @param mixed $value The value to write * - * @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array. + * @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array */ private function writeIndex(&$array, $index, $value) { @@ -268,14 +268,14 @@ class PropertyAccessor implements PropertyAccessorInterface /** * Sets the value of the property at the given index in the path * - * @param object|array $object The object or array to write to. - * @param string $property The property to write. - * @param string|null $singular The singular form of the property name or null. - * @param mixed $value The value to write. + * @param object|array $object The object or array to write to + * @param string $property The property to write + * @param string|null $singular The singular form of the property name or null + * @param mixed $value The value to write * - * @throws NoSuchPropertyException If the property does not exist. + * @throws NoSuchPropertyException If the property does not exist * @throws PropertyAccessDeniedException If the property cannot be accessed due to - * access restrictions (private or protected). + * access restrictions (private or protected) */ private function writeProperty(&$object, $property, $singular, $value) { @@ -368,9 +368,9 @@ class PropertyAccessor implements PropertyAccessorInterface /** * Camelizes a given string. * - * @param string $string Some string. + * @param string $string Some string * - * @return string The camelized version of the string. + * @return string The camelized version of the string */ private function camelize($string) { @@ -381,11 +381,11 @@ class PropertyAccessor implements PropertyAccessorInterface * Searches for add and remove methods. * * @param \ReflectionClass $reflClass The reflection class for the given object - * @param array $singulars The singular form of the property name or null. + * @param array $singulars The singular form of the property name or null * - * @return array|null An array containing the adder and remover when found, null otherwise. + * @return array|null An array containing the adder and remover when found, null otherwise * - * @throws NoSuchPropertyException If the property does not exist. + * @throws NoSuchPropertyException If the property does not exist */ private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars) { @@ -416,12 +416,12 @@ class PropertyAccessor implements PropertyAccessorInterface /** * Returns whether a method is public and has a specific number of required parameters. * - * @param \ReflectionClass $class The class of the method. - * @param string $methodName The method name. - * @param integer $parameters The number of parameters. + * @param \ReflectionClass $class The class of the method + * @param string $methodName The method name + * @param integer $parameters The number of parameters * * @return Boolean Whether the method is public and has $parameters - * required parameters. + * required parameters */ private function isAccessible(\ReflectionClass $class, $methodName, $parameters) { diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php b/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php index 058806c6ae..c13b8d8235 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php @@ -39,15 +39,15 @@ interface PropertyAccessorInterface * * If neither is found, an exception is thrown. * - * @param object|array $objectOrArray The object or array to modify. - * @param string|PropertyPathInterface $propertyPath The property path to modify. - * @param mixed $value The value to set at the end of the property path. + * @param object|array $objectOrArray The object or array to modify + * @param string|PropertyPathInterface $propertyPath The property path to modify + * @param mixed $value The value to set at the end of the property path * - * @throws Exception\NoSuchPropertyException If a property does not exist. + * @throws Exception\NoSuchPropertyException If a property does not exist * @throws Exception\PropertyAccessDeniedException If a property cannot be accessed due to - * access restrictions (private or protected). + * access restrictions (private or protected) * @throws Exception\UnexpectedTypeException If a value within the path is neither object - * nor array. + * nor array */ public function setValue(&$objectOrArray, $propertyPath, $value); @@ -73,7 +73,7 @@ interface PropertyAccessorInterface * If none of them are found, an exception is thrown. * * @param object|array $objectOrArray The object or array to traverse - * @param string|PropertyPathInterface $propertyPath The property path to modify. + * @param string|PropertyPathInterface $propertyPath The property path to read * * @return mixed The value at the end of the property path * diff --git a/src/Symfony/Component/PropertyAccess/PropertyPath.php b/src/Symfony/Component/PropertyAccess/PropertyPath.php index 5fc4ac635b..ea6ab3ca6f 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPath.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPath.php @@ -62,10 +62,10 @@ class PropertyPath implements \IteratorAggregate, PropertyPathInterface /** * Constructs a property path from a string. * - * @param PropertyPath|string $propertyPath The property path as string or instance. + * @param PropertyPath|string $propertyPath The property path as string or instance * - * @throws UnexpectedTypeException If the given path is not a string. - * @throws InvalidPropertyPathException If the syntax of the property path is not valid. + * @throws UnexpectedTypeException If the given path is not a string + * @throws InvalidPropertyPathException If the syntax of the property path is not valid */ public function __construct($propertyPath) { diff --git a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php b/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php index f169f2835b..a4b879ad38 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php @@ -44,9 +44,9 @@ class PropertyPathBuilder /** * Appends a (sub-) path to the current path. * - * @param PropertyPathInterface $path The path to append. + * @param PropertyPathInterface $path The path to append * @param integer $offset The offset where the appended piece - * starts in $path. + * starts in $path * @param integer $length The length of the appended piece. * If 0, the full path is appended. */ @@ -67,7 +67,7 @@ class PropertyPathBuilder /** * Appends an index element to the current path. * - * @param string $name The name of the appended index. + * @param string $name The name of the appended index */ public function appendIndex($name) { @@ -78,7 +78,7 @@ class PropertyPathBuilder /** * Appends a property element to the current path. * - * @param string $name The name of the appended property. + * @param string $name The name of the appended property */ public function appendProperty($name) { @@ -89,8 +89,8 @@ class PropertyPathBuilder /** * Removes elements from the current path. * - * @param integer $offset The offset at which to remove. - * @param integer $length The length of the removed piece. + * @param integer $offset The offset at which to remove + * @param integer $length The length of the removed piece * * @throws OutOfBoundsException if offset is invalid */ @@ -106,15 +106,15 @@ class PropertyPathBuilder /** * Replaces a sub-path by a different (sub-) path. * - * @param integer $offset The offset at which to replace. - * @param integer $length The length of the piece to replace. - * @param PropertyPathInterface $path The path to insert. + * @param integer $offset The offset at which to replace + * @param integer $length The length of the piece to replace + * @param PropertyPathInterface $path The path to insert * @param integer $pathOffset The offset where the inserted piece - * starts in $path. + * starts in $path * @param integer $pathLength The length of the inserted piece. * If 0, the full path is inserted. * - * @throws OutOfBoundsException If the offset is invalid. + * @throws OutOfBoundsException If the offset is invalid */ public function replace($offset, $length, PropertyPathInterface $path, $pathOffset = 0, $pathLength = 0) { @@ -137,10 +137,10 @@ class PropertyPathBuilder /** * Replaces a property element by an index element. * - * @param integer $offset The offset at which to replace. + * @param integer $offset The offset at which to replace * @param string $name The new name of the element. Optional. * - * @throws OutOfBoundsException If the offset is invalid. + * @throws OutOfBoundsException If the offset is invalid */ public function replaceByIndex($offset, $name = null) { @@ -158,10 +158,10 @@ class PropertyPathBuilder /** * Replaces an index element by a property element. * - * @param integer $offset The offset at which to replace. + * @param integer $offset The offset at which to replace * @param string $name The new name of the element. Optional. * - * @throws OutOfBoundsException If the offset is invalid. + * @throws OutOfBoundsException If the offset is invalid */ public function replaceByProperty($offset, $name = null) { @@ -179,7 +179,7 @@ class PropertyPathBuilder /** * Returns the length of the current path. * - * @return integer The path length. + * @return integer The path length */ public function getLength() { @@ -189,7 +189,7 @@ class PropertyPathBuilder /** * Returns the current property path. * - * @return PropertyPathInterface The constructed property path. + * @return PropertyPathInterface The constructed property path */ public function getPropertyPath() { @@ -201,7 +201,7 @@ class PropertyPathBuilder /** * Returns the current property path as string. * - * @return string The property path as string. + * @return string The property path as string */ public function __toString() { @@ -225,9 +225,9 @@ class PropertyPathBuilder * removed at $offset and another chunk of length $insertionLength * can be inserted. * - * @param integer $offset The offset where the removed chunk starts. - * @param integer $cutLength The length of the removed chunk. - * @param integer $insertionLength The length of the inserted chunk. + * @param integer $offset The offset where the removed chunk starts + * @param integer $cutLength The length of the removed chunk + * @param integer $insertionLength The length of the inserted chunk */ private function resize($offset, $cutLength, $insertionLength) { diff --git a/src/Symfony/Component/PropertyAccess/PropertyPathInterface.php b/src/Symfony/Component/PropertyAccess/PropertyPathInterface.php index fb95f1464d..95f34ffae6 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPathInterface.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPathInterface.php @@ -21,14 +21,14 @@ interface PropertyPathInterface extends \Traversable /** * Returns the string representation of the property path * - * @return string The path as string. + * @return string The path as string */ public function __toString(); /** * Returns the length of the property path, i.e. the number of elements. * - * @return integer The path length. + * @return integer The path length */ public function getLength(); @@ -40,7 +40,7 @@ interface PropertyPathInterface extends \Traversable * * If this property path only contains one item, null is returned. * - * @return PropertyPath The parent path or null. + * @return PropertyPath The parent path or null */ public function getParent(); @@ -58,7 +58,7 @@ interface PropertyPathInterface extends \Traversable * * @return string A property or index name * - * @throws Exception\OutOfBoundsException If the offset is invalid. + * @throws Exception\OutOfBoundsException If the offset is invalid */ public function getElement($index); @@ -69,7 +69,7 @@ interface PropertyPathInterface extends \Traversable * * @return Boolean Whether the element at this index is a property * - * @throws Exception\OutOfBoundsException If the offset is invalid. + * @throws Exception\OutOfBoundsException If the offset is invalid */ public function isProperty($index); @@ -80,7 +80,7 @@ interface PropertyPathInterface extends \Traversable * * @return Boolean Whether the element at this index is an array index * - * @throws Exception\OutOfBoundsException If the offset is invalid. + * @throws Exception\OutOfBoundsException If the offset is invalid */ public function isIndex($index); } diff --git a/src/Symfony/Component/Routing/Generator/UrlGenerator.php b/src/Symfony/Component/Routing/Generator/UrlGenerator.php index 942280acdb..9dac1c1f4c 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGenerator.php +++ b/src/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -261,7 +261,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt } // add a query string if needed - $extra = array_diff_key($parameters, $variables); + $extra = array_diff_key($parameters, $variables, $defaults); if ($extra && $query = http_build_query($extra, '', '&')) { $url .= '?'.$query; } diff --git a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php index b28fdd8279..512cbd4e18 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -297,8 +297,8 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase { $routes = $this->getRoutes('test', new Route('/test', array('default' => 'value'))); - $this->assertSame('/app.php/test?default=foo', $this->getGenerator($routes)->generate('test', array('default' => 'foo'))); - $this->assertSame('/app.php/test?default=value', $this->getGenerator($routes)->generate('test', array('default' => 'value'))); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => 'foo'))); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => 'value'))); $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test')); } diff --git a/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php b/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php index 9f4013d1b2..6500bfd8ba 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php +++ b/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php @@ -20,6 +20,7 @@ use Symfony\Component\Security\Core\Exception\CookieTheftException; use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Util\SecureRandomInterface; +use Psr\Log\LoggerInterface; /** * Concrete implementation of the RememberMeServicesInterface which needs @@ -98,7 +99,7 @@ class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices } $series = $persistentToken->getSeries(); - $tokenValue = $this->secureRandom->nextBytes(64); + $tokenValue = base64_encode($this->secureRandom->nextBytes(64)); $this->tokenProvider->updateToken($series, $tokenValue, new \DateTime()); $request->attributes->set(self::COOKIE_ATTR_NAME, new Cookie( @@ -120,8 +121,8 @@ class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices */ protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token) { - $series = $this->secureRandom->nextBytes(64); - $tokenValue = $this->secureRandom->nextBytes(64); + $series = base64_encode($this->secureRandom->nextBytes(64)); + $tokenValue = base64_encode($this->secureRandom->nextBytes(64)); $this->tokenProvider->createNewToken( new PersistentToken( diff --git a/src/Symfony/Component/Security/README.md b/src/Symfony/Component/Security/README.md index 057f8445be..34193f0fef 100644 --- a/src/Symfony/Component/Security/README.md +++ b/src/Symfony/Component/Security/README.md @@ -11,7 +11,7 @@ Resources Documentation: -http://symfony.com/doc/2.0/book/security.html +http://symfony.com/doc/2.2/book/security.html Resources --------- diff --git a/src/Symfony/Component/Translation/README.md b/src/Symfony/Component/Translation/README.md index ca591a309e..8e3f495660 100644 --- a/src/Symfony/Component/Translation/README.md +++ b/src/Symfony/Component/Translation/README.md @@ -26,7 +26,7 @@ https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/TranslationServic Documentation: -http://symfony.com/doc/2.0/book/translation.html +http://symfony.com/doc/2.2/book/translation.html You can run the unit tests with the following command: diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md index f1b255602a..27e0977fbd 100644 --- a/src/Symfony/Component/Validator/README.md +++ b/src/Symfony/Component/Validator/README.md @@ -107,7 +107,7 @@ https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/ValidatorServiceP Documentation: -http://symfony.com/doc/2.0/book/validation.html +http://symfony.com/doc/2.2/book/validation.html JSR-303 Specification: diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf index cc823ea301..4e37fcfbfe 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf @@ -4,23 +4,23 @@ This value should be false. - 値はfalseでなければなりません. + falseでなければなりません。 This value should be true. - 値はtrueでなければなりません. + trueでなければなりません。 This value should be of type {{ type }}. - 値の型は{{ type }}でなければなりません. + 型は{{ type }}でなければなりません。 This value should be blank. - 値は空でなければなりません. + 空でなければなりません。 The value you selected is not a valid choice. - 選択された値は選択肢として有効な値ではありません. + 有効な選択肢ではありません。 You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. @@ -32,47 +32,47 @@ One or more of the given values is invalid. - 1つまたは複数の選択された値が正しくありません. + 無効な選択肢が含まれています。 The fields {{ fields }} were not expected. - フィールド{{ fields }}は無効です. + フィールド{{ fields }}は無効です。 The fields {{ fields }} are missing. - フィールド{{ fields }}は必須です. + フィールド{{ fields }}は必須です。 This value is not a valid date. - 値が有効な日付ではありません. + 有効な日付ではありません。 This value is not a valid datetime. - 値が有効な日時ではありません. + 有効な日時ではありません。 This value is not a valid email address. - 値が有効なメールアドレスではありません. + 有効なメールアドレスではありません。 The file could not be found. - ファイルが見つかりません. + ファイルが見つかりません。 The file is not readable. - ファイルを読み込めません. + ファイルを読み込めません。 The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - ファイルのサイズが大きすぎます({{ size }} {{ suffix }})。有効な最大サイズは{{ limit }} {{ suffix }}です. + ファイルのサイズが大きすぎます({{ size }} {{ suffix }})。有効な最大サイズは{{ limit }} {{ suffix }}です。 The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - ファイルのMIMEタイプが無効です({{ type }})。有効なMIMEタイプは{{ types }}です. + ファイルのMIMEタイプが無効です({{ type }})。有効なMIMEタイプは{{ types }}です。 This value should be {{ limit }} or less. - 値は{{ limit }}以下でなければなりません. + {{ limit }}以下でなければなりません。 This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. @@ -80,7 +80,7 @@ This value should be {{ limit }} or more. - 値は{{ limit }}以上でなければなりません. + {{ limit }}以上でなければなりません。 This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. @@ -88,63 +88,131 @@ This value should not be blank. - 値が空であってはなりません. + 空であってはなりません。 This value should not be null. - 値がnullであってはなりません. + nullであってはなりません。 This value should be null. - 値はnullでなければなりません. + nullでなければなりません。 This value is not valid. - 値が無効です. + 有効な値ではありません。 This value is not a valid time. - 値が有効な時刻ではありません. + 有効な時刻ではありません。 This value is not a valid URL. - 値が有効なURLではありません. + 有効なURLではありません。 The two values should be equal. - 2つの値が同じでなければなりません. + 2つの値が同じでなければなりません。 - This value is not a valid country. - 値は有効な国名ではありません. + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + ファイルのサイズが大きすぎます。有効な最大サイズは{{ limit }} {{ suffix }}です。 - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - ファイルのサイズが大きすぎます。有効な最大サイズは{{ limit }} {{ suffix }}です. + The file is too large. + ファイルのサイズが大きすぎます。 - The file is too large. - ファイルのサイズが大きすぎます. + The file could not be uploaded. + ファイルをアップロードできませんでした。 - The file could not be uploaded. - ファイルをアップロードできませんでした. + This value should be a valid number. + 有効な数字ではありません。 This file is not a valid image. - ファイルが画像ではありません. + ファイルが画像ではありません。 This is not a valid IP address. - 値は有効なIPアドレスではありません. + 有効なIPアドレスではありません。 This value is not a valid language. - 値は有効な言語名ではありません. + 有効な言語名ではありません。 This value is not a valid locale. - 値は有効なロケールではありません. + 有効なロケールではありません。 + + + This value is not a valid country. + 有効な国名ではありません。 + + + This value is already used. + 既に使用されています。 + + + The size of the image could not be detected. + 画像のサイズが検出できません。 + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + 画像の幅が大きすぎます({{ width }}ピクセル)。{{ max_width }}ピクセルまでにしてください。 + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + 画像の幅が小さすぎます({{ width }}ピクセル)。{{ min_width }}ピクセル以上にしてください。 + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + 画像の高さが大きすぎます({{ height }}ピクセル)。{{ max_height }}ピクセルまでにしてください。 + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + 画像の高さが小さすぎます({{ height }}ピクセル)。{{ min_height }}ピクセル以上にしてください。 + + + This value should be the user current password. + ユーザーの現在のパスワードでなければなりません。 + + + This value should have exactly {{ limit }} characters. + ちょうど{{ limit }}文字でなければなりません。 + + + The file was only partially uploaded. + ファイルのアップロードは完全ではありません。 + + + No file was uploaded. + ファイルがアップロードされていません。 + + + No temporary folder was configured in php.ini. + php.iniで一時フォルダが設定されていません。 + + + Cannot write temporary file to disk. + 一時ファイルをディスクに書き込むことができません。 + + + A PHP extension caused the upload to fail. + PHP拡張によってアップロードに失敗しました。 + + + This collection should contain {{ limit }} elements or more. + {{ limit }}個以上の要素を含んでなければいけません。 + + + This collection should contain {{ limit }} elements or less. + 要素は{{ limit }}個までです。 + + + This collection should contain exactly {{ limit }} elements. + 要素はちょうど{{ limit }}個でなければなりません。