使用Laravel的Envoyer上传特定的供应商文件 [英] Uploading Specific Vendor files with Laravel's Envoyer

查看:219
本文介绍了使用Laravel的Envoyer上传特定的供应商文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Laravel Forge仅将特定的供应商文件上传到我的服务器。
原因是因为我在一些依赖关系中编辑了代码,现在发生的情况是,我的网站的某些功能被破坏了,因为当我从Envoyer推送到我的服务器时,Envoyer正在从我的GitHub仓库中抓取。



我的GitHub仓库不包含供应商目录,因为它不应该是因为Iv'e将该目录添加到我的gitignore文件中

  / vendor / * 
/ node_modules
Homestead.yaml
Homestead.json
.env

我试过白名单中的某些文件夹,如下所示:

  / vendor / * 
/ node_modules
Homestead.yaml
Homestead.json
.env
!/ vendor
!/ vendor / misd

但是从Envoyer部署到我的服务器后,My网站停止工作,并收到错误消息

 警告:require(/ home / forge / default / bootstrap /../ vendor /autoload.php):未能打开流:没有这样的fi第17行的/home/forge/default/bootstrap/autoload.php中的文件或目录

I'已经尝试在白名单中包含autoload.php文件,但在部署完毕后仍然会收到类似的消息。如何上载我的版本依赖项(我编辑的依赖项) 。
现在发生的事情是,Envoyer通过composer获取所有的依赖关系,因此从依赖关系repo中获取,这很好,但我需要能够安装我自己的某些依赖关系的版本。



任何想法

解决方案

正如在问题本身的评论中提到的,这是一个非常危险的情况,你会更好地服务于扩展包或分叉,然后使用它。



这就是说,它看起来像你有一个git问题:单纯基于在出现错误时,出现的问题看起来好像不包含模块文件(您是否确实检查了模块文件存在?)以及 / home / forge /缺省/ bootstrap /../ vendor / autoload.php 不存在。根据 .gitignore 您提供的信息是正确的(您忽略供应商中的所有文件 - / vendor / * - - 仅包括目录本身 - !/ vendor - 和子目录/文件 misd - !/供应商/ MISD )。您需要包含 /vendor/autoload.php - !/ vendor / autoload.php - 或者您需要在事实后生成一些如何。


I'm trying to upload only specific vendor files to my server using Laravel Forge. The reason is because I've edited the code in some of my dependencies, whats happening now is that certain features of my site are breaking because when I push from Envoyer to my server , Envoyer is grabbing from my GitHub repo.

my GitHub repo doesn't contain a vendor directory, as it shouldn't because Iv'e added that directory to my gitignore file

/vendor/*
/node_modules
Homestead.yaml
Homestead.json
.env

I've tried white listing certain folders within the directory like so:

/vendor/*
/node_modules
Homestead.yaml
Homestead.json
.env
!/vendor
!/vendor/misd

But then after I deploy from Envoyer to my server, My site stops working and I get an error message

Warning: require(/home/forge/default/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/forge/default/bootstrap/autoload.php on line 17

I've tried including the autoload.php file in the white list, but still get a similar message after deploying

How can I upload my versions of dependencies (the dependencies I edited). Whats happening now is that Envoyer is grabbing all the dependencies via composer, thus grabbing from the dependencies repo, thats great but, I need to be able to install my own versions of some of those dependencies

any Ideas

解决方案

As mentioned in the comments on the question itself this is a pretty dangerous situation and you'd be much better served extending the package or forking it and then using that.

That being said it does look like you have a git issue: Based solely on the error you're getting the problem appears as if it's less that you aren't including the module files (have you actually checked that the module files are present?) and more that /home/forge/default/bootstrap/../vendor/autoload.php isn't present. Based on the .gitignore you provide this is correct (You ignore all files in vendor--/vendor/*--and only include back the directory itself--!/vendor--and the subdirectory/file misd--!/vendor/misd). You either need to include /vendor/autoload.php--!/vendor/autoload.php--or you need to generate it after the fact some how.

这篇关于使用Laravel的Envoyer上传特定的供应商文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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