icicleio / concurrent

Concurrency component for Icicle
https://icicle.io
MIT License
172 stars 6 forks source link

Cannot declare class Composer\Autoload\ComposerStaticInit* #13

Open JurJean opened 8 years ago

JurJean commented 8 years ago

If I spawn a thread I receive the following error:

PHP Fatal error: Cannot declare class Composer\Autoload\ComposerStaticInit9ddc8272b94b84d953a76ade264999aa, because the name is already in use in /var/www/vendor/composer/autoload_static.php on line 7 PHP Stack trace: PHP 1. Icicle\Concurrent\Threading\Internal\Thread->run() /var/www/vendor/icicleio/concurrent/src/Threading/Internal/Thread.php:0 PHP 2. ComposerAutoloaderInit9ddc8272b94b84d953a76ade264999aa::getLoader() /var/www/vendor/icicleio/concurrent/src/Threading/Internal/Thread.php:71 PHP 3. require_once() /var/www/vendor/composer/autoload_real.php:28

I can imagine something has changed in the composer autoloader. I have the same results running the example.

JurJean commented 8 years ago

I can work around it by adding _define('HHVMVERSION', false); just before requiring of autoloader. This disables the static autoloader:

define('HHVM_VERSION', false); require 'vendor/autoload.php';