Skip to content

Commit

Permalink
Merge pull request #100 from internalsystemerror/hotfix/clean-dead-code
Browse files Browse the repository at this point in the history
Remove check for PHP < 7 since support was dropped
  • Loading branch information
Ocramius authored Aug 3, 2021
2 parents 9a6a6ed + 5133dc5 commit a536d4d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use function array_key_exists;
use function array_keys;
use function class_exists;
use function explode;
use function get_class;
use function gettype;
use function in_array;
Expand All @@ -33,11 +32,9 @@
use function spl_autoload_register;
use function spl_object_hash;
use function sprintf;
use function strpos;
use function trigger_error;

use const E_USER_DEPRECATED;
use const PHP_MAJOR_VERSION;

/**
* Service Manager.
Expand Down Expand Up @@ -549,13 +546,6 @@ private function getFactory($name)
if ($lazyLoaded) {
$this->factories[$name] = $factory;
}
// PHP 5.6 fails on 'class::method' callables unless we explode them:
if (
PHP_MAJOR_VERSION < 7
&& is_string($factory) && strpos($factory, '::') !== false
) {
$factory = explode('::', $factory);
}
return $factory;
}

Expand Down

0 comments on commit a536d4d

Please sign in to comment.