Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ignoreDotFiles(true) does not exclude folders properly #4911

Closed
@stof

Description

@stof

I found a weird behavior with ignoreDotFiles(true): the testsuite of the ExcludeDirectoryFilterIterator passes properly but folder starting with a dot are not ignored.

I found it when using the PHP-CS-Fixer (which calls this method in its DefaultFinder).

mkdir .test
echo "foo     " > .test/foo.php
php-cs-fixer fix . --dry-run

Expected output: no change.
Actual output: .test/foo.php is modified

This is a bit annoying as it means that the fixer messes with the .idea folder holding the PHPStorm metadata.

FYI, I found this bug on Windows. I don't know if it is a platform-specific bug or if it affects Unix environments as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions