当我想在GitHub上请求一个Laravel时,我现在用以下方式进行:
我觉得这有点麻烦--这实际上是正确的做法吗?
例如,如果我想为航海家包裹创建一个PR,我必须为步骤1 & 2执行以下命令。
>laravel new create-pr
>cd create-pr
>composer require tcg/voyager
>php artisan voyager:install然后删除文件夹tcg/voyager,并将叉子克隆为新文件夹tcg/voyager。
如果我跳过composer require tcg/voyager并直接将叉子克隆到tcg/voyager中,我就无法安装这个包,因为

发布于 2019-12-08 12:52:38
首先,将正式存储库tcg/voyager分叉到个人存储库iwasherefirst2/voyager中。然后
1)创建一个新的Laravel项目
2)将存储库iwasherefirst2/voyager添加到composer.json中:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/iwasherefirst2/voyager.git"
}
],3)现在用tcg/voyager安装--pref-source --这将自动将iwasherefirst2/voyager安装到vendor/tcg/voyager中,并设置git连接。
composer require tcg/voyager --prefer-source现在,您可以在vendor/tcg/voyager中更改文件并将其推送(它们将被推送到本地存储库‘`iwasherefirst2 2/voyager]。
备注
1)如果希望将包文件夹放在应用程序package/voyager的根目录中,则可以创建如下所示的符号链接:
ln -s vendor/tcg/voyager package2)要查看供应商中修改过的文件,您可以调用composer status -v
$ composer status -v
You have changes in the following dependencies:
/path/to/app/vendor/symfony/yaml/Symfony/Component/Yaml:
M Dumper.php3)如果您运行composer update,如果它覆盖您的任何文件,您将收到警告
$ composer update
Loading composer repositories with package information
Updating dependencies
- Updating symfony/symfony v2.2.0 (v2.2.0- => v2.2.0)
The package has modified files:
M Dumper.php
Discard changes [y,n,v,s,?]?https://stackoverflow.com/questions/48115694
复制相似问题