-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non-existent service "locale.plural.formula" #11
Comments
@FlorentTorregrosa Is the
|
Thanks @mortenson for the quick feedback. It was not present. But I still got the error with the module listed. |
I tried to debug in the DrupalKernel to follow the flow of the error stacktrace. In app/core/lib/Drupal/Core/DrupalKernel.php, I put some debug: $yaml_loader = new YamlFileLoader($container);
foreach ($this->serviceYamls['app'] as $filename) {
if ($filename == 'core/modules/locale/locale.services.yml') {
$container->has('locale.plural.formula') ? var_dump('yes') : var_dump('no');
}
$yaml_loader->load($filename);
if ($filename == 'core/modules/locale/locale.services.yml') {
$container->has('locale.plural.formula') ? var_dump('yes') : var_dump('no');
}
} It gave:
So I guess the services definitions are loaded correctly. But lost during analysis. Also I realized that all the modules enabled in my current instance are loaded, not only the one listed in the psalm config. If I put:
I see all the services.yml files of my enabled modules. When looking at the Drupal psalm plugin I saw:
in vendor/mortenson/psalm-plugin-drupal/ContainerHandler.php So I wonder if this class should not be updated because there are been changes between the 2.x and 4.x version of the Symfony plugin. |
About "Also I realized that all the modules enabled in my current instance are loaded, not only the one listed in the psalm config.". This is because in vendor/mortenson/psalm-plugin-drupal/scripts/PsalmDrupalKernel.php::getPsalmModuleList:
This xpath expression is not working (at least for me). If I dump the $xml I have my xml file loaded but not getting in the foreach. Edit: Found the problem. at the beginning of my psalm.xml I have:
The xpath does not like those 3 lines. |
WTF, and now it is working... Edit: I mean, without those 3 lines, I do not have the problem of service not found... Checking on somewhere else than my computer. |
Checked on some else project. I was those 3 lines... |
Hi,
On either Drupal 9 and Drupal 10 with the latest version of psalm drupal plugin, when trying to scan files. I get this error.
I have rolled back on 48e3cbc (the version before recent changes). And I also obtain the error.
So I guess this is due to an update in Symfony?
The text was updated successfully, but these errors were encountered: