Phalcon Framework 3.4.5

Error: Class 'DIY\Google_Service_Plus' not found

/home/mcgilldiy/esrap-spor-diy.ca/app/library/DIY/Google.php (20)
#0DIY\Google->getClient()
/home/mcgilldiy/esrap-spor-diy.ca/app/modules/backend/controllers/GoogleController.php (20)
<?php
 
namespace DIY\Backend\Controllers;
 
use DIY\Google;
use DIY\Api\Models\User;
use Phalcon\Db\Column;
 
/**
 * @author Julien Turbide <jturbide@nuagerie.com>
 * @version 1.0.0
 */
class GoogleController extends AbstractController
{
    public function authAction() {
    
        $appUri = $this->request->getScheme() . '://' . $this->request->getHttpHost() . $this->config->application->baseUri;
        
        $google = new Google();
        $googleClient = $google->getClient();
        $googleClient->setRedirectUri($appUri . 'google/auth');
        
        if ($this->request->has('code')) {
            $googleClient->fetchAccessTokenWithAuthCode($this->request->get('code'));
            $googleAccessToken = $googleClient->getAccessToken();
            if (!empty($googleAccessToken)) {
                $googleClient->setAccessToken($googleAccessToken);
                $googleOauth = new \Google_Service_Oauth2($googleClient);
                $googleUserInfo = $googleOauth->userinfo->get();
                if (!empty($googleUserInfo->email) && $googleUserInfo->verifiedEmail) {
                    $user = User::findFirstWith(array('Roles', 'Googles'), array(
                        'email = :email:',
                        'bind' => array(
                            'email' => $this->filter->sanitize(isset($googleUserInfo->email) ? $googleUserInfo->email : '', 'string'),
                        ),
                        'bindTypes' => array(
                            'email' => Column::BIND_PARAM_STR
                        )
                    ));
                }
                
                if (empty($user) || !$user) {
                    $google = \DIY\Api\Models\Google::findFirstByGoogleId($this->filter->sanitize($googleUserInfo->id, 'int'));
                    if ($google && $google->checkToken($google->google_id)) {
                        $user = User::findFirstWith(array('Roles', 'Googles'), array(
                            'id = :id:',
                            'bind' => array(
                                'id' => $this->filter->sanitize(isset($google->user_id) ? $google->user_id : '', 'int'),
                            ),
                            'bindTypes' => array(
                                'email' => Column::BIND_PARAM_STR
                            )
                        ));
                    }
                }
                
                if (!empty($user) || $user) {
                    $this->session->set('user', $user);
                    $this->session->set('diy.google.accessToken', $googleAccessToken);
                    $this->session->set('diy.google.userInfo', (array) $googleUserInfo);
                }
                elseif (!empty($googleUserInfo->email)) {
                    $params = [
                        'email' => $googleUserInfo->email,
                        'first_name' => $googleUserInfo->givenName,
                        'last_name' => $googleUserInfo->familyName,
                    ];
                    return $this->response->redirect($this->url->get(['for' => 'backend-controller-action', 'controller' => 'login', 'action' => 'register']) . '?' . http_build_query($params));
                }
            }
            return $this->response->redirect($appUri, true);
        }
        else {
            $this->_logout();
            return $this->response->redirect($googleClient->createAuthUrl(), true);
        }
    }
    
    private function _logout() {
        $this->session->remove('diy.google.userInfo');
        $this->session->remove('diy.google.accessToken');
        $this->session->remove('user');
    }
}
 
 
#1DIY\Backend\Controllers\GoogleController->authAction()
#2Phalcon\Dispatcher->callActionMethod(Object(DIY\Backend\Controllers\GoogleController), authAction, Array())
#3Phalcon\Dispatcher->dispatch()
#4Phalcon\Mvc\Application->handle()
/home/mcgilldiy/esrap-spor-diy.ca/public/index.php (66)
<?php
 
use Phalcon\Mvc\Application;
use Phalcon\DI\FactoryDefault;
use DIY\Config\App;
use DIY\Config\Config;
use DIY\Config\Modules;
use DIY\Config\Router;
use DIY\Config\Loader;
use DIY\Config\Services;
 
// Command line xDebug necessity
if (php_sapi_name() === 'cli-server')
{
  $_GET['_url'] = $_SERVER['REQUEST_URI'];
}
 
