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

Enforce .php file extension if approved #2292

Open
GaryJones opened this issue Jul 5, 2023 · 0 comments
Open

Enforce .php file extension if approved #2292

GaryJones opened this issue Jul 5, 2023 · 0 comments

Comments

@GaryJones
Copy link
Member

Is your feature request related to a problem?

(Follow-up to #2164)

There may be some assumptions in WordPress core, standards packages for WP, or elsewhere, that PHP files used for WP core, plugins and themes will always have a three-letter file extension (.php). But, it's possible for servers to treat other extensions (.php3, myphp, etc.) also as PHP. A plugin that uses, .php3 file extensions, for instance, may not work (and may render secrets in plain text) so for compatibility reasons, it should be agreed and checkable that only .php extensions are used for PHP files.

As this is not a (handbook) rule, this would need a post on Make to decide whether that rule should be added or not. But if approved, this would need a check in WPCS to enforce.

Describe the solution you'd like

Check that a filename for a PHP file has a .php extension.

Additional context (optional)

If agreed, I would also suggest adding a note to https://make.wordpress.org/hosting/handbook/server-environment/ to confirm to server hosts about which file extensions are needed.

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