Skip to content
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

Closed
wants to merge 9 commits into from

Conversation

holtkamp
Copy link
Contributor

@holtkamp holtkamp commented Mar 9, 2019

To resolve #648

$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);';
Copy link
Member

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)

Copy link
Contributor Author

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.

src/Compiler/Compiler.php Show resolved Hide resolved
src/Compiler/Compiler.php Show resolved Hide resolved
@mnapoli
Copy link
Member

mnapoli commented Apr 2, 2019

Closing per #648 (comment)

@mnapoli mnapoli closed this Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error compiling factory definitions since 6.0.7
2 participants