Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

BorrahDanikls's avatar

Uploading Specific Vendor files with Laravel's Envoyer

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

0 likes
1 reply
jlrdw's avatar

Normally you shouldn't edit vendor files. Rather extend a class and write custom code. But yes you can just upload in through ssh, I use putty. But I would suggest don't, do this properly.

The main rule is don't edit vendor code.

If it's that necessary fork it, do as needed, and use the fork, that way it's your vendor code.

How can I upload my versions of dependencies

Install from fork if needed, you have to run composer.

Edit:

Just FYI, changing vendor code will become a pain when more and more errors occur.

1 like

Please or to participate in this conversation.