{"push_id":647620041,"size":7,"distinct_size":7,"ref":"refs/heads/5.0","head":"f2ceec956fd2bdb7f55f63b106d7ced243c7ee51","before":"e6254b21f8195f9eb45d23995f59d4623b2a88e1","commits":[{"sha":"a8bce612f719ccca4d79017f84651037a9e27ec6","author":{"email":"95fc1befa0cc68ea265157fa5ab94f5dc397a3dd@etutor.pl","name":"Paweł Kowalczyk"},"message":"Fix passing parameters to a controller method with default values for parameters\n\nFor a route that looks like this:\r\n\r\n  $app->get('/test/{param1}', 'TestController@test');\r\n\r\nand a TestController method with a default parameter:\r\n\r\n  public function test($param1 = 'default') {\r\n\r\nvisiting the URL \"/test/param1Value\" will cause Lumen to call the\r\nmethod with the following parameters:\r\n\r\n  TestController->test('default', 'param1Value');\r\n\r\nThe value in the URL will not replace $param1 default value, even\r\nthough the name in the route parameter is the same: {param1}.\r\n\r\nThe reason for that is that when this method is called:\r\n\r\n  protected function addDependencyForCallParameter(ReflectionParameter $parameter, array &$parameters, &$dependencies)\r\n\r\nthe $parameters array contains only numeric keys. So this condition\r\nin addDependencyForCallParameter() will never match:\r\n\r\nif (array_key_exists($parameter->name, $parameters))\r\n{\r\n    $dependencies[] = $parameters[$parameter->name];\r\n\r\n    unset($parameters[$parameter->name]);\r\n}\r\n\r\nRemoving array_values() call on the $parameters array in the callControllerAction() method seems to fix this issue.","distinct":true,"url":"https://api.github.com/repos/laravel/lumen-framework/commits/a8bce612f719ccca4d79017f84651037a9e27ec6"},{"sha":"3c62b9154897bb019eebdd09b4d2530d808806ae","author":{"email":"95fc1befa0cc68ea265157fa5ab94f5dc397a3dd@etutor.pl","name":"Paweł Kowalczyk"},"message":"Remove unnecessary array_values() calls","distinct":true,"url":"https://api.github.com/repos/laravel/lumen-framework/commits/3c62b9154897bb019eebdd09b4d2530d808806ae"},{"sha":"68f33da7832956e40a89e150ff7f2be1689ac6a0","author":{"email":"95fc1befa0cc68ea265157fa5ab94f5dc397a3dd@etutor.pl","name":"Paweł Kowalczyk"},"message":"Add unit tests for routes with default parameters","distinct":true,"url":"https://api.github.com/repos/laravel/lumen-framework/commits/68f33da7832956e40a89e150ff7f2be1689ac6a0"},{"sha":"8f9de0c2a2fd7c9dd2067b9d287e67cc9dafd338","author":{"email":"95fc1befa0cc68ea265157fa5ab94f5dc397a3dd@etutor.pl","name":"Paweł Kowalczyk"},"message":"Add missing curly braces to unit tests","distinct":true,"url":"https://api.github.com/repos/laravel/lumen-framework/commits/8f9de0c2a2fd7c9dd2067b9d287e67cc9dafd338"},{"sha":"984e156341ec97821ace70947dfb71acd2113b08","author":{"email":"679e7a11ea43197f95c0c1bd4fd328f07be17430@gmail.com","name":"Taylor Otwell"},"message":"Merge branch 'fix-default-parameter-values' of https://github.com/pako-pl/lumen-framework into pako-pl-fix-default-parameter-values","distinct":true,"url":"https://api.github.com/repos/laravel/lumen-framework/commits/984e156341ec97821ace70947dfb71acd2113b08"},{"sha":"6ec3d4f16ff24b55450e3e59f168db36f3fb9c32","author":{"email":"679e7a11ea43197f95c0c1bd4fd328f07be17430@gmail.com","name":"Taylor Otwell"},"message":"adding more tests","distinct":true,"url":"https://api.github.com/repos/laravel/lumen-framework/commits/6ec3d4f16ff24b55450e3e59f168db36f3fb9c32"},{"sha":"f2ceec956fd2bdb7f55f63b106d7ced243c7ee51","author":{"email":"679e7a11ea43197f95c0c1bd4fd328f07be17430@gmail.com","name":"Taylor Otwell"},"message":"Merge branch '5.0' of github.com:laravel/lumen-framework into 5.0","distinct":true,"url":"https://api.github.com/repos/laravel/lumen-framework/commits/f2ceec956fd2bdb7f55f63b106d7ced243c7ee51"}]}