Problem/Motivation
Drupal Components are abstracted parts of Drupal core. They can be used independently in their own projects. In order to use the Drupal Components outside of a Drupal project however, you have to download Drupal 8, and then copy/paste the files of the Drupal Component into your own project. This can be tedious and there are easier ways of exposing the components to outside projects.
Proposed resolution
Mimic how Symfony exposes its components and allow projects outside of Drupal to use the Drupal components by...
- Introducing a composer.json for each component
- Creating a subpath split in a new repository for each component
- The subpath split needs to be automated as a post-commit hook or re-executed on a daily basis.
- Post the components on https://packagist.org
Remaining tasks
- Create a working patch
- Get it committed
- Create the new repositories
- #1713080: Allow code in Drupal\Component to be used by non-GPL projects
- #2176065: Introduce a composer.json for Drupal\Component\Utility
User interface changes
No UI changes.
API changes
Outside projects could then state that they require "drupal/plugin", and Composer would download the Plugin Component.