-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
[REF][PHP8.1] Fix test failure on civiimport unit test because sequen… #24736
Conversation
(Standard links)
|
ext/civiimport/Civi/BAO/Import.php
Outdated
if (!isset($keys)) { | ||
$keys = ['_id']; | ||
} | ||
return $keys; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have all this rather than just return ['_id']
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok updated to that @eileenmcnaughton
ext/civiimport/Civi/BAO/Import.php
Outdated
public function sequenceKey() { | ||
static $sequenceKeys; | ||
if (!isset($sequenceKeys)) { | ||
$sequenceKeys = [$this->getFirstPrimaryKey(), TRUE]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we could also just return ['_id', TRUE]
here - seems overly complicated to be setting statics & calling functions when the known thing is that it is _id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok updated @eileenmcnaughton
…ce key and keys are using id not _id Additional patches from Eileen
7d600ab
to
2100b9a
Compare
…ce key and keys are using id not _id
Overview
This fixes the following test failure
Before
Test fails on php8.1
After
Test passes on php8.1