Model core's minimal install profile as recipes

Created on 7 June 2023, about 1 year ago
Updated 22 June 2024, 6 days ago

Once we model the Standard profile. We should be able to assemble a recipe that could replace the minimal profile.

๐Ÿ“Œ Task
Status

Needs work

Version

11.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @thejimbirch
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    Do we really need to do this?

    Minimal is such a nothingburger of a profile (intentionally) that I feel like it doesn't actually provide enough value to become a recipe. We've already converted Standard to a recipe suite, and will tackle Umami next, and both of those provide tremendous value for actual sites, especially in a composable, "recipized" form.

    I feel like this should be closed as a wontfix.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    If we are going to be replacing the starter profiles with recipes, then we will most likely need minimal.

    There are small changes to what core does, plus the theme blocks.

    like:

    core module:
    https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/user/...

    minimal:
    https://git.drupalcode.org/project/drupal/-/blob/11.x/core/profiles/mini...

    It would also be a nice simple example of what recipes can do in core. For instance, this change doesn't need to be a full config change, but a small config action.

    config:
      action:
        user.settings.yml
          simple_config_update:
            register: visitors_admin_approval
    
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts
  • Merge request !140Resolve #3365453 "Model cores minimal" โ†’ (Open) created by thejimbirch
  • Status changed to Needs review about 1 month ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    Merge request created that adds the recipe and copies the two tests. This is my first time making a core test, so please review those with care.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    To test manually:

    On /admin/appearance
    "Stark" should be the default and administration theme.

    On /admin/config/people/accounts
    "Visitors, but administrator approval" is required should be selected for "Who can register accounts?".

    On /admin/appearance/settings
    "User pictures in posts" should be unchecked.

    On /admin/modules
    The following modules should be enabled:

    Block
    Database Logging
    Internal Dynamic Page Cache
    Internal Page Cache

    Among others.

  • Status changed to Needs work about 1 month ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    I could use help with the failing tests.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium Wim Leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ
    PHP Fatal error:  An alias (doTestMinimal) was defined for method testMinimal(), but this method does not exist in /builds/project/distributions_recipes/core/tests/Drupal/FunctionalTests/Core/Recipe/MinimalRecipeInstallTest.php on line 18
    

    is happening due to

      use StandardTestTrait {
        testMinimal as doTestMinimal;
      }
    

    ๐Ÿ‘† StandardTestTrait does not contain a testMinimal method at all, only testStandard().

    AFAICT the only choice here is to duplicate much of \Drupal\Tests\minimal\Functional\MinimalTest, or refactor it so that there is a trait.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    Ah, makes sense. A bit over my head to implement though. If some one else wants to take this on, I would appreciate it.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Prashant.c Dharamshala

    Prashant.c โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Prashant.c Dharamshala

    @thejimbirch

    1. I added 2 more files from the core's minimal profile system.theme.global.yml and user.settings.yml
    2. To test I executed the recipe simply on already installed Drupal
    3. Could you please guide me also on how you tested the steps mentioned here https://www.drupal.org/project/distributions_recipes/issues/3365453#comm... โ†’ because currently, recipes need at least minimal Drupal installed to apply any recipe if I am not mistaken.

    Thanks.

  • Pipeline finished with Failed
    8 days ago
    Total: 229s
    #203443
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    Hi Prashant Chauhan,

    Please remove those additional files you added. They are not needed. We don't need to copy and paste the files as they are in the profile. Our goal is to create the same functionality using the new tools.

    The config files in the profile had to replace all of the functionality of the core module. Recipes do not need to recreate the whole thing. We only need to change the bits that need changing. In both files, there is only one small change in each that we can make using config actions in the recipe.yml.

    Lets take a look at the differences in user.settings:

    Here is how we are applying this single change:

    The same applies to the system.theme.global config:

    And again, here we are applying this single change in the recipe.yml using config actions:

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    To test the functionality you could use the Drupal PHP script to install Drupal without the need for an install profile.

    From the Drupal root run:

    php core/scripts/drupal install core/recipes/minimal

Production build 0.69.0 2024