1

I have an independent, small PHP webapp I'm writing, and I've included the "oodle/krumo" package in the root "require" key of my composer.json file.

I also want my application to work well in conjunction with Drupal. Unfortunately, when Drupal hooks into it, if the "Devel" module is loaded, the Krumo classes are loaded as well and my custom app crashes.

I want to use Krumo by default, but have my app not load Krumo if it exists from Drupal (or elsewhere). Is there a way to make Composer only autoload the classes conditionally?

Offlein
  • 665
  • 6
  • 22
  • The crash should not happen in the first place. Have you investigated why it happens? If everything is done right, it should not matter where the classes are located when they get autoloaded, they are simply used. You should make sure there is no version conflict, though. – Sven Sep 30 '13 at 23:06
  • That's what I had though, too, Sven.. After posting this question I removed the Krumo line from my composer.json and ran `php composer.phar update`, thereby removing it from my project (..I think, right?). To check a version conflict, though, per your message, I re-added the line and ran composer update again. Now... no error. Maybe I had just needed to run composer update in the first place?? – Offlein Oct 02 '13 at 14:23

0 Answers0