- 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
- Status changed to Needs review
6 months ago 11:14am 19 May 2024 - ๐บ๐ธ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 CacheAmong others.
- Status changed to Needs work
6 months ago 12:45pm 26 May 2024 - ๐บ๐ธ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 atestMinimal
method at all, onlytestStandard()
.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
- I added 2 more files from the core's minimal profile
system.theme.global.yml
anduser.settings.yml
- To test I executed the recipe simply on already installed Drupal
- 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.
- I added 2 more files from the core's minimal profile
- ๐บ๐ธ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
- ๐ฎ๐ณIndia Akhil Babu Chengannur
Akhil Babu โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia Akhil Babu Chengannur
Added 'MinimalTestTrait' and moved the
testMinimal()
method to it as mentioned in #9.
But the tests are still failing. The testMinimal() method uses 'administer content types' permission while creating test user. This permission is provided by the core node module. But the node modue is included in this recipe. Should we add it as well? - ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
Yes, great catch! We should add the node module into the recipe.yml's install section.
- Status changed to Needs review
3 months ago 12:11am 14 August 2024 - ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
Added it. Lets see if tests pass now.
- ๐ฎ๐ณIndia prashant.c Dharamshala
I am assuming the minimal profile should be installable as a first recipe like:
- I am on a fresh cloned Drupal instance
- Trying to apply the "minimal" recipe
However, it is not applying because it is looking for a DB connection, which is not yet set as the site has not been installed yet. Mostly the developers will use this recipe to install the site initially after the site is installed in my opinion this "minimal" recipe is not of any use and no one would try to apply it.
Please correct me if I misunderstood something here.
- ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
To install you can run:
php core/scripts/drupal install core/recipes/minimal
If you are running drush 13+, you could also run:
drush si core/recipes/minimal
- ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
the build test failed with a timeout last time. Retrying
- Status changed to Needs work
3 months ago 4:21pm 20 August 2024 - ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
Tests run and fail on a couple of things.
- ๐ฎ๐ณIndia Akhil Babu Chengannur
akhil babu โ changed the visibility of the branch 3365453-cores-minimal-install-profile-as-recipes to hidden.
- ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
PHPstan level 9 and Test are still failing.