Google API Class Conflict
-
Hello,
I am trying to use this plugin and am running into an issue where the classes of the Google API services are conflicting with another plugin. In the
authorizer>vendor>google>apiclient>src>aliases.phpfile, all the Google services in theclassMaparray get created and then all throw warnings when another plugin, Beehive Pro, tries to register the same Google services in itsaliases.phpfile at the similar location. I’m not sure if this would work, but could this be addressed by introducing a namespace at the top of the aliases file? Or another way to make these classes unique? For comparison, the Beehive Proaliases.phpfile starts like this:<?php namespace Beehive; if (\class_exists('Beehive\\Google_Client', \false)) { // Prevent error with preloading in PHP 7.4 // @see https://github.com/googleapis/google-api-php-client/issues/1976 return; } $classMap = ['Beehive\\Google\\Client' => 'Google_Client', 'Beehive\\Google\\Service' => 'Google_Service', 'Beehive\\Google\\AccessToken\\Revoke' => 'Google_AccessToken_Revoke', 'Beehive\\Google\\AccessToken\\Verify' => 'Google_AccessToken_Verify', 'Beehive\\Google\\Model' => 'Google_Model', 'Beehive\\Google\\Utils\\UriTemplate' => 'Google_Utils_UriTemplate', 'Beehive\\Google\\AuthHandler\\Guzzle6AuthHandler' => 'Google_AuthHandler_Guzzle6AuthHandler', 'Beehive\\Google\\AuthHandler\\Guzzle7AuthHandler' => 'Google_AuthHandler_Guzzle7AuthHandler', 'Beehive\\Google\\AuthHandler\\Guzzle5AuthHandler' => 'Google_AuthHandler_Guzzle5AuthHandler', 'Beehive\\Google\\AuthHandler\\AuthHandlerFactory' => 'Google_AuthHandler_AuthHandlerFactory', 'Beehive\\Google\\Http\\Batch' => 'Google_Http_Batch', 'Beehive\\Google\\Http\\MediaFileUpload' => 'Google_Http_MediaFileUpload', 'Beehive\\Google\\Http\\REST' => 'Google_Http_REST', 'Beehive\\Google\\Task\\Retryable' => 'Google_Task_Retryable', 'Beehive\\Google\\Task\\Exception' => 'Google_Task_Exception', 'Beehive\\Google\\Task\\Runner' => 'Google_Task_Runner', 'Beehive\\Google\\Collection' => 'Google_Collection', 'Beehive\\Google\\Service\\Exception' => 'Google_Service_Exception', 'Beehive\\Google\\Service\\Resource' => 'Google_Service_Resource', 'Beehive\\Google\\Exception' => 'Google_Exception'];Thanks,
The topic ‘Google API Class Conflict’ is closed to new replies.