Reputation: 192
I tried PhpStorm's synchronize functionality today on and existing project which was all but fun because it let me review every file because of different spacing (Windows local, Linux server).
Now, finally I managed to publish all the files of my Laravel project but now every time I try to synchronize it gives me around 20 random files of my project which are identical (the warning says so). Why does the sync function keeps giving me random files without me changing 1 letter of my code?
Upvotes: 1
Views: 165
Reputation: 26
This is a very relatable source of confusion while using the Sync settings in PHPStorm (and other IDE's) with a framework, such as Laravel. Laravel (and many other frameworks and programs) use cached files to optimize load times. Laravel does make cached views files and are probably the 'random files' that keep appearing in your sync screen. Note, however, during synchronization you can compare by content, size and timestamp. Comparing by content will ignore these identical files but will take significantly longer than comporing by size and timestamp.
The sync functions in PHPStorm are very powerful when used correctly in a workflow where both local and remote files may change occasionally. It is, however, possible to exclude certain folders during a sync by right-clicking a folder and selecting 'exclude path'. I usually exclude /vendor, /storage/logs and /storage/framework/views (which is the folder containing cached views) to speed up the process.
I recommend looking at the folders containing the duplicate content files and possibly excluding them from future syncs. This definitely saves you some time and headaches in the future!
Upvotes: 1