PHPackages                             drupal/core-recipe-unpack - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. drupal/core-recipe-unpack

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

drupal/core-recipe-unpack
=========================

A Composer project unpacker for Drupal recipes.

11.3.5(6mo ago)2281.2k—2.6%17GPL-2.0-or-laterPHPPHP &gt;=8.3

Since May 8Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/drupal/core-recipe-unpack)[ Packagist](https://packagist.org/packages/drupal/core-recipe-unpack)[ Docs](https://www.drupal.org/project/drupal)[ RSS](/packages/drupal-core-recipe-unpack/feed)WikiDiscussions 11.x Synced 1mo ago

READMEChangelogDependencies (4)Versions (29)Used By (17)

Drupal Recipe Unpack Plugin
===========================

[](#drupal-recipe-unpack-plugin)

Thanks for using this Drupal component.

You can participate in its development on Drupal.org, through our issue system:

You can get the full Drupal repo here:

You can browse the full Drupal repo here:

Overview
--------

[](#overview)

The Recipe Unpacking system is a Composer plugin that manages "drupal-recipe" packages. Recipes are special Composer packages designed to bootstrap Drupal projects with necessary dependencies. When a recipe is installed, this plugin "unpacks" it by moving the recipe's dependencies directly into your project's root `composer.json`, and removes the recipe as a project dependency.

Key Concepts
------------

[](#key-concepts)

### What is a Recipe?

[](#what-is-a-recipe)

A recipe is a Composer package with type `drupal-recipe` that contains a curated set of dependencies, configuration and content but no code of its own. Recipes are meant to be "unpacked" and "applied" rather than remain as runtime dependencies.

### What is Unpacking?

[](#what-is-unpacking)

Unpacking is the process where:

1. A recipe's dependencies are added to your project's root `composer.json`
2. The recipe itself is removed from your dependencies
3. The `composer.lock` and vendor installation files are updated accordingly
4. The recipe will remain in the project's recipes folder so it can be applied

Commands
--------

[](#commands)

### `drupal:recipe-unpack`

[](#drupalrecipe-unpack)

Unpack a recipe package that's already required in your project.

```
composer drupal:recipe-unpack drupal/example_recipe
```

Unpack all recipes that are required in your project.

```
composer drupal:recipe-unpack
```

#### Options

[](#options)

This command doesn't take additional options.

Automatic Unpacking
-------------------

[](#automatic-unpacking)

### After `composer require`

[](#after-composer-require)

By default, recipes are automatically unpacked after running `composer require`for a recipe package:

```
composer require drupal/example_recipe
```

This will:

1. Download the recipe and its dependencies
2. Add the recipe's dependencies to your project's root `composer.json`
3. Remove the recipe itself from your dependencies
4. Update your `composer.lock` file

### After `composer create-project`

[](#after-composer-create-project)

Recipes are always automatically unpacked when creating a new project from a template that requires this plugin:

```
composer create-project drupal/recommended-project my-project
```

Any recipes included in the project template will be unpacked during installation, as long as the plugin is enabled.

Configuration
-------------

[](#configuration)

Configuration options are set in the `extra` section of your `composer.json`file:

```
{
  "extra": {
    "drupal-recipe-unpack": {
      "ignore": ["drupal/recipe_to_ignore"],
      "on-require": true
    }
  }
}
```

### Available Options

[](#available-options)

OptionTypeDefaultDescription`ignore`array`[]`List of recipe packages to exclude from unpacking`on-require`boolean`true`Automatically unpack recipes when required by `composer require`How Recipe Unpacking Works
--------------------------

[](#how-recipe-unpacking-works)

1. The system identifies packages of type `drupal-recipe` during installation
2. For each recipe not in the ignore list, it:
    - Extracts its dependencies
    - Adds them to the root `composer.json`
    - Recursively processes any dependencies that are also recipes
    - Removes the recipe and any dependencies that are also recipes from the root `composer.json`
3. Updates all necessary Composer files:
    - `composer.json`
    - `composer.lock`
    - `vendor/composer/installed.json`
    - `vendor/composer/installed.php`

Cases Where Recipes Will Not Be Unpacked
----------------------------------------

[](#cases-where-recipes-will-not-be-unpacked)

Recipes will **not** be unpacked in the following scenarios:

1. **Explicit Ignore List**: If the recipe is listed in the `ignore` array in your `extra.drupal-recipe-unpack` configuration

    ```
    {
      "extra": {
        "drupal-recipe-unpack": {
          "ignore": ["drupal/recipe_name"]
        }
      }
    }
    ```
2. **Disabled Automatic Unpacking**: If `on-require` is set to `false` in your `extra.drupal-recipe-unpack` configuration

    ```
    {
      "extra": {
        "drupal-recipe-unpack": {
          "on-require": false
        }
      }
    }
    ```
3. **Development Dependencies**: Recipes in the `require-dev` section are not automatically unpacked

    ```
    {
      "require-dev": {
        "drupal/dev_recipe": "^1.0"
      }
    }
    ```

    You will need to manually unpack these using the `drupal:recipe-unpack`command if desired.
4. **With `--no-install` Option**: When using `composer require` with the `--no-install` flag

    ```
    composer require drupal/example_recipe --no-install
    ```

    In this case, you'll need to run `composer install` afterward and then manually unpack using the `drupal:recipe-unpack` command.

Example Usage Scenarios
-----------------------

[](#example-usage-scenarios)

### Basic Recipe Installation

[](#basic-recipe-installation)

```
# This will automatically install and unpack the recipe
composer require drupal/example_recipe
```

The result:

- Dependencies from `drupal/example_recipe` are added to your root `composer.json`
- `drupal/example_recipe` itself is removed from your dependencies
- You'll see a message: "drupal/example\_recipe unpacked successfully."
- The recipe files will be present in the drupal-recipe installer path

### Manual Recipe Unpacking

[](#manual-recipe-unpacking)

```
# First require the recipe without unpacking
composer require drupal/example_recipe --no-install
composer install

# Then manually unpack it
composer drupal:recipe-unpack drupal/example_recipe
```

### Working with Dev Recipes

[](#working-with-dev-recipes)

```
# This won't automatically unpack (dev dependencies aren't auto-unpacked)
composer require --dev drupal/dev_recipe

# You'll need to manually unpack if desired (with confirmation prompt)
composer drupal:recipe-unpack drupal/dev_recipe
```

### Creating a New Project with Recipes

[](#creating-a-new-project-with-recipes)

```
composer create-project drupal/recipe-based-project my-project
```

Any recipes included in the project template will be automatically unpacked during installation.

Best Practices
--------------

[](#best-practices)

1. **Review Recipe Contents**: Before requiring a recipe, review its dependencies to understand what will be added to your project.
2. **Consider Versioning**: When a recipe is unpacked, its version constraints for dependencies are merged with your existing constraints, which may result in complex version requirements.
3. **Dev Dependencies**: Be cautious when unpacking development recipes, as their dependencies will be moved to the main `require` section, not `require-dev`.
4. **Custom Recipes**: When creating custom recipes, ensure they have the correct package type `drupal-recipe` and include appropriate dependencies.

Troubleshooting
---------------

[](#troubleshooting)

### Recipe Not Unpacking

[](#recipe-not-unpacking)

- Check if the package type is `drupal-recipe`
- Verify it's not in your ignore list
- Confirm it's not in `require-dev` (which requires manual unpacking)
- Ensure you haven't used the `--no-install` flag without following up with installation and manual unpacking

### Unpacking Errors

[](#unpacking-errors)

If you encounter issues during unpacking:

1. Check Composer's error output for specific issues and run commands with the `--verbose` flag
2. Verify that version constraints between your existing dependencies and the recipe's dependencies are compatible
3. For manual troubleshooting, consider temporarily setting `on-require` to `false` and unpacking recipes one by one

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance77

Regular maintenance activity

Popularity39

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Recently: every ~18 days

Total

28

Last Release

131d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/27288432?v=4)[Drupal Infrastructure](/maintainers/Drupal-Infrastructure)[@Drupal-Infrastructure](https://github.com/Drupal-Infrastructure)

---

Top Contributors

[![larowlan](https://avatars.githubusercontent.com/u/555254?v=4)](https://github.com/larowlan "larowlan (2 commits)")[![alexpott](https://avatars.githubusercontent.com/u/769634?v=4)](https://github.com/alexpott "alexpott (1 commits)")

---

Tags

drupal

### Embed Badge

![Health badge](/badges/drupal-core-recipe-unpack/health.svg)

```
[![Health](https://phpackages.com/badges/drupal-core-recipe-unpack/health.svg)](https://phpackages.com/packages/drupal-core-recipe-unpack)
```

###  Alternatives

[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[lullabot/amp

A set of useful classes and utilities to convert html to AMP html (See https://www.ampproject.org/)

3802.9M10](/packages/lullabot-amp)[aleksip/plugin-data-transform

Data Transform Plugin for Pattern Lab PHP

34897.4k3](/packages/aleksip-plugin-data-transform)[acquia/drupal-recommended-settings

The composer plugin for adding drupal-recommended-settings for Acquia Cloud.

101.1M4](/packages/acquia-drupal-recommended-settings)[tripal/tripal

Tripal is a toolkit to facilitate construction of online genomic, genetic (and other biological) websites.

709.9k9](/packages/tripal-tripal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
