Skip to content

Commit

Permalink
Revert "Fix fatal 'class already declared' errors when using external…
Browse files Browse the repository at this point in the history
… standards"

This reverts commit 7130abe.
  • Loading branch information
gsherwood committed Mar 6, 2018
1 parent 7130abe commit ad9418a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ad9418a

Please sign in to comment.