This PR was merged into the 3.0 branch.
Controller arguments with default values should be default optional
This makes that for e.g:
function fooAction($foo = null, Request $request);
the `$foo` parameter is considered optional.
Before it was relying on `ReflectionParameter::isOptional()` only, which returns false if the parameter is not the last. This additionally checks for `isDefaultValueAvailable()`.
To me it's a bug that was hidden by the fact request attributes were automatically created for any parameter with a default value, that has been fixed in symfony.
8bd1da3 Controller arguments with default values should be optional