From ad9418ae643bbba3b517821f793230c1589c72b0 Mon Sep 17 00:00:00 2001 From: Greg Sherwood Date: Wed, 7 Mar 2018 08:31:08 +1100 Subject: [PATCH] Revert "Fix fatal 'class already declared' errors when using external standards" This reverts commit 7130abe0d76907cd1da7a645e3879010d08e39ef. --- autoload.php | 4 ++-- src/Runner.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload.php b/autoload.php index c0d118fc62..e4d21ace08 100644 --- a/autoload.php +++ b/autoload.php @@ -76,7 +76,7 @@ public static function load($class) if (strpos(__DIR__, 'phar://') !== 0 && file_exists(__DIR__.'/../../autoload.php') === true ) { - self::$composerAutoloader = include_once __DIR__.'/../../autoload.php'; + self::$composerAutoloader = include __DIR__.'/../../autoload.php'; if (self::$composerAutoloader instanceof \Composer\Autoload\ClassLoader) { self::$composerAutoloader->unregister(); self::$composerAutoloader->register(); @@ -164,7 +164,7 @@ public static function loadFile($path) $interfaces = get_declared_interfaces(); $traits = get_declared_traits(); - include_once $path; + include $path; $className = null; $newClasses = array_reverse(array_diff(get_declared_classes(), $classes)); diff --git a/src/Runner.php b/src/Runner.php index 1f2e58ea9b..46e504875d 100644 --- a/src/Runner.php +++ b/src/Runner.php @@ -313,7 +313,7 @@ private function run() // Include bootstrap files. foreach ($this->config->bootstrap as $bootstrap) { - include_once $bootstrap; + include $bootstrap; } if ($this->config->stdin === true) {