Problem/Motivation
❯ TypeError: Drupal\ldap_servers\Mapping::__construct(): Argument #1 ($id) must be of type string, int given, called in
/<path>/docroot/modules/contrib/ldap/ldap_user/src/FieldProvider.php on line 152 in Drupal\ldap_servers\Mapping->__construct() (line 114 of
/<path>/docroot/modules/contrib/ldap/ldap_servers/src/Mapping.php). Debug Report
ldap_user.schema.yml defines ldapUserSyncMappings:mapping:drupal as a sequence and therefor the ids will be integers whereas the mapping definition expects a string.
FieldProvider.php has ```declare(strict_types=1);``` on top, so this becomes a type error.
The type change was added in this commit:
Commit fe4010b8 authored Feb 25, 2019
Initial version of split ldap_user configuration form with additional tests begun.
It seems like there was an effort to move from the config_object to config_entity, but it is unclear to me what the status of said migration is.
Proposed resolution
Add casting to the $id variable when initializing the mapping as a pragmatic fix.
Remaining tasks
This kind of looks like a refactor that wasn't quite finished, so probably there needs to be a follow-up for that.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork ldap-3587309
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
pjonckiere commentedComment #4
pjonckiere commentedI'm looking at the pipeline failures but I doubt it's caused by my patch
so I'll go ahead and mark for review