Download the PHP package drupal/core-recipe-unpack without Composer

On this page you can find all versions of the php package drupal/core-recipe-unpack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package core-recipe-unpack

Drupal Recipe Unpack Plugin

Thanks for using this Drupal component.

You can participate in its development on Drupal.org, through our issue system: https://www.drupal.org/project/issues/drupal

You can get the full Drupal repo here: https://www.drupal.org/project/drupal/git-instructions

You can browse the full Drupal repo here: https://git.drupalcode.org/project/drupal

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

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?

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

drupal:recipe-unpack

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

Unpack all recipes that are required in your project.

Options

This command doesn't take additional options.

Automatic Unpacking

After composer require

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

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

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

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

Configuration

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

Available Options

Option Type Default Description
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

  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

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

  2. Disabled Automatic Unpacking: If on-require is set to false in your extra.drupal-recipe-unpack configuration

  3. Development Dependencies: Recipes in the require-dev section are not automatically unpacked

    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

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

Example Usage Scenarios

Basic Recipe Installation

The result:

Manual Recipe Unpacking

Working with Dev Recipes

Creating a New Project with Recipes

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

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

Recipe Not Unpacking

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

All versions of core-recipe-unpack with dependencies

PHP Build Version
Package Version
Requires composer-plugin-api Version ^2
php Version >=8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package drupal/core-recipe-unpack contains the following files

Loading the files please wait ....