-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
remove $self = $this; use ($self) in 5.4 #6
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -605,12 +605,10 @@ public function create($name) | |
*/ | ||
private function createDelegatorCallback($delegatorFactory, $rName, $cName, $creationCallback) | ||
{ | ||
$serviceManager = $this; | ||
|
||
return function () use ($serviceManager, $delegatorFactory, $rName, $cName, $creationCallback) { | ||
return function () use ($delegatorFactory, $rName, $cName, $creationCallback) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Careful with the delegators: they're messy ;-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made a rollback change on samsonasik@68a626a , and in my local the test is pass now. |
||
return $delegatorFactory instanceof DelegatorFactoryInterface | ||
? $delegatorFactory->createDelegatorWithName($serviceManager, $cName, $rName, $creationCallback) | ||
: $delegatorFactory($serviceManager, $cName, $rName, $creationCallback); | ||
? $delegatorFactory->createDelegatorWithName($this, $cName, $rName, $creationCallback) | ||
: $delegatorFactory($this, $cName, $rName, $creationCallback); | ||
}; | ||
} | ||
|
||
|
@@ -1144,10 +1142,9 @@ protected function checkNestedContextStop($force = false) | |
*/ | ||
protected function createDelegatorFromFactory($canonicalName, $requestedName) | ||
{ | ||
$serviceManager = $this; | ||
$delegatorsCount = count($this->delegators[$canonicalName]); | ||
$creationCallback = function () use ($serviceManager, $requestedName, $canonicalName) { | ||
return $serviceManager->doCreate($requestedName, $canonicalName); | ||
$creationCallback = function () use ($requestedName, $canonicalName) { | ||
return $this->doCreate($requestedName, $canonicalName); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems it cause the error ..., i will try to rollback it. |
||
}; | ||
|
||
for ($i = 0; $i < $delegatorsCount; $i += 1) { | ||
|
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.
it makes test error,
maybe rollback it ?
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.
oh, its strange, seems not related with it...