作曲家:更新使用create-project创建的项目 [英] Composer: Updating a Project Created with `create-project`

查看:80
本文介绍了作曲家:更新使用create-project创建的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作曲家是否提供更新创建项目所用软件包的方法?即,如果我使用以下内容创建一个新的laravel项目

Does composer provide a way to update the package a project was created with? i.e., if I create a new laravel project with the following

composer create-project --prefer-dist laravel/laravel blog

Composer将获取最新版本的 laravel / laravel 软件包,将其解压缩到Blog文件夹中,然后从 blog 文件夹中运行 composer install

Composer will grab the latest version of the laravel/laravel package, unarchive it into the blog folder, and then run composer install from the blog folder.

我想/需要知道的是,作曲家是否为我提供了一种更新 laravel / laravel 的方式包下载到 blog 文件夹中?我知道自己可以在 blog 文件夹中运行 composer update ,但这将更新 compser.json require 属性中列出的内容-不会更新未归档的 blog 中的> laravel / laravel (或者会吗?)

What I want/need to know is, does composer provide a way for me to update the laravel/laravel package that was downloaded to the blog folder? I know I could run composer update inside the blog folder myself, but this will only update things listed in the compser.json's require property — it will not update the unarchived laravel/laravel in blog (or will it?)

推荐答案

如果要升级到新的laravel版本,可以始终遵循特定版本的升级指南:

If you want to upgrade to a new laravel version, you can always follow the upgrade guide for your specific version:

  • Laravel 5.8 to 6.0
  • Laravel 5.7 to 5.8
  • Laravel 5.6 to 5.7
  • Laravel 5.5 to 5.6

比一个版本落后您需要应用以前的升级指南。因此,如果您使用的是 5.6 ,并且想升级到 5.8 ,则需要遵循<$ c $的指南c> 5.6 到 5.7 ,然后从 5.7 5.8

If you are more than one version behind, you need to apply the previous upgrade guide. So if you are on 5.6 and want to upgrade to 5.8, you need to follow the guide for 5.6 to 5.7 and then from 5.7 to 5.8.

指南非常有用:它们告诉您必须将哪个程序包更新到哪个版本,并告知您有关将被删除的不推荐使用的方法的信息。在即将发布的版本中。

The guides are pretty helpful: they tell you which package must be updated to what version and inform you about deprecated methods which will be removed in the upcoming versions.

另一种可用于升级到新的次要版本的方法是看一下差异从一个laravel版本发布到下一个版本。这样,您可以看到发生了什么完全更改以及哪些文件是新的(例如,配置文件,您可以使用默认的 composer create-project 命令将其复制并粘贴到项目中

Another method which you can use to upgrade to new minor versions is to just look at the differences from one laravel release to the next. That way, you can see what exactly has changed and which files are new (configuration files for example which you can copy and paste into your project as the default composer create-project command would do).

对于当前版本,您可以在此处查看自上一版本以来的提交内容: v5.8.30至5.8

As for the current version, you can see the commits since last release here: v5.8.30 to 5.8

直接在发布标题下,其中有一个标记为自此版本以来, 36 commits 到5.8的小链接,它将带您转到上面的链接,仅用于最新版本。

Directly under the headline for a release, there is a small link labelled "36 commits to 5.8 since this release" which will take you to the link above, just for the latest version.

这篇关于作曲家:更新使用create-project创建的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