Skip to content

Add hidden file to Filter/AcceptTest#1424

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

Add hidden file to Filter/AcceptTest#1424
jnoordsij wants to merge 1 commit into
PHPCSStandards:3.xfrom
jnoordsij:hidden-file-test

Conversation

@jnoordsij
Copy link
Copy Markdown

@jnoordsij jnoordsij commented May 7, 2026

Description

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.

Note: if you no longer intend to accept tests on 3.x, I will gladly rebase to 4.x.

Suggested changelog entry

n/a

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