Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tests: update the included composer.phar from v 2.2.2 to 2.2.18 #237

Merged
merged 1 commit into from
Oct 23, 2022

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Oct 14, 2022

Description

Looks like the default PHP version on ubuntu-latest has been updated to PHP 8.1.11, which means that the expect tests running with the included composer.phar will error out on a fatal PHP Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, bool given in phar:///home/runner/work/composer-install/composer-install/tests/fixtures/composer.phar/src/Composer/Config.php:191 error.

Updating the included composer.phar to a more recent version fixes this.

Alternatively, the file could be removed and downloaded (or updated) on the fly from within CI ?

Refs:

PR checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.

Looks like the default PHP version on `ubuntu-latest` has been updated to PHP 8.1.11, which means that the `expect` tests running with the included `composer.phar` will error out on a fatal `PHP Fatal error:  Uncaught TypeError: array_merge(): Argument #1 must be of type array, bool given in phar:///home/runner/work/composer-install/composer-install/tests/fixtures/composer.phar/src/Composer/Config.php:191` error.

Updating the included `composer.phar` to a more recent version fixes this.

Alternatively, the file could be removed and downloaded (or updated) on the fly from within CI ?

Refs:
* https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
@jrfnl jrfnl requested a review from ramsey as a code owner October 14, 2022 04:48
@jrfnl
Copy link
Contributor Author

jrfnl commented Oct 14, 2022

Note: the tests will still fail on #236, but this is step 1 in fixing the current CI failure.

@desrosj
Copy link
Contributor

desrosj commented Oct 14, 2022

On one hand, it's annoying to have to update the expected version every time ubuntu-latest changes. But on the other, it's a nice "Hey, something changed in the runner image" that could point to a reason for other strange behavior. Seems that Ubuntu images are updated about once a week.

@jrfnl jrfnl mentioned this pull request Oct 22, 2022
7 tasks
@ramsey ramsey merged commit 4617231 into ramsey:v2 Oct 23, 2022
@jrfnl jrfnl deleted the feature/tests-update-composer-phar branch October 24, 2022 03:15
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants