Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 8d84c79

Browse files
committed
Response to review suggestions.
1 parent 4b96db8 commit 8d84c79

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/ServiceManager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,9 @@ private function getFactory($name)
669669
$this->factories[$name] = $factory;
670670
}
671671
// PHP 5.6 fails on 'class::method' callables unless we explode them:
672-
if (is_string($factory) && strpos($factory, '::') !== false) {
672+
if (PHP_MAJOR_VERSION < 7
673+
&& is_string($factory) && strpos($factory, '::') !== false
674+
) {
673675
$factory = explode('::', $factory);
674676
}
675677
return $factory;

test/ServiceManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public static function sampleFactory()
273273
return new stdClass();
274274
}
275275

276-
public function testStaticCallable()
276+
public function testFactoryMayBeStaticMethodDescribedByCallableString()
277277
{
278278
$config = [
279279
'factories' => [

0 commit comments

Comments
 (0)