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

Normalize paths #111

merged 4 commits into from Nov 30, 2018


2 participants
Copy link

siliconforks commented Nov 30, 2018

I have added two additional commits to #110 in order to get the PHPUnit test suite working on Windows.

The first commit modifies getFilesFromDirectory to use the UNIX_PATHS flag (see to force the RecursiveDirectoryIterator to return Unix-style paths even on Windows. (Note that normalize_path is already called at the end of the function to convert all paths to Unix-style; however, this occurs after the RecursiveCallbackFilterIterator has been used to filter the results. Using the UNIX_PATHS flag ensures that the files inside the callback use Unix-style paths, which is necessary when comparing against $include and $exclude.)

The second commit just modifies the test suite to use a normalized base path. With this change all the tests pass on Windows.

swissspidy and others added some commits Nov 28, 2018

Pass UNIX_PATHS flag to RecursiveDirectoryIterator constructor
This is needed so that the files in the RecursiveCallbackFilterIterator
callback have Unix-style paths for matching against $include and

@swissspidy swissspidy added this to the 2.1.0 milestone Nov 30, 2018

@swissspidy swissspidy merged commit ec8c6a1 into wp-cli:master Nov 30, 2018

2 checks passed

DEP All dependencies are resolved
continuous-integration/travis-ci/pr The Travis CI build passed

@swissspidy swissspidy referenced this pull request Nov 30, 2018


Normalize paths #110

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