FriendlyCaptcha / friendly-captcha-wordpress

WordPress plugin for Friendly Captcha. Protect WordPress website forms from spam and abuse with Friendly Captcha, a privacy-first anti-bot solution.
https://friendlycaptcha.com
19 stars 9 forks source link

vendor directory ignored by git #128

Closed RKlingler closed 5 months ago

RKlingler commented 5 months ago

Version 1.14.1 includes a vendor directory, that wasn't there before - I can't verify for 1.14.0, but 1.13.0 didn't have it. At the same time there is a .gitignore file with "/vendor" in it.

Consequentially, this causes parts of the plugin (specifically that newly added vendor directory) to be ignored by git after upgrading to 1.14.1, if you have your project under version control. In my case, this led to the plugin being deployed without the vendor directory, thereby crashing the site.

Possible workarounds seem to be downgrading to 1.13.0 or manually adjusting the .gitignore for the time being.

I assume that "/vendor" being ignored by git is not intentional and therefore it should be removed from .gitignore.

merlinfuchs commented 5 months ago

Hi, thanks for bringing this up! According to the Composer documentation, the vendor folder should not be added to version control. When you clone the repository you can install the dependencies using composer install as described in the README.

If I understand correctly you have your whole Wordpress site in version control. In that case, I can see how this can lead to problems. I think to fix this it makes sense to move the .gitignore file from friendly-captcha/ into the root folder. This way the vendor folder is ignored from our version control but won't be ignored after installing the plugin in your Wordpress site.