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

Bug in FileManager - regex to ignore files? #113

Closed
bmitch opened this issue Oct 3, 2017 · 4 comments · Fixed by #121
Closed

Bug in FileManager - regex to ignore files? #113

bmitch opened this issue Oct 3, 2017 · 4 comments · Fixed by #121

Comments

@bmitch
Copy link
Owner

bmitch commented Oct 3, 2017

I think if you try to make a regex pattern like *.php to ignore files it won't give you the expected results.

I created this test:

        $fileManager = new FileManager(['php', 'inc'], ['Assets2/*.php']);
        $this->assertCount(1, $fileManager->getPhpFiles([__DIR__ . '/../Assets2']));

Which I would expect to pass but it fails.

bmitch added a commit that referenced this issue Oct 3, 2017
@bmitch
Copy link
Owner Author

bmitch commented Oct 3, 2017

@bearzk Not sure if this is something you'd like to look at. If not I can take a look into it.

I created a branch with a test that I would expect to pass in case you want to look:

https://github.com/bmitch/churn-php/blob/bmitchell-113/tests/Unit/Managers/FileManagerTest.php#L78-L79

@berkedel
Copy link

berkedel commented Oct 4, 2017

What behavior * has in this case? Does it match the pattern only in current directory or also recursively match in subdirectories?

@bearzk
Copy link
Contributor

bearzk commented Oct 4, 2017

@bmitch sure, I made another PR #121 for this. Should have covered this case.

@bearzk
Copy link
Contributor

bearzk commented Oct 4, 2017

@berkedel it would match recursively.

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

Successfully merging a pull request may close this issue.

3 participants