Skip to content
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

FIX Use latest compatible version of installer #116

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Jan 8, 2025

Issue silverstripe/.github#357

Indirectly fixes a behat test which broke because CI was using framwork 5.2 instead of 5.3 due to the corresponding version of installer being used, where there this line was different - 5.2 - 5.3

gha-generate-matrix INSTALLER_TO_REPO_MINOR_VERSIONS has graphql 5.2 for both installer 5.2 and installer 5.3. We should use the latest version of installer that matches in this scenario, rather than the first one

@emteknetnz emteknetnz marked this pull request as ready for review January 8, 2025 04:17
@@ -375,7 +377,7 @@ private function getListOfPhpVersionsByBranchName(): array
$json = $this->getComposerJsonContent();
if ($json) {
$php = $json->require->php ?? null;
$php = str_replace('^', '', $php);
$php = str_replace('^', '', $php ?? '');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes deprecation notice in php 8.3 - Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in path/to/gha-generate-matrix/job_creator.php on line 378

@GuySartorelli
Copy link
Member

GuySartorelli commented Jan 8, 2025

I was worried this might cause a regression of #93 but your implementation for that was to start by completely removing the version of installer which the matrix includes, so this change will be fine in that regard - though we don't have a "prefer-lowest" for behat.

Copy link
Member

@GuySartorelli GuySartorelli left a 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 still correct to install the lowest version which the module will allow to be installed though, isn't it?

This seems like the behat test is correctly informing us we messed up our constraints and introduced a regression users might encounter.

@emteknetnz
Copy link
Member Author

Yeah that's probably correct actually, we should use the lowest version of installer to catch regressions caused by the wrong constraints

@emteknetnz emteknetnz closed this Jan 9, 2025
@GuySartorelli GuySartorelli deleted the pulls/1.17/graphql-installer branch January 9, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants