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

Upgrade phpunit #1754

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Upgrade phpunit #1754

merged 3 commits into from
Jan 16, 2024

Conversation

dracos
Copy link
Member

@dracos dracos commented Dec 18, 2023

No description provided.

@dracos dracos requested a review from ajparsons December 18, 2023 14:13
@dracos
Copy link
Member Author

dracos commented Dec 18, 2023

Not sure about the SQL change for the party cohort group by...

@dracos
Copy link
Member Author

dracos commented Dec 18, 2023

Though if we're dropping that query entirely, guess that doesn't matter so much!

Copy link
Contributor

@ajparsons ajparsons left a comment

Choose a reason for hiding this comment

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

Meta-yes - the cohort query is redundant soon - but I think it makes sense.

As I understand it:

This is fixing a problem in the query where we want to ensure the cohort key is membership dates and party IN ORDER - and the extra subquery here is needed to ensure that (the order by is the wrong way to do it).

This makes sense to me - according to past me it doesn't matter for party switchers that their cohort key is the original party (because it's just trying to create a unique set), so that's fine.

I've rerun the party policy generation on this branch and on a quick check it puts out the right number of cohorts and public numbers seem to be ok. So if that was the only unclear bit (proof of the rest of it is that the tests pass?) - can be merged.

@ajparsons
Copy link
Contributor

Fixup commit for getRecentDebatesWithDivisions: where changing some to mins affected the field names used later on.

Translation currently fails here because of 'Maximum term length is 255 characters' in master. Can be fixed separately, but not an error here.

@@ -161,9 +161,9 @@ public function getRecentDebatesWithDivisions($number = 20, $majors = null) {
$debate_gid = fix_gid_from_db($debate['debate_gid']);
$anchor = '';
if ($debate['c'] == 1) {
$anchor = '#g' . gid_to_anchor(fix_gid_from_db($debate['gid']));
$anchor = '#g' . gid_to_anchor(fix_gid_from_db($debate['debate_gid']));
Copy link
Member Author

@dracos dracos Jan 16, 2024

Choose a reason for hiding this comment

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

I think this needs to remain gid and the "min(h.gid)" needs an "as gid" adding, rather than switch to a different gid. I'll do it, just noting in case I'm wrong!

Empty IN, bool ints, strict group by.
Need to turn off deprecation warnings for tests to pass (e.g. some
output in the middle of a string being tested on), but will need to be
reactivated and issues fixed before PHP9.
@dracos dracos merged commit 2d9398c into master Jan 16, 2024
7 of 8 checks passed
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