GH Actions: fiddle the PHP versions and line endings for Windows builds #677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Follow up on #663
GH Actions/quicktest: fiddle the PHP versions
Installing on PHP 5.4 with Composer on Windows runs into issues a lot of the time. Considering PHP 5.4 is ancient, let's just side-step this problem by using PHP 5.5.
Also see PHPCSStandards/composer-installer#213 for a little more context (yes, I've seen this issue before).
GH Actions: don't convert line endings
By default the
actions/checkout
runner uses the default git settings for line ending normalization, which istrue
.For Windows, this means that
lf
line endings in files get converted tocrlf
on checkout.In the case of PHPCS, this is problematic as this means that the integration test, which runs PHPCS over the code in PHPCS itself, would fail on hundreds of
End of line character is invalid; expected "\n" but found "\r\n"
CS errors.Now, this line ending normalization can be undone via some config in
.gitattributes
, but that could negatively impact contributors who may prefer to have the line ending conversion when working on files in their local editors.So instead of that, this commit just turns it off in CI alone. The
core.autocrlf input
setting should leave the line-endings "as-is" when it gets checked out.Refs:
Suggested changelog entry
N/A