jhedstrom / DrupalDriver

A collection of drivers for controlling Drupal.
GNU General Public License v2.0
64 stars 97 forks source link

DrushDriver: parseUserId($info) does not work anymore #281

Open guillaume-a opened 1 week ago

guillaume-a commented 1 week ago

Given I use drush 12.5.3 When I launch command vendor/bin/drush user-create foo --mail foo@bar.baz --password foobar I Receive this output

 --------- ----------- ----------- --------------- ------------- 
  User ID   User name   User mail   User roles      User status  
 --------- ----------- ----------- --------------- ------------- 
  550895    1@test.fr   1@test.fr   authenticated   1            
 --------- ----------- ----------- --------------- ------------- 

The probleme is, parseUserId is looking for this pattern /User ID\s+:\s+\d+/ which does not match. So DrushDriver::userCreate fails with the output:

 [warning] Unable to load user: zCUYaasa

In UserCommands.php line 387:

  Unable to find any matching user  
guillaume-a commented 1 week ago

I'm starting to work on a patch/pull request for this. But before submiting l'd like to try to add tests for this part.