class Bootstrap
{
    public $di;
    public $app;
    public $config;
//    public $loader;
    public $application;
    public $services;
    public $modules;
    
    public function __construct()
    {
        $opts = getopt('e:hp:m:hp:c:hp:a:hp:p:hp:');
        if (!empty($opts)) {
            define('BOOTSTRAP_CLI', true);
            $url = '/' . $opts['m'] . '/' . $opts['c'] . '/' . $opts['a'] . '/' . $opts['p'];
            $_GET['_url'] = $url;
            $_SERVER['REQUEST_URI'] = $url;
            define('APPLICATION_ENV', $opts['e']);
            define('APP_ENV', $opts['e']);
            define('ENV', $opts['e']);
        }
        
        $appPath = realpath(__DIR__ . '/../app') . '/';
        $configPath = $appPath . 'config/';
        
        require_once $configPath . 'App.php';
        require_once $configPath . 'Config.php';
        require_once $configPath . 'Modules.php';
        require_once $configPath . 'Router.php';
        require_once $configPath . 'Services.php';
        
        $this->di = new FactoryDefault();
        $this->app = new App();
        $this->config = new Config();
        $this->config->mergeEnvConfig();
        $this->app->debugApp($this->config->get('debug', false));
        $this->services = new Services($this->di, $this->config);
        $this->application = new Application($this->di);
        
        $this->modules = new Modules($this->application);
        $this->router = new Router(true, $this->application);
    
        $this->di['router'] = $this->router;
    }
    
    public function run() {
        if (isset($this->application)) {
            echo $this->application->handle()->getContent();
        }
        else {
            throw new \Exception('Application not found', 404);
        }
    }
}
 
$bootstrap = new Bootstrap();
$bootstrap->run();
#5Bootstrap->run()
/home/mcgilldiy/esrap-spor-diy.ca/public/index.php (75)
<?php
 
use Phalcon\Mvc\Application;
use Phalcon\DI\FactoryDefault;
use DIY\Config\App;
use DIY\Config\Config;
use DIY\Config\Modules;
use DIY\Config\Router;
use DIY\Config\Loader;
use DIY\Config\Services;
 
// Command line xDebug necessity
if (php_sapi_name() === 'cli-server')
{
  $_GET['_url'] = $_SERVER['REQUEST_URI'];
}
 
class Bootstrap
{
    public $di;
    public $app;
    public $config;
//    public $loader;
    public $application;
    public $services;
    public $modules;
    
    public function __construct()
    {
        $opts = getopt('e:hp:m:hp:c:hp:a:hp:p:hp:');
        if (!empty($opts)) {
            define('BOOTSTRAP_CLI', true);
            $url = '/' . $opts['m'] . '/' . $opts['c'] . '/' . $opts['a'] . '/' . $opts['p'];
            $_GET['_url'] = $url;
            $_SERVER['REQUEST_URI'] = $url;
            define('APPLICATION_ENV', $opts['e']);
            define('APP_ENV', $opts['e']);
            define('ENV', $opts['e']);
        }
        
        $appPath = realpath(__DIR__ . '/../app') . '/';
        $configPath = $appPath . 'config/';
        
        require_once $configPath . 'App.php';
        require_once $configPath . 'Config.php';
        require_once $configPath . 'Modules.php';
        require_once $configPath . 'Router.php';
        require_once $configPath . 'Services.php';
        
        $this->di = new FactoryDefault();
        $this->app = new App();
        $this->config = new Config();
        $this->config->mergeEnvConfig();
        $this->app->debugApp($this->config->get('debug', false));
        $this->services = new Services($this->di, $this->config);
        $this->application = new Application($this->di);
        
        $this->modules = new Modules($this->application);
        $this->router = new Router(true, $this->application);
    
        $this->di['router'] = $this->router;
    }
    
    public function run() {
        if (isset($this->application)) {
            echo $this->application->handle()->getContent();
        }
        else {
            throw new \Exception('Application not found', 404);
        }
    }
}
 
