Symfony 3.3 ScriptHandler 不可自动加载



我正在使用带有gitlab-ci(和 docker)的 Capistrano 3.10.0 部署到生产环境,但composer 1.5.2似乎没有自动加载ScriptHandler
注意:composer.lock 是最新的。

这是卡皮斯特拉诺错误:

01 Generating optimized autoload files
01 > IncenteevParameterHandlerScriptHandler::buildParameters
01 Updating the "app/config/parameters.yml" file
01 Class SensioBundleDistributionBundleComposerScriptHandler is not autoloadable, can not call symfony-scripts script
01 Class SensioBundleDistributionBundleComposerScriptHandler is not autoloadable, can not call symfony-scripts script
01 Class SensioBundleDistributionBundleComposerScriptHandler is not autoloadable, can not call symfony-scripts script
01 Class SensioBundleDistributionBundleComposerScriptHandler is not autoLoadable, can not call symfony-scripts script
01 Class SensioBundleDistributionBundleComposerScriptHandler is not autoloadable, can not call symfony-scripts script
01 deploy@IP 3.002s
00:07 npm:install
01 npm install --production --silent --no-progress
01 added 3 packages in 0.619s
01 deploy@IP 2.613s
00:10 deploy:set_permissions:check
ERROR Cannot change permissions: /home/app/releases/20171106125307/var/logs is not a file or directory (Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@IP: Cannot change permissions: /home/app/releases/20171106125307/var/logs is not a file or directory

不会创建var/logs目录,部署会立即失败。

作曲家.json

{
    "name": "MyApp",
    "description": "MyApp description",
    "license": "proprietary",
    "type": "project",
    "autoload": {
        "psr-4": {
            "": "src/"
        },
        "classmap": [
            "app/AppKernel.php",
            "app/AppCache.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "require": {
        "php": ">=7.0",
        "ext-mbstring": "*",
        "ext-soap": "*",
        "symfony/symfony": "^3.3",
        "doctrine/orm": "^2.5",
        "doctrine/doctrine-bundle": "^1.6",
        "symfony/swiftmailer-bundle": "^2.3",
        "symfony/monolog-bundle": "^3.0",
        "symfony/polyfill-apcu": "^1.0",
        "sensio/framework-extra-bundle": "^3.0.2",
        "incenteev/composer-parameter-handler": "^2.0",
        "symfony/assetic-bundle": "^2.8",
        "nesbot/carbon": "^1.22",
        "symfony/workflow": "^3.3",
        "twig/extensions": "^1.4",
        "stof/doctrine-extensions-bundle": "^1.2",
        "csa/guzzle-bundle": "^2.0",
        "symfony/dotenv": "^3.3",
        "sensio/distribution-bundle": "^5.0",
        "beberlei/assert": "^2.7"
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0",
        "symfony/phpunit-bridge": "^3.0",
        "doctrine/doctrine-fixtures-bundle": "^2.3",
        "fzaninotto/faker": "^1.6",
        "friendsofphp/php-cs-fixer": "^2.6",
        "phpunit/phpunit": "^5.6",
        "jakub-onderka/php-parallel-lint": "^0.9.2",
        "edgedesign/phpqa": "^1.16"
    },
    "scripts": {
        "symfony-scripts": [
            "Incenteev\ParameterHandler\ScriptHandler::buildParameters",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-install-cmd": [
            "@symfony-scripts"
        ],
        "post-update-cmd": [
            "@symfony-scripts"
        ]
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": null
    }
}

是不是少了点什么?

gitlab-cicapistrano之间一团糟.我试图使用开发分支部署到生产环境,而 capistrano 正在获取主节点(有一个composer.json错误)......

上述配置正在工作。

相关内容

  • 没有找到相关文章

最新更新