doushoubu5360 2017-09-27 07:45
浏览 130
已采纳

如何将laravel / laravel从5.3更新到5.4?

I have attempted to update laravel/laravel from 5.3 to 5.4, and to do so, I have modified composer.json to this:

 {
        "name" : "laravel/laravel",
        "description" : "The Laravel Framework.",
        "keywords" : [
            "framework",
            "laravel"
        ],
        "license" : "MIT",
        "type" : "project",
        "require" : {
            "php" : ">=5.6.4",
            "laravel/framework" : "5.4.*",
            "h4cc/wkhtmltopdf-amd64" : "0.12.x",
            "h4cc/wkhtmltoimage-amd64" : "0.12.x",
            "barryvdh/laravel-snappy" : "^0.3.3",
            "greggilbert/recaptcha" : "dev-master"
        },
        "require-dev" : {
            "fzaninotto/faker" : "~1.4",
            "mockery/mockery" : "0.9.*",
            "phpunit/phpunit" : "~5.7",
            "symfony/css-selector" : "2.8.*|3.0.*",
            "symfony/dom-crawler" : "2.8.*|3.0.*",
            "barryvdh/laravel-ide-helper" : "^2.2",
            "guzzlehttp/guzzle" : "~6.0"
        },
        "autoload" : {
            "classmap" : [
                "database"
            ],
            "psr-4" : {
                "App\\" : "app/"
            }
        },
        "autoload-dev" : {
            "classmap" : [
                "tests/TestCase.php"
            ]
        },
        "scripts" : {
            "post-root-package-install" : "php -r \"copy('.env.example', '.env');\"",
            "post-create-project-cmd" : "php artisan key:generate",
            "post-install-cmd" : [
                "Illuminate\\Foundation\\ComposerScripts::postInstall",
                "php artisan optimize"
            ],
            "post-update-cmd" : [
                "Illuminate\\Foundation\\ComposerScripts::postUpdate",
                "php artisan optimize"
            ]
        },
        "config" : {
            "preferred-install" : "dist"
        }
    }

Then I ran

$ composer update

It seems that composer did not do anything:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 0 updates, 0 removals
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader
The compiled class file has been removed.

When I then ran

$ php artisan --version

the output is:

Laravel Framework version 5.3.31

In composer.lock I find this:

    {
        "name": "laravel/framework",
        "version": "v5.3.31",
        "source": {
            "type": "git",
            "url": "https://github.com/laravel/framework.git",
            "reference": "e641e75fc5b26ad0ba8c19b7e83b08cad1d03b89"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/laravel/framework/zipball/e641e75fc5b26ad0ba8c19b7e83b08cad1d03b89",
            "reference": "e641e75fc5b26ad0ba8c19b7e83b08cad1d03b89",
            "shasum": ""
        },
        "require": {
            "classpreloader/classpreloader": "~3.0",
            "doctrine/inflector": "~1.0",
            "ext-mbstring": "*",
            "ext-openssl": "*",
            "jeremeamia/superclosure": "~2.2",
            "league/flysystem": "~1.0",
            "monolog/monolog": "~1.11",
            "mtdowling/cron-expression": "~1.0",
            "nesbot/carbon": "~1.20",
            "paragonie/random_compat": "~1.4|~2.0",
            "php": ">=5.6.4",
            "psy/psysh": "0.7.*|0.8.*",
            "ramsey/uuid": "~3.0",
            "swiftmailer/swiftmailer": "~5.4",
            "symfony/console": "3.1.*",
            "symfony/debug": "3.1.*",
            "symfony/finder": "3.1.*",
            "symfony/http-foundation": "3.1.*",
            "symfony/http-kernel": "3.1.*",
            "symfony/process": "3.1.*",
            "symfony/routing": "3.1.*",
            "symfony/translation": "3.1.*",
            "symfony/var-dumper": "3.1.*",
            "vlucas/phpdotenv": "~2.2"
        },
        "replace": {
            "illuminate/auth": "self.version",
            "illuminate/broadcasting": "self.version",
            "illuminate/bus": "self.version",
            "illuminate/cache": "self.version",
            "illuminate/config": "self.version",
            "illuminate/console": "self.version",
            "illuminate/container": "self.version",
            "illuminate/contracts": "self.version",
            "illuminate/cookie": "self.version",
            "illuminate/database": "self.version",
            "illuminate/encryption": "self.version",
            "illuminate/events": "self.version",
            "illuminate/exception": "self.version",
            "illuminate/filesystem": "self.version",
            "illuminate/hashing": "self.version",
            "illuminate/http": "self.version",
            "illuminate/log": "self.version",
            "illuminate/mail": "self.version",
            "illuminate/notifications": "self.version",
            "illuminate/pagination": "self.version",
            "illuminate/pipeline": "self.version",
            "illuminate/queue": "self.version",
            "illuminate/redis": "self.version",
            "illuminate/routing": "self.version",
            "illuminate/session": "self.version",
            "illuminate/support": "self.version",
            "illuminate/translation": "self.version",
            "illuminate/validation": "self.version",
            "illuminate/view": "self.version",
            "tightenco/collect": "self.version"
        },
        "require-dev": {
            "aws/aws-sdk-php": "~3.0",
            "mockery/mockery": "~0.9.4",
            "pda/pheanstalk": "~3.0",
            "phpunit/phpunit": "~5.4",
            "predis/predis": "~1.0",
            "symfony/css-selector": "3.1.*",
            "symfony/dom-crawler": "3.1.*"
        },
        "suggest": {
            "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).",
            "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).",
            "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).",
            "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).",
            "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).",
            "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).",
            "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).",
            "predis/predis": "Required to use the redis cache and queue drivers (~1.0).",
            "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).",
            "symfony/css-selector": "Required to use some of the crawler integration testing tools (3.1.*).",
            "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (3.1.*).",
            "symfony/psr-http-message-bridge": "Required to use psr7 bridging features (0.2.*)."
        },
        "type": "library",
        "extra": {
            "branch-alias": {
                "dev-master": "5.3-dev"
            }
        },

What's wrong ?

Thank's in advance for any help.

  • 写回答

4条回答 默认 最新

  • dongxin1980 2017-10-02 09:43
    关注

    It works with :

    composer require laravel/framework:^5.4.0 --update-with-dependencies
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止