Closed mjordan closed 6 years ago
Merging #437 into master will increase coverage by
<.01%
. The diff coverage is0%
.
@@ Coverage Diff @@
## master #437 +/- ##
==========================================
+ Coverage 27.22% 27.22% +<.01%
==========================================
Files 79 79
Lines 5087 5090 +3
==========================================
+ Hits 1385 1386 +1
- Misses 3702 3704 +2
Impacted Files | Coverage Δ | |
---|---|---|
src/filegetters/CsvNewspapers.php | 15.06% <0%> (ø) |
:arrow_up: |
src/metadatamanipulators/SplitRepeatedValues.php | 70.11% <0%> (-2.51%) |
:arrow_down: |
src/fetchermanipulators/RandomSet.php | 69.44% <0%> (+1.38%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 802f5bc...5e1131e. Read the comment docs.
I wonder if we should be doing a thorough audit of all uses of DIRECTORY_SEPARATOR and regexes and add the preg_quote()
if it's not there.
@mjordan That's a good idea.
Or for that matter, creating our own wrapper function, where we could do everything in one place.
@MarcusBarnes @bondjimbond tests run clean - can one of you merge this? Or I can do it myself if there are no objections.
Thank you @mjordan.
@MarcusBarnes thanks!
Github issue: (#436)
What does this Pull Request do?
Escapes a regex pattern so that it doesn't fail on Windows.
What's new?
As explained in the issue, adds the line
$directory_regex = preg_quote($directory_regex);
to the CsvNewspapers filegetter so the the DIRECTORY_SEPARATOR on Windows (\
) is escaped properly.How should this be tested?
This change can only be tested thoroughly on Windows, but I used it yesterday to successfully generate a batch on Windows. On non-windows platforms, the fix should be invisible. To test this:
./mik -c issue_436.ini
./mik -c issue_436.ini
Results of PHP tests should also be the same across the master and issue-436 branches. In the mik directory, run:
phpunit
issue_436.zip