-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add more nightly tests and re-enable 1.6 migration test #386
Conversation
atomiix
commented
Mar 4, 2021
Questions | Answers |
---|---|
Description? | This PR aims to add nightly migration tests by adding 1.6.1.24 & 1.7.7.0 to the list of versions to migrate from. It also re-enable migration from 1.6.1.11 in the "classic" tests. |
Type? | improvement |
BC breaks? | no |
Deprecations? | no |
Fixed ticket? | |
How to test? | CI should be green |
Possible impacts? |
$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('./artifacts')); | ||
$files = []; | ||
foreach ($rii as $file) { | ||
if ($file->isDir() || strpos($file->getPathname(), $branch . '.txt') === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ($file->isDir() || strpos($file->getPathname(), $branch . '.txt') === false) { | |
if ($file->isDir() || strpos($file->getPathname(), $branch . '.txt') === false) { |
IF you're looking for a file name ended by $branch . '.txt'
it's maybe easier to use a regex to resolve the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it’s simpler like that because branch name can contain characters that must be escaped if using regex, not needed when using strpos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget https://www.php.net/manual/fr/function.preg-quote.php :D
Co-authored-by: GoT <PierreRambaud@users.noreply.github.com>