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 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题