Skip to content

Add test for processing hidden files#1425

Open
jnoordsij wants to merge 1 commit into
PHPCSStandards:4.xfrom
jnoordsij:should-process-hidden-file-test
Open

Add test for processing hidden files#1425
jnoordsij wants to merge 1 commit into
PHPCSStandards:4.xfrom
jnoordsij:should-process-hidden-file-test

Conversation

@jnoordsij
Copy link
Copy Markdown

@jnoordsij jnoordsij commented May 7, 2026

Description

This test is effectively a copy of ShouldProcessFileWithoutExtensionTest for hidden files.

See also #1424:

When debugging behavior on treatment of hidden files, I discovered after some testing the following behavior:

  • on 3.x hidden files are always ignored, even if explicitly added by full path
  • on 4.x hidden files are ignored on recursive traversal, but processed when explicitly added by full path

As I could not find any change that intended to change this behavior,
I was wondering if this was entirely intended,
but it seems to match with the suggested approach in #395.
For what I have gathered, I think this behavioral change was a potentially unintended side-effect of adding processing of files without extensions in 4.x.
Given that I think this new behavior has been around since and better matches user expectation,
I've opted to create two tests, one here (3.x) and one for 4.x (see #1425) to actively verify this behavior.

Suggested changelog entry

n/a

Note: apart from some issues here and the previous repo, I could not find any proper documentation on this behavior.
It may still be noteworthy to (retroactively) mention in the 4.x changes or document in some other way,
so that this behavior is also clear towards consumers when searching for it.

Related issues/external references

Related to #395

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement
  • None of the above; just a new behavior test

PR checklist

  • I have checked there is no other PR open for the same change.
  • I have read the Contribution Guidelines.
  • I grant the project the right to include and distribute the code under the BSD-3-Clause license (and I have the right to grant these rights).
  • I have added tests to cover my changes.
  • I have verified that the code complies with the projects coding standards.
  • [Required for new sniffs] I have added XML documentation for the sniff.
  • I have opened a sister-PR in the documentation repository to update the Wiki.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant