Skip to content

Commit

Permalink
[ProxyManager] fix closure binding
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 15, 2019
1 parent 6a13826 commit 8ca88d3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -113,7 +113,7 @@ public function getProxyCode(Definition $definition)
}

if (version_compare(self::getProxyManagerVersion(), '2.5', '<')) {
$code = str_replace(' \Closure::bind(function ', ' \Closure::bind(static function ', $code);
$code = preg_replace(' \Closure::bind(function ((?:& )?\(\$instance(?:, \$value)?\))', ' \Closure::bind(static function \1', $code);
}

return $code;
Expand Down

0 comments on commit 8ca88d3

Please sign in to comment.