Debug And Swiftmailer Extension Installation

I have installed Yii2 via composer along with the debug and swiftmailer extensions. I have problems with both extensions; I am guessing I am doing something wrong or am not doing something I should, and would appreciate some help.

Debug Extension

I see the debug bar at the bottom of the page which must mean the extension is correctly installed, but when I click one of the tabs (e.g. the db tab) I get the following error:

PHP Fatal Error – yii\base\ErrorException

Class ‘HTMLPurifier_Config’ not found

The ezyang/htmlpurifier library is in my vendor directory.

Swift Mailer Extension

Similar kind of thing; when trying to send an email I get:

PHP Fatal Error – yii\base\ErrorException

Class ‘Swift_Message’ not found

As far as a I can see I have everything installed (that’s what Composer is supposed to do - right?) and I have vendorPath defined in my application config file.

I am sure this is an installation or configuration error - any help is really appreciated.

composer.json is:




{

    "name": "yiisoft/yii2-dev",

    "description": "Yii PHP Framework Version 2 - Development Package",

    "keywords": ["yii2", "framework"],

    "homepage": "http://www.yiiframework.com/",

    "type": "yii2-extension",

    "license": "BSD-3-Clause",

    "authors": [

        {

            "name": "Qiang Xue",

            "email": "qiang.xue@gmail.com",

            "homepage": "http://www.yiiframework.com/",

            "role": "Founder and project lead"

        },

        {

            "name": "Alexander Makarov",

            "email": "sam@rmcreative.ru",

            "homepage": "http://rmcreative.ru/",

            "role": "Core framework development"

        },

        {

            "name": "Maurizio Domba",

            "homepage": "http://mdomba.info/",

            "role": "Core framework development"

        },

        {

            "name": "Carsten Brandt",

            "email": "mail@cebe.cc",

            "homepage": "http://cebe.cc/",

            "role": "Core framework development"

        },

        {

            "name": "Timur Ruziev",

            "email": "resurtm@gmail.com",

            "homepage": "http://resurtm.com/",

            "role": "Core framework development"

        },

        {

            "name": "Paul Klimov",

            "email": "klimov.paul@gmail.com",

            "role": "Core framework development"

        }

    ],

    "support": {

        "issues": "https://github.com/yiisoft/yii2/issues?state=open",

        "forum": "http://www.yiiframework.com/forum/",

        "wiki": "http://www.yiiframework.com/wiki/",

        "irc": "irc://irc.freenode.net/yii",

        "source": "https://github.com/yiisoft/yii2"

    },

    "minimum-stability": "dev",

    "replace": {

        "yiisoft/yii2-apidoc": "self.version",

        "yiisoft/yii2-authclient": "self.version",

        "yiisoft/yii2-bootstrap": "self.version",

        "yiisoft/yii2-codeception": "self.version",

        "yiisoft/yii2-debug": "self.version",

        "yiisoft/yii2-elasticsearch": "self.version",

        "yiisoft/yii2-faker": "self.version",

        "yiisoft/yii2-imagine": "self.version",

        "yiisoft/yii2-gii": "self.version",

        "yiisoft/yii2-jui": "self.version",

        "yiisoft/yii2-mongodb": "self.version",

        "yiisoft/yii2-redis": "self.version",

        "yiisoft/yii2-smarty": "self.version",

        "yiisoft/yii2-swiftmailer": "self.version",

        "yiisoft/yii2-sphinx": "self.version",

        "yiisoft/yii2-twig": "self.version",

        "yiisoft/yii2": "self.version"

    },

    "require": {

        "php": ">=5.4.0",

        "ext-mbstring": "*",

        "lib-pcre": "*",

        "yiisoft/yii2": "*",

        "yiisoft/yii2-composer": "*",

        "yiisoft/jquery": "~2.0 | ~1.10",

        "yiisoft/jquery-pjax": "*",

        "ezyang/htmlpurifier": "4.6.*",

        "cebe/markdown": "0.9.*"

    },

    "require-dev": {

        "phpdocumentor/reflection": "*",

        "phpunit/phpunit": "3.7.*",

        "twbs/bootstrap": "*",

        "twig/twig": "*",

        "imagine/imagine": "v0.5.0",

        "swiftmailer/swiftmailer": "*",

        "cebe/indent": "*",

        "phpspec/php-diff": "*"

    },

    "suggest": {

        "phpdocumentor/reflection": "required by yii2-apidoc extension",

        "twbs/bootstrap": "required by yii2-bootstrap, yii2-debug, yii2-gii extension",

        "ext-curl": "required by yii2-elasticsearch extension",

        "ext-pdo": "required by yii2-sphinx extension",

        "ext-pdo_mysql": "required by yii2-sphinx extension",

        "imagine/imagine": "required by yii2-imagine extension",

        "phpspec/php-diff": "required by yii2-gii extension",

        "swiftmailer/swiftmailer": "required by yii2-swiftmailer extension",

        "twig/twig": "required by yii2-twig extension",

        "yiisoft/yii2-coding-standards": "you can use this package to check for code style issues when contributing to yii"

    },

    "autoload": {

        "psr-4": {

            "yii\\": "framework/",

            "yii\\bootstrap\\": "extensions/bootstrap/",

            "yii\\debug\\": "extensions/debug/",

            "yii\\imagine\\" : "extensions/imagine/",

            "yii\\jui\\": "extensions/jui/",

            "yii\\swiftmailer\\": "extensions/swiftmailer/",

            "yii\\sphinx\\": "extensions/sphinx/",

            "yii\\twig\\": "extensions/twig/"

        }

    },

    "bin": [

        "framework/yii"

    ]

}