8000 [DI] Only rebuild autowiring cache when actually needed by weaverryan · Pull Request #18144 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DI] Only rebuild autowiring cache when actually needed #18144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to 8000
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Trying to get more fine-grained over the actual information we need
  • Loading branch information
weaverryan committed Apr 1, 2016
commit 56b4bf9f1f11f2ab45fb4b6c0b4852fa2bd1b7fb
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,18 @@ static private function getResourceMetadataForMethod(\ReflectionMethod $method)
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$methodArgumentsMetadata = array();
foreach ($method->getParameters() as $parameter) {
$methodArgumentsMetadata[] = (string) $parameter;
try {
$class = $parameter->getClass();
} catch (\ReflectionException $e) {
// type-hint is against a non-existent class
$class = false;
}

$methodArgumentsMetadata[] = array(
'class' => $class,
'isOptional' => $parameter->isOptional(),
'defaultValue' => $parameter->isOptional() ? $parameter->getDefaultValue() : null,
);
}

return $methodArgumentsMetadata;
Expand Down
0