guzzle/guzzle — Issue #31: Symfony classloader not found in PHAR
Author: jhigman
Created: 2012-02-28 09:20:38+00:00
State: open

Loading the phar with "require_once 'guzzle.phar'" fails:

[Tue Feb 28 08:57:33 2012] [error] [client 127.0.0.1] PHP Warning: require_once(phar://Guzzle/vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php): failed to open stream: phar error: "vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php" is not a file in phar "Guzzle" in /home/jzh/git/kasabi-api/lib/guzzle/guzzle.phar on line 3

I think this may be the same as issue #19, but I've got the latest phar (as at 09:00 on 28th Feb 2012), and I see the same problem..

I'm on Ubuntu 11.10, with PHP 5.3.6 with phar enabled.

The top of the phar contains this (which looks like the updated version from issue #19):

require_once 'phar://Guzzle/vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php';

$classLoader = new Symfony\Component\ClassLoader\UniversalClassLoader();
$classLoader->registerNamespaces(array(
'Guzzle' => 'phar://Guzzle/src',
'Symfony\\Component\\Validator' => 'phar://Guzzle/vendor/symfony/validator',
'Symfony\\Component\\EventDispatcher' => 'phar://Guzzle/vendor/symfony/event-dispatcher',
'Doctrine' => 'phar://Guzzle/vendor/doctrine/common/lib',
'Monolog' => 'phar://Guzzle/vendor/monolog/monolog/src'
));
$classLoader->register();

Is there something else that I'm missing?

Cheers, Julian.