Closed (fixed)
Project:
Automatic User Names
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2023 at 16:46 UTC
Updated:
29 May 2025 at 05:19 UTC
Jump to comment: Most recent
Comments
Comment #3
liam morlandComment #4
jayelless commented@Liam Morland: is this still a problem now that #3391633: Fix phpcs issues has been committed?
Comment #5
liam morlandI am not familiar with the
!php/constsyntax, but it looks plausible. If it does what it appears to do, then it will fix this.Edit: I am no longer working on a project that uses this, so I have no easy way of testing myself.
Comment #6
adiatisI got this error on update drupal or install new module:
Drupal\Core\Config\UnsupportedDataTypeConfigException: Invalid data type in config auto_username.settings, found in file modules/contrib/auto_username/config/install/auto_username.settings.yml: The string "!php/const Drupal\auto_username\AutoUsernamePunctuationOptions::CASE_LEAVE_AS_IS" could not be parsed as a constant.I installed lastest dev version but #3391633 didn't solved the problem.
I changed
aun_case: !php/const Drupal\auto_username\AutoUsernamePunctuationOptions::CASE_LEAVE_AS_IS
to
aun_case: 0
error is gone.
Comment #7
jibus commentedGot error when enabled the module :
Drupal\Core\Config\UnsupportedDataTypeConfigException: Invalid data type in config auto_username.settings, found in file modules/contrib/auto_username/config/install/auto_username.settings.yml: The string "!php/const Drupal\auto_username\AutoUsernamePunctuationOptions::CASE_LEAVE_AS_IS" could not be parsed as a constant. Did you forget to pass the "Yaml::PARSE_CONSTANT" flag to the parser? at line 5 (near "aun_case: !php/const Drupal\auto_username\AutoUsernamePunctuationOptions::CASE_LEAVE_AS_IS") in Drupal\Core\Config\FileStorage->read() (line 118 of /var/www/website/web/core/lib/Drupal/Core/Config/FileStorage.php).Set aun_case: 0 in auto_username.settings.yml fixed the issue.
Switch to major since this module cannot be installed.
Comment #8
kris77 commentedSet aun_case: 0 in auto_username.settings.yml fixed the issue for me too.
Thanks @adiatis @Jibus
Comment #10
sorlov commentedrebased branch from latest 8.x-1.x, so now MR can be merged
Comment #11
leducdubleuet commentedCannot install the module without this patch on Drupal 10.3.6.
Thank you.
Comment #12
blacksnipeBumped into this one, too and the fix indeed solves it.
+1 for RTBC.
In the meantime, a bump for this fix to be merged in the next stable release.
Comment #13
4kant commentedThank you for #9!
Comment #14
jayelless commentedComment #15
liam morlandDo we not still need the fix in the merge request?
Comment #16
jayelless commented@Liam morland. The value is set to zero in the yml file, while the original string is retained as a comment that can be reinstated when the core issue lands.
Comment #18
jayelless commented