doudi7782 2018-04-05 16:00
浏览 80

在编译器更新/安装后未获取依赖关系

I am using the following image in my deploy script

image: php:7-fpm

and then do some typical stuff to install my composer dependencies:

script:
            - apt-get update && apt-get install -y unzip python-dev git
            - apt-get install -qy git curl libmcrypt-dev mysql-client
            - docker-php-ext-install mcrypt && docker-php-ext-install pdo_mysql
            - apt-get install -y curl software-properties-common gnupg
            - ./install-composer.sh
            - composer install

Issue is that while I see in the console the packages being installed, when I login to the server and go to the vendor dir then the new package (aws-sdk-php) is not in there.

Installing aws/aws-sdk-php (dev-master 86d1892): 100%

What goes wrong here?

Update This is my composer.json file

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.1.3",
        "fideloper/proxy": "~4.0",
        "laravel/framework": "5.6.*",
        "laravel/tinker": "~1.0",
        "aws/aws-sdk-php": "dev-master"
    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "~1.0",
        "nunomaduro/collision": "~2.0",
        "phpunit/phpunit": "~7.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}
  • 写回答

1条回答 默认 最新

  • dongzhong2674 2018-04-05 18:46
    关注

    Hey dont know much about the aws thing but you are trying to load the php package for the awsin laravel. Though laravel is a framework for php but the aws package gives special package for laravel. This is the package "aws/aws-sdk-php": "dev-master" you stated in your composer.json.

    Instead include this "aws/aws-sdk-php-laravel": "~3.0" package into your composer.json. This is specially crafted for laravel. After including run composer update and see if the package gets included in the vendor directory or not.

    Link of respected package at packagist.

    Link of respected package at GitHub.

    Hope it helps.

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?