{"push_id":990178567,"size":638,"distinct_size":1,"ref":"refs/heads/2.5","head":"a9c088391e3b8c474f8f4b2d8886742a8602d5d6","before":"b1daee4c7be5bb6a7be1735348660fc4b7538b60","commits":[{"sha":"8ce4132eb20f3ea09bf19dfaa77e484c3af1e1fd","author":{"email":"50f3f01caa053693ce619d596e14b0ff3901ab49@tubo-world.de","name":"Tobias Schultze"},"message":"[Form] Remove unneeded FormUtil constants\n\nThey are part of the public API (as const are always public) but cannot be used at all from outside the class as the�$pluralMap is private. The meaning of the indices is already documented in the array.","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/8ce4132eb20f3ea09bf19dfaa77e484c3af1e1fd"},{"sha":"86b68a68ea257ac47eac2cdf0af765a61602a05f","author":{"email":"50f3f01caa053693ce619d596e14b0ff3901ab49@tubo-world.de","name":"Tobias Schultze"},"message":"micro-optim: replace for with foreach","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/86b68a68ea257ac47eac2cdf0af765a61602a05f"},{"sha":"af71fc01c28eea236d54c9f17310dcfde2de5453","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"merged branch Tobion/patch-4 (PR #5293)\n\nCommits\n-------\n\n0f86a33 micro-optim: replace for with foreach\n4efb9fe [Form] Remove unneeded FormUtil constants\n\nDiscussion\n----------\n\n[Form] Remove FormUtil constants\n\nThe constants are not useful from outside the class as the $pluralMap is also private. So no need to expose these veriables in the API when they cannot be used in any way. Unfortunately there are not private constants, so use private static. Then I realized the variables can be removed altogether, as they are only used once anyway and the index meaning is already documented in pluralMap.\n\n---------------------------------------------------------------------------\n\nby empire at 2012-08-18T12:58:22Z\n\nFormUtils is abstract class, and maybe subclass (in future) will use this constants, I think changing access modifier to `protected` is better option.\n\n---------------------------------------------------------------------------\n\nby Tobion at 2012-08-18T12:59:40Z\n\nThey cannot, as pluralMap is private...\n\n---------------------------------------------------------------------------\n\nby Partugal at 2012-08-18T14:11:17Z\n\nextract self::$pluralMap into local variable add small speed up\n4.5499801635742 ms vs 5.7430267333984 ms on 100 iterations\n\n---------------------------------------------------------------------------\n\nby Tobion at 2012-08-18T14:16:47Z\n\nThis is not about performance.\n\n---------------------------------------------------------------------------\n\nby Partugal at 2012-08-18T14:21:11Z\n\nyes but adds\nyour changes vs current is\n5.7430267333984 ms vs 6.4971446990967 ms on 100 iterations\n\n---------------------------------------------------------------------------\n\nby Tobion at 2012-08-18T14:29:48Z\n\nHow about `$map =& self::$pluralMap[$i]`?\n\n---------------------------------------------------------------------------\n\nby Partugal at 2012-08-18T14:59:57Z\n\nI mean https://gist.github.com/3387253\n\n---------------------------------------------------------------------------\n\nby Partugal at 2012-08-18T15:01:45Z\n\nforeach is event faster :)\n(4.1971206665039 ms on my hw)\n\n---------------------------------------------------------------------------\n\nby Tobion at 2012-08-18T15:04:51Z\n\nI see.\n\n---------------------------------------------------------------------------\n\nby Partugal at 2012-08-18T15:06:41Z\n\nin first comment i mean code like this:\n```php\n$pluralMap = self::$pluralMap; // do this because access to static property is to slow\n```\n\non my machine & is slower `$map =& $pluralMap[$i]` vs `$map = $pluralMap[$i]`\n5.0 vs 4.8 ms\n\nimho & not needed in read only code\n\n---------------------------------------------------------------------------\n\nby Tobion at 2012-08-18T15:15:03Z\n\nWell, you'd need to benchmark memory too. `=&` should reduce memory primarily in this case.\n\n---------------------------------------------------------------------------\n\nby Partugal at 2012-08-18T15:19:35Z\n\n```php\necho memory_get_usage() . \"\\n\"; // 711536\n\n$a = array_fill(5, 6000, 'banana');\necho memory_get_usage() . \"\\n\"; // 1497632\n\n$b = $a;\necho memory_get_usage() . \"\\n\"; // 1497760\n\n$b[1] = 2;\necho memory_get_usage() . \"\\n\"; // 2283832\n```\n\n1497760  - 1497632 = 128  it is size for variable structure not for its value:\n\n```php\necho memory_get_usage() . \"\\n\"; // 711536\n\n$a = 1;\necho memory_get_usage() . \"\\n\"; // 1497632\n\n$b = &$a;\necho memory_get_usage() . \"\\n\"; // 1497760\n```\n\n---------------------------------------------------------------------------\n\nby Seldaek at 2012-08-18T17:52:32Z\n\n@Tobion http://schlueters.de/blog/archives/125-Do-not-use-PHP-references.html - search for \"copy-on-write\" if you don't want to read it all.\n\n---------------------------------------------------------------------------\n\nby Tobion at 2012-08-18T19:37:44Z\n\nYeah I know about copy on write. I thought there might be a difference what you assign a sub-element of an array to a variable. But apparently not.\nInterestingly `$a =& $b` takes a little more memory than `$a = $b` according to `memory_get_usage ()` but not when using `memory_get_usage (true)`.\n\n---------------------------------------------------------------------------\n\nby bschussek at 2012-08-30T08:15:01Z\n\nI don't like the removal of the constants. They introduce meaning into the integers and improve code clarity. The rest looks good.\n\n---------------------------------------------------------------------------\n\nby Tobion at 2012-08-30T13:18:19Z\n\nMy opinion of the constants:\n- They are part of the public API (as const are alwalys public) but cannot be used at all, as everything else is private...\n- They are each only used once.\n- The meaning of the indices is already documented in `$pluralMap`\n- They are not used when building `$pluralMap` so they dont imprivate code clarity and consistence either. But doing so would on the other hand make it probably more ugly. So removing them is IMO best solution.\n\n---------------------------------------------------------------------------\n\nby bschussek at 2012-08-30T15:21:03Z\n\nIf you really need to remove the constants, then please comment the code where they are used accordingly.\n\n---------------------------------------------------------------------------\n\nby Tobion at 2012-08-31T00:58:51Z\n\nI dont see what I should comment to make it more understandable, as the the map is already assigned to a named variable like `$suffixLength = $map[1];`.\n\n---------------------------------------------------------------------------\n\nby bschussek at 2012-08-31T09:12:18Z\n\n> I dont see what I should comment to make it more understandable, as the the map is already assigned to a named variable\n\n`$map[2]` and `$map[3]` is not self-describing.\n\n---------------------------------------------------------------------------\n\nby Tobion at 2012-08-31T17:23:15Z\n\n@bschussek Done.\n\n---------------------------------------------------------------------------\n\nby bschussek at 2012-08-31T22:13:41Z\n\nCould you please squash your commits?","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/af71fc01c28eea236d54c9f17310dcfde2de5453"},{"sha":"742ac6e75aeecf96047483cd1dc024ac620f526d","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"merged 2.1","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/742ac6e75aeecf96047483cd1dc024ac620f526d"},{"sha":"e09302dc06060543bc12ced569fb6322c3d8ac8b","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"replaced self.version/2.1.* by 2.2.* in composer.json files","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/e09302dc06060543bc12ced569fb6322c3d8ac8b"},{"sha":"6c8fb91ffbf720e3f7d9d56c0ba6a7e2121f472d","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"Merge branch '2.1'\n\n* 2.1:\n  [Form] removed comment now that PHPUnit 3.7 is out\n  Add a Sigchild compatibility mode (set to false by default)\n  fix Fatal error: Cannot access private property\n\nConflicts:\n\tsrc/Symfony/Component/Process/Process.php","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/6c8fb91ffbf720e3f7d9d56c0ba6a7e2121f472d"},{"sha":"b0a5ddac7cbaee21cf33edce7853101d0330d636","author":{"email":"6a9ad6401410f2aa81f4bb1690957c7187bb6f3b@gmail.com","name":"Filippo Tessarotto"},"message":"Optimize autoload prefix in composer.json\n\nBy having more specific autoload prefixes it is possible to reduce the\nnumber of stat calls made. Also it prevents conflicts with similar\nnamespaces.","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/b0a5ddac7cbaee21cf33edce7853101d0330d636"},{"sha":"66555f006f849b2e4f2701f35a1641bc670385cd","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"Merge branch '2.1'\n\n* 2.1:\n  Added Base64 encoding, decoding to MongoDBProfilerStorage\n  Fix duplicated code and a field name\n  refactor src/Symfony/Component/Translation/Loader/MoFileLoader.php\n  fixed typo\n  Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf\n  fixed issue #5596 (Broken DOM with the profiler's toolbar set in position top)\n  [Form] Fixed the testsuite for PHPUnit 3.6 as travis still uses it\n  added dirs generated by build-data.php in locale component to .gitignore\n  [Process] Fixed bug introduced by 7bafc69f38a3512eb15aad506959a4e7be162e52.\n  [Process][Tests] Prove process fail (Add more test case)\n  [Process][Tests] Prove process fail\n  [HttpFoundation] Fixed the tests\n  [DomCrawler] Added test for supported encodings by mbstring\n  [Config] Fixed preserving keys in associative arrays\n  [Console] Fixed return value for Command::run\n  [Locale] Fixed tests\n  [Console] Fix some input tests\n  [Filesystem] Fixed tests on Windows\n  [Config] Fixed tests on Windows","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/66555f006f849b2e4f2701f35a1641bc670385cd"},{"sha":"404977be991ad456f37581ec26dfc65551fe8105","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"Merge branch '2.1'\n\n* 2.1:\n  fixed CS\n  added doc comments\n  added doc comments\n  [Validator] Updated swedish translation\n  Update src/Symfony/Component/Validator/Resources/translations/validators.de.xlf\n  [2.1] Exclude tests from zips via gitattributes\n  [HttpKernel][Translator] Fixed type-hints\n  Updated lithuanian validation translation\n  [DomCrawler] Allows using multiselect through Form::setValues().\n  [Translation] forced the catalogue to be regenerated when a resource is added (closes symfony/Translation#1)\n  Unit test for patched method OptionsResolver::validateOptionValues().\n  validateOptionValues throw a notice if an allowed value is set and the corresponding option isn't.\n  [Form] Hardened code of ViolationMapper against errors\n  [HttpFoundation] Fixed #5611 - Request::splitHttpAcceptHeader incorrect result order.\n  [Form] Fixed negative index access in PropertyPathBuilder\n  Update src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf\n\nConflicts:\n\tsrc/Symfony/Component/DomCrawler/Form.php\n\tsrc/Symfony/Component/Process/Process.php","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/404977be991ad456f37581ec26dfc65551fe8105"},{"sha":"1267526384e80112ffe1702928426ab4402a35a0","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[Form] Removed unused method ChoiceView::isSelected()","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/1267526384e80112ffe1702928426ab4402a35a0"},{"sha":"c92a2dd34357ade2b7b69f112db4438ce8c462fd","author":{"email":"487b3354a644631ed8bd7fb3ebe72fd81e53b552@gmail.com","name":"Danny Berger"},"message":"Fix a few namespaces to match file system.","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/c92a2dd34357ade2b7b69f112db4438ce8c462fd"},{"sha":"71a68c5124686e81ded1296e2f3490724500c826","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"Merge branch '2.1'\n\n* 2.1: (28 commits)\n  Delete use of CreationExeption\n  [Form] Fixed error message in PropertyPath to not advice to use a non-existing feature\n  [Form] Fixed creation of multiple money fields with different currencies\n  [Form] Fixed setting the \"data\" option to an object in \"choice\" and \"entity\" type\n  Fixed Serbian plural translations.\n  Fixed IPv6 Check in RequestMatcher\n  Fix typo\n  change what I think is a typo\n  [Console] Fix error when mode is not in PATH\n  [WebProfilerBundle] fixed macro usage (to be forward compatible with Twig 2.x)\n  Change monolog require-dev to use the branch alias instead of dev-master\n  [FrameworkBundle] partially reverted previous merge\n  [2.1] Added missing error return codes in commands\n  Made the router lazy when setting the context\n  [WebProfilerBundle] fixed typos\n  Fix incorrect variable in FileProfilerStorage\n  UnitTest fix\n  UnitTest fix\n  added a unit test\n  fixed #5384\n  ...","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/71a68c5124686e81ded1296e2f3490724500c826"},{"sha":"c7467148f35d30ca409dd86b46327566d1d3d1cc","author":{"email":"6a4ee067db71aa36bf8591f0a7c5bc8e798d6922@gmail.com","name":"Саша Стаменковић"},"message":"Changed getPattern visibility\n\nIt should be possible to override this method.","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/c7467148f35d30ca409dd86b46327566d1d3d1cc"},{"sha":"e89170307ffee77dec6098029a14dffd60aaa6cc","author":{"email":"6a4ee067db71aa36bf8591f0a7c5bc8e798d6922@gmail.com","name":"Sasa Stamenkovic"},"message":"Changed MoneyType::$patterns visibility.","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/e89170307ffee77dec6098029a14dffd60aaa6cc"},{"sha":"953ccf400115be907c948a083e3241995705c187","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"Merge branch '2.1'\n\n* 2.1:\n  added missing use statment (closes #5825)\n  Code cleanup\n  [WebProfilerBundle] Fixed the use of nested macros\n  Removed unused use statements.\n  Nsdocblocks\n  [ConfigDumpReference] avoid notice for variable nodes\n  fixed fallback locale\n  UniqueValidatorTest, Change message on assertions\n  Documented removed _form_is_choice_group function\n\nConflicts:\n\tsrc/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php\n\tsrc/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/953ccf400115be907c948a083e3241995705c187"},{"sha":"ef31be3bf6143856ebd1f79a7a1d98e993160523","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"merged branch Dattaya/form/trim_listener (PR #4115)\n\nThis PR was squashed before being merged into the master branch (closes #4115).\n\nCommits\n-------\n\n878dd91 [2.2] [Form] Trim listener, unicode whitespace characters.\n\nDiscussion\n----------\n\n[2.2] [Form] Trim listener, unicode whitespace characters.\n\nBug fix: no\nFeature addition: yes\nBackwards compatibility break: no\nSymfony2 tests pass: yes\nFixes the following tickets: -\nTodo:\n\nI have some questions. ZERO WIDTH SPACE (200B) doesn't belong to White_Space but it's invisible and treated as white space by the html4.1 spec - http://www.w3.org/TR/html4/struct/text.html#h-9.1\nSame question for\n* U+202F\tNARROW NO-BREAK SPACE\n* U+FEFF\tZERO WIDTH NO-BREAK SPACE\n\n---------------------------------------------------------------------------\n\nby Dattaya at 2012-04-26T09:49:25Z\n\nIt seems to me that the check `mb_check_encoding($data, 'UTF-8')` is unnecessary. For non utf8 characters `preg_replace` returns `null` if `u` flag is set.\nFrom http://www.pcre.org/pcre.txt:\n>When you set the PCRE_UTF8 flag, the byte strings  passed  as  patterns\n       and subjects are (by default) checked for validity on entry to the rel-\n       evant functions.\n...\n>If an invalid UTF-8 string is passed to PCRE, an error return is given.\n\n---------------------------------------------------------------------------\n\nby Dattaya at 2012-07-27T06:52:58Z\n\nForgot to mention that `Cc` property includes more characters than needed (`0009-000D` and `0085`) but I think control characters shouldn't appear in a form field anyway.\n\n---------------------------------------------------------------------------\n\nby stof at 2012-10-13T16:47:47Z\n\n@Dattaya ping","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/ef31be3bf6143856ebd1f79a7a1d98e993160523"},{"sha":"a973995aeffe5600ef85f4f4435b837cbe2a6f40","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"[Form] tweaked previous merge","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/a973995aeffe5600ef85f4f4435b837cbe2a6f40"},{"sha":"6581b64b261b3d65a7def031925e0d232b52a2cf","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"[Form] updated CHANGELOG","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/6581b64b261b3d65a7def031925e0d232b52a2cf"},{"sha":"9cbb34712c6bbabaaae58420f9b80b479a36fab0","author":{"email":"d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","name":"Fabien Potencier"},"message":"merged branch jfcixmedia/2.1 (PR #5838)\n\nThis PR was squashed before being merged into the master branch (closes #5838).\n\nCommits\n-------\n\n201f3e6 [Form] Fixed cannot unset string offsets in CsrfValidationListener\n\nDiscussion\n----------\n\n[Form] Fixed cannot unset string offsets in CsrfValidationListener\n\nBug fix: yes\nFeature addition: no\nBackwards compatibility break: no\nSymfony2 tests pass: yes\nFixes the following tickets: -\nTodo: -\nLicense of the code: MIT\nDocumentation PR: -\n\nA php fatal error is happening when someone rewrite the entire form data for an object with a single input.\n```\nFatal error: Cannot unset string offsets in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php on line 72\n```\n\nExample:\n\n```html\n<form action=\"/app_dev.php/post/create\" method=\"post\" >\n    <div id=\"posttype\">\n        <div>\n            <label for=\"posttype_name\" class=\"required\">Name</label>\n            <input type=\"text\" id=\"posttype_name\" name=\"posttype[name]\" required=\"required\" maxlength=\"255\" />\n        </div>\n        <div>\n            <label for=\"posttype_text\" class=\"required\">Text</label>\n            <textarea id=\"posttype_text\" name=\"posttype[text]\" required=\"required\"></textarea>\n        </div>\n        <input type=\"hidden\" id=\"posttype__token\" name=\"posttype[_token]\" value=\"83a1617c694fbdea43c2527f1a55c7419ce82a42\" /></div>\n        <p>\n            <button type=\"submit\">Create</button>\n        </p>\n</form>\n```\n\nIf someone alters the html to add a simple input at the bottom of the form like this one:\n```html\n<input type=\"text\" id=\"posttype\" name=\"posttype\" value=\"test123\" />\n```\n\nThe result will be a php fatal error.\n\n---------------------------------------------------------------------------\n\nby bschussek at 2012-10-26T09:49:05Z\n\nThank you for the pull request! Could you please reference the pull request in the test?\n\n```php\n// https://github.com/symfony/symfony/pull/5838\npublic function testStringFormData()\n{\n    ...\n```\n\n---------------------------------------------------------------------------\n\nby jfcixmedia at 2012-10-26T10:21:29Z\n\n@bschussek  Added, thanks.","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/9cbb34712c6bbabaaae58420f9b80b479a36fab0"},{"sha":"9286adc1faa00e7f3fb078039c28be5b0466d5cd","author":{"email":"de9b8d32d21ac4abee992cab0591365746b5103f@borreli.com","name":"Pascal Borreli"},"message":"Fixed typos","distinct":false,"url":"https://api.github.com/repos/symfony/form/commits/9286adc1faa00e7f3fb078039c28be5b0466d5cd"}]}