Problem/Motivation

Now that recipes are in core, we need to update the drupal/recommended-project composer template so users can require recipes using composer.

Proposed resolution

1. Add a drupal-recipe installer type.

We are going to need this until https://github.com/composer/installers/pull/534 is merged. It doesn't look like a very active project.

Its been merged and a new release has been cut.

2. Add an installer-path for drupal-recipe

Remaining tasks

Merge request added.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Issue fork drupal-3447886

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

thejimbirch created an issue. See original summary.

thejimbirch’s picture

Assigned: Unassigned » thejimbirch

thejimbirch changed the visibility of the branch 3447886-add-support-for to hidden.

thejimbirch’s picture

Assigned: thejimbirch » Unassigned
Issue summary: View changes
Status: Active » Needs review

Merge request added.

jnicola’s picture

Looks good to me! Could you elaborate on some ways to test?

sime’s picture

Status: Needs review » Needs work

I'm unable to make this work just by setting "installer-types": ["drupal-recipe"],. Does it need oomphinc/composer-installers-extender?

thejimbirch’s picture

Status: Needs work » Needs review

Yes, thanks! I am not sure core maintainers would want that. If not, we can remove and postpone on the composer/installers pull request.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new820 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

thejimbirch’s picture

Status: Needs work » Needs review

The test failed because of cspell on oomphinc.

It looks like Drupal core uses inline comments in files to exclude words from cspell.

But comments aren't allowed in JSON files, so I am not sure how to fix this. Any ideas?

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new820 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

sime’s picture

It looks like you can add it here, for example egulias is from a package from memory https://github.com/drupal/core/blob/11.x/misc/cspell/dictionary.txt#L218

thejimbirch’s picture

Status: Needs work » Needs review

Thanks! Lets see what the bot thinks of this now.

smustgrave’s picture

Can this be rebased for the failures?

smustgrave’s picture

Status: Needs review » Needs work
sime’s picture

Replicated the current error locally, but i'm not really sure why this fails, none of the usual cases seems to apply. If i copy the composer.json to a new directory and run composer update it builds fine. Something about the test context?

  Problem 1
    - Root composer.json requires oomphinc/composer-installers-extender, it could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it
sime’s picture

Not related to above, but I think it might also need to be added to allowed plugins section?

    "config": {
        "allow-plugins": {
            ...
            "oomphinc/composer-installers-extender": true  
        },
thejimbirch’s picture

Issue summary: View changes
thejimbirch’s picture

Status: Needs work » Needs review
Issue tags: +Recipes initiative
phenaproxima’s picture

Status: Needs review » Needs work

To do this, we also need to bump the composer/installers requirement to ^2.3.

thejimbirch’s picture

Status: Needs work » Needs review

Nice catch, thanks! Updated it.

thejimbirch’s picture

Issue summary: View changes
alexpott’s picture

Do we want to scaffold a readme file?

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

alexpott’s picture

Status: Needs work » Needs review
phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

Not seeing anything obviously wrong here...let's do it!

phenaproxima’s picture

Title: Add support for recipes to drupal/recommended-project » Add support for recipes to drupal/recommended-project and drupal/legacy-project
needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

alexpott’s picture

Version: 11.0.x-dev » 11.x-dev
Status: Needs work » Reviewed & tested by the community

  • catch committed 9476e1d3 on 11.x
    Issue #3447886 by alexpott, sime, phenaproxima: Add support for recipes...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.1.x, thanks!

If we want to add this to 10.4.x, it'll need a separate MR, but marking fixed for now.

alexpott’s picture

Crediting @thejimbirch - thanks for the initial work on this one!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

tr’s picture

This commit caused a problem with contributed module testing. Please read #3495586: PHPCS error in contributed module caused by core recipe.README.txt and comment there about whether recipe.README.txt is intentionally being copied into [project-root] (and if so, why?), or whether it should be copied into [web-root] instead.