$bootstrap = new Bootstrap();
$bootstrap->run();
KeyValue
_url/backend/google/auth/
KeyValue
PATH/usr/local/bin:/bin:/usr/bin
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODINGbr,gzip
HTTP_ACCEPT_LANGUAGEen-US,en;q=0.5
HTTP_CONNECTIONKeep-Alive
HTTP_HOSTesrap-spor-diy.ca
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_IF_MODIFIED_SINCEWed, 01 Feb 2023 09:40:13 GMT
DOCUMENT_ROOT/home/mcgilldiy/esrap-spor-diy.ca/public
REMOTE_ADDR44.222.189.51
REMOTE_PORT47792
SERVER_ADDR192.99.228.41
SERVER_NAMEesrap-spor-diy.ca
SERVER_ADMINwebmaster@esrap-spor-diy.ca.mcgill-diy.com
SERVER_PORT443
REQUEST_SCHEMEhttps
REQUEST_URI/backend/google/auth/
REDIRECT_URL/backend/google/auth/
REDIRECT_REQUEST_METHODGET
HTTPSon
APPLICATION_ENVprod
APP_ENVprod
ENVprod
REDIRECT_STATUS200
SSL_PROTOCOLTLSv1.3
SSL_CIPHERTLS_AES_256_GCM_SHA384
SSL_CIPHER_USEKEYSIZE256
SSL_CIPHER_ALGKEYSIZE256
SCRIPT_FILENAME/home/mcgilldiy/esrap-spor-diy.ca/public/index.php
QUERY_STRING_url=/backend/google/auth/
SCRIPT_URIhttps://esrap-spor-diy.ca/backend/google/auth/
SCRIPT_URL/backend/google/auth/
SCRIPT_NAME/index.php
SERVER_PROTOCOLHTTP/1.1
SERVER_SOFTWARELiteSpeed
REQUEST_METHODGET
X-LSCACHEon
PHP_SELF/index.php
REQUEST_TIME_FLOAT1716254141.544
REQUEST_TIME1716254141
#Path
0/home/mcgilldiy/esrap-spor-diy.ca/public/index.php
1/home/mcgilldiy/esrap-spor-diy.ca/app/config/App.php
2/home/mcgilldiy/esrap-spor-diy.ca/app/config/Config.php
3/home/mcgilldiy/esrap-spor-diy.ca/app/config/Modules.php
4/home/mcgilldiy/esrap-spor-diy.ca/app/config/Router.php
5/home/mcgilldiy/esrap-spor-diy.ca/app/config/Services.php
6/home/mcgilldiy/esrap-spor-diy.ca/app/config/env/config.prod.php
7/home/mcgilldiy/esrap-spor-diy.ca/app/modules/backend/Module.php
8/home/mcgilldiy/esrap-spor-diy.ca/vendor/autoload.php
9/home/mcgilldiy/esrap-spor-diy.ca/vendor/composer/autoload_real.php
10/home/mcgilldiy/esrap-spor-diy.ca/vendor/composer/platform_check.php
11/home/mcgilldiy/esrap-spor-diy.ca/vendor/composer/ClassLoader.php
12/home/mcgilldiy/esrap-spor-diy.ca/vendor/composer/autoload_static.php
13/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/polyfill-php80/bootstrap.php
14/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/deprecation-contracts/function.php
15/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/polyfill-mbstring/bootstrap.php
16/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/polyfill-ctype/bootstrap.php
17/home/mcgilldiy/esrap-spor-diy.ca/vendor/ralouphie/getallheaders/src/getallheaders.php
18/home/mcgilldiy/esrap-spor-diy.ca/vendor/guzzlehttp/psr7/src/functions_include.php
19/home/mcgilldiy/esrap-spor-diy.ca/vendor/guzzlehttp/psr7/src/functions.php
20/home/mcgilldiy/esrap-spor-diy.ca/vendor/guzzlehttp/promises/src/functions_include.php
21/home/mcgilldiy/esrap-spor-diy.ca/vendor/guzzlehttp/promises/src/functions.php
22/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/polyfill-php73/bootstrap.php
23/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/polyfill-php73/Php73.php
24/home/mcgilldiy/esrap-spor-diy.ca/vendor/guzzlehttp/guzzle/src/functions_include.php
25/home/mcgilldiy/esrap-spor-diy.ca/vendor/guzzlehttp/guzzle/src/functions.php
26/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/var-dumper/Resources/functions/dump.php
27/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/polyfill-intl-grapheme/bootstrap.php
28/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/polyfill-intl-normalizer/bootstrap.php
29/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/string/Resources/functions.php
30/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/polyfill-php81/bootstrap.php
31/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient-services/autoload.php
32/home/mcgilldiy/esrap-spor-diy.ca/vendor/php-webdriver/webdriver/lib/Exception/TimeoutException.php
33/home/mcgilldiy/esrap-spor-diy.ca/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php
34/home/mcgilldiy/esrap-spor-diy.ca/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php
35/home/mcgilldiy/esrap-spor-diy.ca/vendor/psy/psysh/src/functions.php
36/home/mcgilldiy/esrap-spor-diy.ca/vendor/sabre/uri/lib/functions.php
37/home/mcgilldiy/esrap-spor-diy.ca/vendor/symfony/polyfill-php72/bootstrap.php
38/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/aliases.php
39/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Client.php
40/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Service.php
41/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/AccessToken/Revoke.php
42/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/AccessToken/Verify.php
43/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Model.php
44/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Utils/UriTemplate.php
45/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/AuthHandler/Guzzle6AuthHandler.php
46/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php
47/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/AuthHandler/Guzzle5AuthHandler.php
48/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/AuthHandler/AuthHandlerFactory.php
49/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Http/Batch.php
50/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Http/MediaFileUpload.php
51/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Http/REST.php
52/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Task/Retryable.php
53/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Task/Exception.php
54/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Exception.php
55/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Task/Runner.php
56/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Collection.php
57/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Service/Exception.php
58/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Service/Resource.php
59/home/mcgilldiy/esrap-spor-diy.ca/vendor/google/apiclient/src/Task/Composer.php
60/home/mcgilldiy/esrap-spor-diy.ca/vendor/league/csv/src/functions_include.php
61/home/mcgilldiy/esrap-spor-diy.ca/vendor/league/csv/src/functions.php
62/home/mcgilldiy/esrap-spor-diy.ca/vendor/phalcon/dd/src/helper.php
63/home/mcgilldiy/esrap-spor-diy.ca/vendor/sabre/xml/lib/Deserializer/functions.php
64/home/mcgilldiy/esrap-spor-diy.ca/vendor/sabre/xml/lib/Serializer/functions.php
65/home/mcgilldiy/esrap-spor-diy.ca/vendor/swiftmailer/swiftmailer/lib/swift_required.php
66/home/mcgilldiy/esrap-spor-diy.ca/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php
67/home/mcgilldiy/esrap-spor-diy.ca/vendor/tkijewski/reddit-php-sdk/reddit.php
68/home/mcgilldiy/esrap-spor-diy.ca/app/library/DIY/Mvc/Dispatcher/Camelize.php
69/home/mcgilldiy/esrap-spor-diy.ca/app/library/DIY/Mvc/Dispatcher/Security.php
70/home/mcgilldiy/esrap-spor-diy.ca/app/library/DIY/Mvc/Dispatcher/Rest.php
71/home/mcgilldiy/esrap-spor-diy.ca/app/library/DIY/Mvc/Dispatcher/Error.php
72/home/mcgilldiy/esrap-spor-diy.ca/app/library/DIY/DIY.php
73/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/Role.php
74/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/AbstractModel.php
75/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/Snapshots.php
76/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/SoftDelete.php
77/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/RawValue.php
78/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/CreatedDate.php
79/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/UpdatedDate.php
80/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/Log.php
81/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/User.php
82/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/Relationship.php
83/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/Eagerload.php
84/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/EagerLoadingTrait.php
85/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/Expose/Expose.php
86/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/FindIn.php
87/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/Utils.php
88/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/Cache.php
89/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Mvc/Model/Slug.php
90/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Db/Profiler.php
91/home/mcgilldiy/esrap-spor-diy.ca/app/modules/backend/controllers/GoogleController.php
92/home/mcgilldiy/esrap-spor-diy.ca/app/modules/backend/controllers/AbstractController.php
93/home/mcgilldiy/esrap-spor-diy.ca/app/library/DIY/Mvc/AbstractController.php
94/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/RatingField.php
95/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/Project.php
96/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/External.php
97/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/Newsletter.php
98/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/controllers/ItemTrait.php
99/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/Field.php
100/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/Source.php
101/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/Task.php
102/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/Help.php
103/home/mcgilldiy/esrap-spor-diy.ca/vendor/phalcon/incubator/Library/Phalcon/Utils/Slug.php
104/home/mcgilldiy/esrap-spor-diy.ca/app/modules/api/models/User.php
105/home/mcgilldiy/esrap-spor-diy.ca/app/library/jTurbide/Assets/Manager.php
106/home/mcgilldiy/esrap-spor-diy.ca/app/library/DIY/Google.php
Memory
Usage4194304