Problem/Motivation
Was trying to set up simple_oauth on a fresh Drupal 11 system, and going to generate public and private keys. When saving the keys, I get an error:
Error: Call to undefined method Drupal\\Component\\FileSecurity\\FileSecurity::writeWebConfig() in /app/web/modules/contrib/simple_oauth/src/Service/KeyGeneratorService.php on line 76
This is called in KeyGeneratorService::generateKeys():
FileSecurity::writeWebConfig($dir_path);
FileSecurity::writeWebConfig appears to have been entirely removed for Drupal 11: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21File...
I don't see any evidence it was ever deprecated in Drupal 10: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21File...
Steps to reproduce
Install simple_oauth on Drupal 11.
Attempt to generate keys at /admin/config/people/simple_oauth
Proposed resolution
Unknown - I can comment the line out and it appears to work.
The release notes for Drupal 11 make reference to web.config being removed: https://www.drupal.org/project/drupal/releases/11.0.0-beta1
Maybe make a call to method_exists()?
Issue fork simple_oauth-3460689
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
trevorbradley commentedWrote up a hopefully polite documentation complaint on the D11 documentation queue here: https://www.drupal.org/project/drupal/issues/3460690
Comment #5
ankitv18 commentedPlease review the MR!137 as the mentioned menthod is deprecated in D11 it is required to include this before stable release.
Comment #7
bojan_dev commented@TrevorBradley tnx for the headsup and @ankitv18 tnx for the MR!