How do you get around the issue of composer creating a 'ComposerClassLoader' for each library created with composer? Seems to break saying class already loaded.

Kim

Comments

boombatower’s picture

This is part of the larger issue that the way composer works out of the box (or the way we try to use it with drupal) is fundamentally broken. There is an issue in libraries project queue with discussion on how to fix things properly.

I am not sure if there is a simple workaround we can introduce to make this better.

RobLoach’s picture

Status: Active » Fixed

Composer protects against this issue by appending a suffix to the ComposerAutoloaderInit class during generation. PHP's autoloader loads the first Composer ClassLoader class it finds so it doesn't load the file twice.

_wdm_’s picture

Needing something that would work for D7 I have created the following module:
http://drupal.org/project/composer_vendor

kim.pepper’s picture

According to @msonnabaum the latest versions don't have colliding ComposerClassLoaders. So this may be resolved.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.