首先,fork官方仓库tcg/voyager
进入您的个人存储库iwasherefirst2/voyager
. Then
1)创建一个新的Laravel项目
2)添加存储库iwasherefirst2/voyager
到composer.json:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/iwasherefirst2/voyager.git"
}
],
3)现在安装tcg/voyager
with --pref-source
这将自动安装iwasherefirst2/voyager
into vendor/tcg/voyager
并设置 git 连接。
composer require tcg/voyager --prefer-source
现在您可以更改里面的文件vendor/tcg/voyager
并推送它们(它们将被推送到您的本地存储库“iwasherefirst2/voyager”)。
Remarks
1)如果您希望将包文件夹放在应用程序的根目录中package/voyager
,您可以创建一个像这样的符号链接:
ln -s vendor/tcg/voyager package
2)要查看供应商中修改的文件,您可以调用composer status -v
$ composer status -v
You have changes in the following dependencies:
/path/to/app/vendor/symfony/yaml/Symfony/Component/Yaml:
M Dumper.php
3)如果你跑步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,?]?