{"push_id":623251453,"size":103,"distinct_size":1,"ref":"refs/heads/master","head":"6a0b617c3dba22c66d1668282e69236533c67733","before":"5d7f9090bbd2e08200e4dc570618b34db19d746e","commits":[{"sha":"5d96f4dbd73efcc15205472f2871c903a6b37e5a","author":{"email":"a3f04bc6111215858e2d432fa75001ee5b3358ca@sensiolabs.com","name":"Hugo Hamon"},"message":"[FrameworkBundle] added a protected shortcut getParameter() method in the base Controller class.","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/5d96f4dbd73efcc15205472f2871c903a6b37e5a"},{"sha":"94d3876c4c0d27e0c845266fb0aaa7c96e927eb3","author":{"email":"cb91a13d848ade85b60871dae09fcb6e3240bcf7@commentcamarche.net","name":"Xavier Leune"},"message":"FIX #13919 added TranslationsCacheWarmer to generate catalogues at warmup","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/94d3876c4c0d27e0c845266fb0aaa7c96e927eb3"},{"sha":"03efce1b568379eac21d880e427090e43035f505","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[Form] Refactored choice lists to support dynamic label, value, index and attribute generation","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/03efce1b568379eac21d880e427090e43035f505"},{"sha":"3846b3750ad60e02e55f4dc7b91d06366a1695f8","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[DoctrineBridge] Fixed: don't cache choice lists if query builders are constructed dynamically","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/3846b3750ad60e02e55f4dc7b91d06366a1695f8"},{"sha":"e6739bf05e07ebd5d0ba22f76bb7247af69d62de","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[DoctrineBridge] DoctrineType now respects the \"query_builder\" option when caching the choice loader","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/e6739bf05e07ebd5d0ba22f76bb7247af69d62de"},{"sha":"a289deb97358cf7295bbd1410d954f2d66c5346e","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[Form] Fixed new ArrayChoiceList to compare choices by their values, if enabled","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/a289deb97358cf7295bbd1410d954f2d66c5346e"},{"sha":"26eba769b5a1f9a13df71675f80f0269d89b1c2b","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[Form] Fixed regression: Choices are compared by their values if a value callback is given","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/26eba769b5a1f9a13df71675f80f0269d89b1c2b"},{"sha":"52885f0ade390e2a657f3c5707b5aa467dcf4c71","author":{"email":"fe14975b02825621d741133a720055170ebcf991@users.noreply.github.com","name":"Joseph Bielawski"},"message":"[DoctrineBridge] Add missing variable declaration in testcase","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/52885f0ade390e2a657f3c5707b5aa467dcf4c71"},{"sha":"13ec9ffafc57a6d715bd8b638c51f58f64bbbe76","author":{"email":"fe14975b02825621d741133a720055170ebcf991@gmail.com","name":"stloyd"},"message":"Remove dead code from FrameworkExtension & LogoutUrlHelper","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/13ec9ffafc57a6d715bd8b638c51f58f64bbbe76"},{"sha":"64d6e76e42c356a2e129c6bd5b1f0cdd18e7880e","author":{"email":"8d3fadd4fad95f65a95a07af54a8b1c515d4d5e3@gmail.com","name":"Nicolas Grekas"},"message":"[VarDumper] Add casters for Reflection* classes","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/64d6e76e42c356a2e129c6bd5b1f0cdd18e7880e"},{"sha":"d6179c830be7f2245ad56b6a800a33275a802689","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[Form] Fixed PR comments","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/d6179c830be7f2245ad56b6a800a33275a802689"},{"sha":"1d89922782922fe3bcacb09f91e8c3c992d29d3f","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[Form] Fixed tests using legacy functionality","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/1d89922782922fe3bcacb09f91e8c3c992d29d3f"},{"sha":"7e0960d7168e845dc5d0ad30296e27397fce44c1","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[Form] Fixed failing layout tests","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/7e0960d7168e845dc5d0ad30296e27397fce44c1"},{"sha":"94d18e961cc72008adf97c0557856da63760688d","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[Form] Fixed CS","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/94d18e961cc72008adf97c0557856da63760688d"},{"sha":"776796435e9f09cdb1b3afd71df2bff9b89d0c36","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"feature #14050 [Form] Refactored choice lists to support dynamic label, value, index and attribute generation (webmozart)\n\nThis PR was merged into the 2.7 branch.\n\nDiscussion\n----------\n\n[Form] Refactored choice lists to support dynamic label, value, index and attribute generation\n\nThis is a rebase of #12148 on the 2.7 branch.\n\n| Q             | A\n| ------------- | ---\n| Bug fix?      | no\n| New feature?  | yes\n| BC breaks?    | yes\n| Deprecations? | yes\n| Tests pass?   | yes\n| Fixed tickets | #4067, #5494, #3836, #8658, #12148\n| License       | MIT\n| Doc PR        | TODO\n\nI implemented the additional options \"choice_label\", \"choice_name\", \"choice_value\", \"choice_attr\", \"group_by\" and \"choices_as_values\" for ChoiceType. Additionally the \"preferred_choices\" option was updated to accept callables and property paths.\n\nThe \"choices_as_values\" option will be removed in Symfony 3.0, where the choices will be passed in the values of the \"choices\" option by default. The reason for that is that, right now, choices are limited to strings and integers (i.e. valid array keys). When we flip the array, we remove that limitation. Since choice labels are always strings, we can also always use them as array keys:\n\n```php\n// Not possible currently, but possible with \"flip_choices\"\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => true,\n        'No' => false,\n        'Maybe' => null,\n    ),\n    'choices_as_values' => true,\n));\n```\n\nAll the features described here obviously also apply to subtypes of \"choice\", such as \"entity\".\n\n**choice_label**\n\nReturns the label for each choice. Can be a callable (which receives the choice as first and the key of the \"choices\" array as second argument) or a property path.\n\nIf `null`, the keys of the \"choices\" array are used as labels.\n\n```php\n// callable\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'yes' => true,\n        'no' => false,\n        'maybe' => null,\n    ),\n    'choices_as_values' => true,\n    'choice_label' => function ($choice, $key) {\n        return 'form.choice.'.$key;\n    },\n));\n\n// property path\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        Status::getInstance(Status::YES),\n        Status::getInstance(Status::NO),\n        Status::getInstance(Status::MAYBE),\n    ),\n    'choices_as_values' => true,\n    'choice_label' => 'displayName',\n));\n```\n\n**choice_name**\n\nReturns the form name for each choice. That name is used as name of the checkbox/radio form for this choice. It is also used as index of the choice views in the template. Can be a callable (like for \"choice_label\") or a property path.\n\nThe generated names must be valid form names, i.e. contain alpha-numeric symbols, underscores, hyphens and colons only. They must start with an alpha-numeric symbol or an underscore.\n\nIf `null`, an incrementing integer is used as name.\n\n```php\n// callable\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => true,\n        'No' => false,\n        'Maybe' => null,\n    ),\n    'choices_as_values' => true,\n    'choice_name' => function ($choice, $key) {\n        // use the labels as names\n        return strtolower($key);\n    },\n));\n\n// property path\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => Status::getInstance(Status::YES),\n        'No' => Status::getInstance(Status::NO),\n        'Maybe' => Status::getInstance(Status::MAYBE),\n    ),\n    'choices_as_values' => true,\n    'choice_name' => 'value',\n));\n```\n\n**choice_value**\n\nReturns the string value for each choice. This value is displayed in the \"value\" attributes and submitted in the POST/PUT requests. Can be a callable (like for \"choice_label\") or a property path.\n\nIf `null`, an incrementing integer is used as value.\n\n```php\n// callable\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => true,\n        'No' => false,\n        'Maybe' => null,\n    ),\n    'choices_as_values' => true,\n    'choice_value' => function ($choice, $key) {\n        if (null === $choice) {\n            return 'null';\n        }\n\n        if (true === $choice) {\n            return 'true';\n        }\n\n        return 'false';\n    },\n));\n\n// property path\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => Status::getInstance(Status::YES),\n        'No' => Status::getInstance(Status::NO),\n        'Maybe' => Status::getInstance(Status::MAYBE),\n    ),\n    'choices_as_values' => true,\n    'choice_value' => 'value',\n));\n```\n\n**choice_attr**\n\nReturns the additional HTML attributes for choices. Can be an array, a callable (like for \"choice_label\") or a property path.\nIf an array, the key of the \"choices\" array must be used as keys.\n\n```php\n// array\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => true,\n        'No' => false,\n        'Maybe' => null,\n    ),\n    'choices_as_values' => true,\n    'choice_attr' => array(\n        'Maybe' => array('class' => 'greyed-out'),\n    ),\n));\n\n// callable\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => true,\n        'No' => false,\n        'Maybe' => null,\n    ),\n    'choices_as_values' => true,\n    'choice_attr' => function ($choice, $key) {\n        if (null === $choice) {\n            return array('class' => 'greyed-out');\n        }\n    },\n));\n\n// property path\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => Status::getInstance(Status::YES),\n        'No' => Status::getInstance(Status::NO),\n        'Maybe' => Status::getInstance(Status::MAYBE),\n    ),\n    'choices_as_values' => true,\n    'choice_value' => 'htmlAttributes',\n));\n```\n\n**group_by**\n\nReturns the grouping used for the choices. Can be an array/Traversable, a callable (like for \"choice_label\") or a property path.\n\nThe return values of the callable/property path are used as group labels. If `null` is returned, a choice is not grouped.\n\nIf `null`, the structure of the \"choices\" array is used to construct the groups.\n\n```php\n// default\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Decided' => array(\n            'Yes' => true,\n            'No' => false,\n        ),\n        'Undecided' => array(\n            'Maybe' => null,\n        ),\n    ),\n    'choices_as_values' => true,\n));\n\n// callable\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => true,\n        'No' => false,\n        'Maybe' => null,\n    ),\n    'choices_as_values' => true,\n    'group_by' => function ($choice, $key) {\n        if (null === $choice) {\n            return 'Undecided';\n        }\n\n        return 'Decided';\n    },\n));\n\n// property path\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => Status::getInstance(Status::YES),\n        'No' => Status::getInstance(Status::NO),\n        'Maybe' => Status::getInstance(Status::MAYBE),\n    ),\n    'choices_as_values' => true,\n    'group_by' => 'type',\n));\n```\n\n**preferred_choices**\n\nReturns the preferred choices. Can be an array/Traversable, a callable (like for \"choice_label\") or a property path.\n\n```php\n// array\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => true,\n        'No' => false,\n        'Maybe' => null,\n    ),\n    'choices_as_values' => true,\n    'preferred_choices' => array(true),\n));\n\n// callable\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => true,\n        'No' => false,\n        'Maybe' => null,\n    ),\n    'choices_as_values' => true,\n    'preferred_choices' => function ($choice, $key) {\n        return true === $choice;\n    },\n));\n\n// property path\n$builder->add('attending', 'choice', array(\n    'choices' => array(\n        'Yes' => Status::getInstance(Status::YES),\n        'No' => Status::getInstance(Status::NO),\n        'Maybe' => Status::getInstance(Status::MAYBE),\n    ),\n    'choices_as_values' => true,\n    'preferred_choices' => 'preferred',\n));\n```\n\n**Technical Changes**\n\nTo properly implement all this, the old `ChoiceListInterface` class was deprecated and replaced by a new, slimmer one. The creation of choice views is now separated from choice lists. Hence a lot of logic is not executed anymore when processing (but not displaying) a form.\n\nInternally, a `ChoiceListFactoryInterface` implementation is used to construct choice lists and choice views. Two decorators exist for this class:\n\n* `CachingFactoryDecorator`: caches choice lists/views so that multiple fields displaying the same choices (e.g. in collection fields) use the same choice list/view\n* `PropertyAccessDecorator`: adds support for property paths to a factory\n\n**BC Breaks**\n\nThe option \"choice_list\" of ChoiceType now contains a `Symfony\\Component\\Form\\ChoiceList\\ChoiceListInterface` instance, which is a super-type of the deprecated `ChoiceListInterface`.\n\n**Todos**\n\n- [ ] Adapt CHANGELOGs\n- [ ] Adapt UPGRADE files\n- [ ] symfony/symfony-docs issue/PR\n\nCommits\n-------\n\n94d18e9 [Form] Fixed CS\n7e0960d [Form] Fixed failing layout tests\n1d89922 [Form] Fixed tests using legacy functionality\nd6179c8 [Form] Fixed PR comments\n26eba76 [Form] Fixed regression: Choices are compared by their values if a value callback is given\na289deb [Form] Fixed new ArrayChoiceList to compare choices by their values, if enabled\ne6739bf [DoctrineBridge] DoctrineType now respects the \"query_builder\" option when caching the choice loader\n3846b37 [DoctrineBridge] Fixed: don't cache choice lists if query builders are constructed dynamically\n03efce1 [Form] Refactored choice lists to support dynamic label, value, index and attribute generation","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/776796435e9f09cdb1b3afd71df2bff9b89d0c36"},{"sha":"2b5efbbd35311c98b649c7c3e05314e893c6d374","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[FrameworkBundle] Pushed symfony/form dependency from ~2.6 to to ~2.7","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/2b5efbbd35311c98b649c7c3e05314e893c6d374"},{"sha":"7523f685ebf7c51941d547df213068cc08db97e4","author":{"email":"4def7ce8b2e01dbc3c2e281d47462ad2a2924cf7@gmail.com","name":"Bernhard Schussek"},"message":"[TwigBridge] Pushed symfony/form dependency from ~2.6 to ~2.7","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/7523f685ebf7c51941d547df213068cc08db97e4"},{"sha":"5188cfecc58c78bda18cd7081ea86ea69f0d596c","author":{"email":"8d3fadd4fad95f65a95a07af54a8b1c515d4d5e3@gmail.com","name":"Nicolas Grekas"},"message":"feature #14080 [VarDumper] Add casters for Reflection* classes (nicolas-grekas)\n\nThis PR was merged into the 2.7 branch.\n\nDiscussion\n----------\n\n[VarDumper] Add casters for Reflection* classes\n\n| Q             | A\n| ------------- | ---\n| Bug fix?      | no\n| New feature?  | yes\n| BC breaks?    | no\n| Deprecations? | yes\n| Tests pass?   | yes\n| Fixed tickets | -\n| License       | MIT\n| Doc PR        | -\n\nWill need a rebase on top of #14079 and #14077 to be mergeable/green.\n\nCommits\n-------\n\n64d6e76 [VarDumper] Add casters for Reflection* classes","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/5188cfecc58c78bda18cd7081ea86ea69f0d596c"},{"sha":"17d265a5266eba1938f6c0bd6c15271bbaadc5b4","author":{"email":"8354336224c63279aadd00a9621757ef4fdf31fc@saintesteben.me","name":"Diego Saint Esteben"},"message":"Added missing changelog entry","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/17d265a5266eba1938f6c0bd6c15271bbaadc5b4"},{"sha":"195c57e1f50765aff33137689b16e126a689056a","author":{"email":"8d3fadd4fad95f65a95a07af54a8b1c515d4d5e3@gmail.com","name":"Nicolas Grekas"},"message":"Safe escaping of fragments for eval()","distinct":false,"url":"https://api.github.com/repos/symfony/symfony/commits/195c57e1f50765aff33137689b16e126a689056a"}]}