I'm using a vendor library that isn't managed through composer. I want to register the namespace for the library so that it will be discovered through PSR-4. I'm not sure how to go about doing this in D8 though. Can anyone point me at something?

1 Answer 1


The autoload is still done using Composer. To add an extra namespace you'll have to run a composer command to rebuild the autoload file.

See https://stackoverflow.com/a/31505011/113057 for how to add a namespace to composer.

The key is in composer dump-autoload


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.