- Issue created by @poker10
Symfony finder is used to find all recipes in the filesystem, see Recipes::getFinder()
:
$finder = Finder::create()
->files()
->in($search_in)
->depth(1)
// Without this, recipes that are symlinked into the project (e.g.,
// path repositories) will be missed.
->followLinks()
// The example recipe exists for documentation purposes only.
->notPath('example/')
->name('recipe.yml');
$allowed = $this->configFactory->get('project_browser.admin_settings')
->get('allowed_projects.' . $this->getPluginId());
if ($allowed) {
$finder->path(
array_map(fn (string $name) => $name . '/', $allowed),
);
}
return $finder;
We are not adding a sort to this finder, nor sorting it afterwards (because the Recipes tab does not have the sort element). This means that the order in which the recipes are returned by the Symfony finder is random and can change in different enviroments. I experienced two different sorts on two installations recently:
First site:
https://www.drupal.org/files/issues/2024-12-13/recipes1.png β
Second site:
https://www.drupal.org/files/issues/2024-12-13/recipes2.png β
I think we should add a default sort by the recipe name/filename, to have it consistent.
Install Drupal CMS
Go to /admin/modules/browse
and open Recipes tab
Examine the order of the recipes (they are not sorted)
Try installing Drupal CMS on diffent system and repeat the steps (the order will probably be different)
Add order by recipe name/filename.
Active
2.0
Code