Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Do not track single-file must-use plugins #755

Open
hirasso opened this issue Jan 15, 2025 · 3 comments
Open

[Feature Request] Do not track single-file must-use plugins #755

hirasso opened this issue Jan 15, 2025 · 3 comments

Comments

@hirasso
Copy link

hirasso commented Jan 15, 2025

Summary

I just noticed that single-file mu-plugins made it into my version control. This stems from the entry in .gitignore:

https://github.com/roots/bedrock/blob/c20a9dc02aef36b90ed0c6c51d895ce9fc3edde4/.gitignore#L4C1-L4C22

A more sensible suggestion could be this, if bedrock-autoloader.php really needs to be tracked in git:

web/app/mu-plugins/*
!web/app/mu-plugins/bedrock-autoloader.php

Actually – is it really necessary that the bedrock-autoloader is checked in? It's listed as a composer dependency, after all... maybe it's because it doesn't know where it should install itself?

Additional context

No response

@hirasso
Copy link
Author

hirasso commented Jan 15, 2025

Alternatively, this simplified ruleset works well for me, as my theme is always called "site":

# Content Folder
web/app/*
!web/app/themes/
web/app/themes/*
!web/app/themes/site/

// ...

It basically tells git: "Do not track anything inside the wp-content folder except for my theme"

@ethanclevenger91
Copy link
Contributor

The dependency and that single file are two different things. The single file is the entrypoint and is required due to how WordPress mu plugins work. It creates a new instance of the class provided by the dependency for the actual functionality.

@hirasso
Copy link
Author

hirasso commented Jan 17, 2025

Ah, right! So it need to be checked in then, after all. Thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants