Skip to content

Latest commit

 

History

History
6 lines (3 loc) · 1.19 KB

dependencies.md

File metadata and controls

6 lines (3 loc) · 1.19 KB

Including Dependencies/Libraries in your Module

If your module uses a third party library (i.e. PHPMailer) that is available in the packagist.org repo, please use composer to include it. While this adds an extra step when submitting to the module repo, it greatly reduces the chances of conflicts between modules that can cause those modules and/or REDCap to crash. Composer's class loader automatically handles cases like calling require for the same class from multiple modules. While this does mean that modules could potentially end up using the version of a dependency from another module instead of their own, this is rarely an issue in practice (as evidenced by the WordPress community's reliance on composer for plugin & theme dependencies). Implementing a more complex dependency management system similar to Drupal's has been discussed, but such an effort is not likely since the current method is generally not an issue in practice.

If you would like to create a library to share between multiple modules, composer can also use github as a repo.