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
Increase support for compiling FactoryDefinitions and Closures #649
Conversation
$expression = $this->compileValue($definition->getExpression()); | ||
$code = 'return \DI\Definition\StringDefinition::resolveExpression(' . $entryName . ', ' . $expression . ', $this->delegateContainer);'; | ||
$code = 'return \DI\Definition\StringDefinition::resolveExpression(' . $compiledEntryName . ', ' . $expression . ', $this->delegateContainer);'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change affecting logic? (trying to assess whether there's a need to understand something behind this or if it's just a cosmetic change)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the original code "overwrote" the $entryName
variable.
An entry named foo
, became 'foo'
(difficult to notice, but true), that is why I decided to use a separate variable name.
Closing per #648 (comment) |
To resolve #648