我想使用 composer 脚本进行一些后期安装,例如将文件从引导供应商文件夹复制到我的 Web 应用程序公共文件夹。我对 PHP 世界和 Web 应用程序开发有初步的经验。
我正在尝试按照本教程学习这样做
这是我的目录结构*

这是我的 composer.json
{
    "name": "Composer Script",
    "description": "An example to demonstrate the use of Composer scripts",
    "version": "1.0.0",
    "require": {
        "twitter/bootstrap": ">=3.0"
    },
    "scripts": {
        "post-install-cmd": [
            "ComposerScript\\Installer::postInstall"
        ],
        "post-package-install": [
            "/var/www/test/composer-script/install.sh"
        ]
    }
}
这是 ComposerScript\Installer.php
class Installer
    {
        public static function postInstall(Event $event)
        {
            $composer = $event->getComposer();
            // do stuff
        }
        public static function postPackageInstall(Event $event)
        {
            $installedPackage = $event->getOperation()->getPackage();
            // do stuff
        }
        public static function warmCache(Event $event)
        {
            // make cache toasty
        }
    }
执行composer install后出现此错误

install.sh 此刻为空
如何解决此错误,尤其是什么是自动加载?,我不知道要搜索哪些关键字,请建议我阅读。
