Problem/Motivation
After updating to 8.x-4.7, clicking Scan Library throws IncompleteLibraryDefinitionException for google-api-php-client. The same exception can prevent the OAuth and service-account add forms from opening.
The 8.x-4.7 change for #3439426 removed the empty dependencies entry from the PHP-only library definition. Drupal asset discovery does not recognize php as an asset type, so the definition no longer has a recognized key and is rejected before the Composer-installed client can be detected.
Steps to reproduce
- Install 8.x-4.7 on a fresh Drupal site using Composer.
- Visit
/admin/structure/google_api_client_settings. - Click Scan Library.
Drupal reports an incomplete library definition for google-api-php-client.
Proposed resolution
- Declare a valid empty dependency array for the legacy PHP-only library definition.
- Detect the Composer-autoloaded Google client before falling back to Drupal library discovery.
Remaining tasks
- Review and merge the fix.
- Create an 8.x-4.8 bug-fix release.
User interface changes
None. The Scan Library button and account forms work again.
API changes
None.
Data model changes
None.
Issue fork google_api_client-3611831
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 #4
elamanMR !20 has been merged into 8.x-4.x. The fix is available in the 8.x-4.8 release: https://www.drupal.org/project/google_api_client/releases/8.x-4.8
Verified on Drupal 11.4.4 with PHP 8.4.22. Scan Library completes successfully, and both OAuth and service-account clients can be configured and instantiate the Google Sheets service.