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

ENH Add MySQL 8.4 to matrix #112

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Nov 18, 2024

Issue #95

Copy link
Member

Choose a reason for hiding this comment

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

Can you please explain the implementation to me? Seems like we should just be either:

  1. always outputting all DB versions we need from generatePhpToDBMap and relying on deduping to avoid duplicates
  2. Passing the prefer-lowest db into generatePhpToDBMap so it knows not to duplicate it, and then still outputting all the ones we do still need

And then we don't need to split code into the new getDBs() nor do we need a foreach ($dbNotAdded as $db) {?

There's probably some context I'm missing though, I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

generatePHPToDBMap() makes an assumption that there are greater or equal number of PHP versions to DB versions (minus 1, which is manually added for the --prefer-lowest build). However we now have a situation where there are more DB versions that PHP versions

Previously for CMS 6, which only supports PHP 8.3, we had mariadb manually added for --prefer-lowest, then a single PHP version (8.3), and a single DB (mysql80). However now we mysql84 as well, hence the $dbNotAdded code

Copy link
Member

@GuySartorelli GuySartorelli Nov 18, 2024

Choose a reason for hiding this comment

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

Should this just wait until after PHP 8.4 support is added for CMS 6 then? It feels like a fair amount of complexity is being added to an already pretty messy file.

As an aside, we should probably refactor this to be a few separate classes at some stage so it's easier to see where things are happening for maintenance purposes. But that's clearly not in scope for this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it needs to wait. I think it's worth while code to add as we'll end up in the situation again where there's more DB's than PHP's whenever we release a new major.

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.

Well, it seems like it'll work.

@GuySartorelli GuySartorelli merged commit b710e07 into silverstripe:1 Nov 19, 2024
2 checks passed
@GuySartorelli GuySartorelli deleted the pulls/1/mysql84 branch November 19, 2024 01:10
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