I have the following
<?php
namespace app\commands;
use \Keyword as GoogleKeyword;
class KwController extends \yii\console\Controller
{
public function actionTest() {
$keyword = new GoogleKeyword();
}
It's giving the error
$ yii kw/test
PHP Fatal error: Class 'Keyword' not found in /cygdrive/c/Users/Chloe/workspace/project/commands/KwController.php on line 69
PHP Fatal Error 'yii\base\ErrorException' with message 'Class 'Keyword' not found'
in /cygdrive/c/Users/Chloe/workspace/project/commands/KwController.php:69
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}
I don't understand because it used to work.
Here's where it's defined
$ grep Keyword vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/v201509/CampaignCriterionService.php
if (!class_exists("Keyword", false)) {
class Keyword extends Criterion {
const XSI_TYPE = "Keyword";
Here is composer.json
{
"require": {
"googleads/googleads-php-lib": "~6.5"