mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
fix: unregister meta command custom autoloader when it is no longer needed. closes #915
This commit is contained in:
@@ -103,6 +103,8 @@ class MetaCommand extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->unregisterClassAutoloadExceptions();
|
||||||
|
|
||||||
$content = $this->view->make('meta', [
|
$content = $this->view->make('meta', [
|
||||||
'bindings' => $bindings,
|
'bindings' => $bindings,
|
||||||
'methods' => $this->methods,
|
'methods' => $this->methods,
|
||||||
@@ -159,4 +161,14 @@ class MetaCommand extends Command
|
|||||||
array('filename', 'F', InputOption::VALUE_OPTIONAL, 'The path to the meta file', $filename),
|
array('filename', 'F', InputOption::VALUE_OPTIONAL, 'The path to the meta file', $filename),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove our custom autoloader that we pushed onto the autoload stack
|
||||||
|
*/
|
||||||
|
private function unregisterClassAutoloadExceptions()
|
||||||
|
{
|
||||||
|
$autoloadFunctions = spl_autoload_functions();
|
||||||
|
$ourAutoloader = array_pop($autoloadFunctions);
|
||||||
|
spl_autoload_unregister($ourAutoloader);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user