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

ericb013's avatar

Duplicate files in my Vendor folder

Hello, I have the weirdest issue. I have a Laravel 6 project with the standard Vendor folder. In this project, the vendor files (nearly all of them) keep getting duplicated for every file in every folder. Example...

Authenticatable.php

Authenticatable 2.php

For the life of me I can not figure out why. I have deleted the Vendor folder and do a Composer Update. I have rebuilt the composer.json file. And this keeps happening. Any thoughts would be greatly appreciated.

0 likes
9 replies
jlrdw's avatar

That's a new one on me, try deleting vendor and composer.lock. And try running composer install.

Use command line do not do this in your IDE.

ericb013's avatar

Thanks! I just tried all of that and will report back. I have tried all but the composer.lock without success. Im hoping deleting the composer.lock will do the trick.

ericb013's avatar

Still a no go. Duplicate copies are showing up again.

jlrdw's avatar

This is a last-ditch effort, are you sure you have the correct composer file in laravel that matches the correct framework.

There are two main repositories for Laravel.

  • Laravel = app
  • Framework = vendor stuff
ericb013's avatar

You may be onto something. I have version 6.18 installed but my composer.json says

"laravel/framework": "^6.2",

I set that to ^6.18

I will report back and see how this turns out. Thanks for your help!!

ericb013's avatar

Still same issue unfortunately. I have other Laravel projects that are not doing this. I may try do a clean install of the project and see what happens.

iddesign's avatar

Did you ever find a solution for this? I'm seeing the same behaviour on a new Laravel 8 project and I keep having to delete the contents of my vendor folder.

ericb013's avatar

I did not really find a solution on this other then my guess is related to Apple iCloud and that particular directory is synced with iCloud. I have a few other projects that are outside of iCloud and they seem to not have duplicate directories. It could be a combination of GIT and apple cloud.

2 likes
iddesign's avatar

Thanks! I moved my files out of iCloud and it fixed the problem. Seems like a few users are seeing the same issue.

1 like

Please or to participate in this conversation.