Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
The best-recommended method for handling libraries required by the Contrib modules is through Composer. The Contrib modules includes a composer.libraries.json file that lists all the required libraries. To install and manage these libraries, you will merge the Contrib composer.libraries.json with your site's composer.json file.
When you are developing or maintaining a contrib project, you may find that the process of modifying code, pushing changes to Drupal.org, and then having Composer update your local environment to pull down what you pushed is tedious and time-consuming. In addition, Drupal.org does not allow history to be rewritten, but if you are developing something experimental you might not want to make your changes final until you've had a chance to test them.
Note: This guide manually sets up Solr in Docker for educational purposes. The recommended and easiest method according to the search_api_solr team is to use the pre-configured Solr solution in DDEV.
As of Drupal 8.8.0, Composer project templates (similar to drupal-composer/drupal-project) are now available as part of Drupal core. These project templates serve as a starting point for creating a Composer-managed Drupal site. Once you have selected a template project and created your own site, you will take ownership of your new project files. Thereafter, future updates will be done with Composer.