Commit ff3c9303 authored by Bas de Nooijer's avatar Bas de Nooijer

Fixed phar stub to support namespace version of Solarium

parent efd164f6
...@@ -35,22 +35,20 @@ ...@@ -35,22 +35,20 @@
Phar::mapPhar("solarium.phar"); Phar::mapPhar("solarium.phar");
require_once 'phar://solarium.phar/Autoloader.php'; require_once 'phar://solarium.phar/Autoloader.php';
Solarium_Autoloader::register(); \Solarium\Autoloader::register();
if ('cli' === php_sapi_name() && basename(__FILE__) === basename($_SERVER['argv'][0]) && isset($_SERVER['argv'][1])) { if ('cli' === php_sapi_name() && basename(__FILE__) === basename($_SERVER['argv'][0]) && isset($_SERVER['argv'][1])) {
switch ($_SERVER['argv'][1]) { switch ($_SERVER['argv'][1]) {
case 'version': case 'version':
echo "Solarium version " . Solarium_Version::VERSION ."\n"; echo "Solarium version " . \Solarium\Client::VERSION ."\n";
break; break;
default: default:
echo "Unknown command '" . $_SERVER['argv'][1] . "' (Supported commands: version)\n"; echo "Unknown command '" . $_SERVER['argv'][1] . "' (Supported commands: version)\n";
} }
exit(0);
} }
__halt_compiler(); __HALT_COMPILER();
?> ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment