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 build failures #15016
Fix build failures #15016
Conversation
…allows subtable IDs to be hidden)
@@ -63,7 +63,7 @@ public function getApiForTesting() | |||
'date' => '2010-01-01', | |||
'periods' => 'year', | |||
'testSuffix' => 'phpSerialized', | |||
'format' => 'original', | |||
'format' => 'php', |
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.
@katebutler as discussed we probably need to adjust instead the original handler to respect hideIdSubDatatable
. The test was added to ensure when the dataTable object is serialized that no random information is being added see 46ed8c2 . But now an array is serialized and the actual logic is no longer tested. If possible be good to still use original
and also add a comment that this test is testing the serialized DataTable
plugins/API/Renderer/Original.php
Outdated
|
||
public function removeIdSubDataTables($response) | ||
{ | ||
$response = preg_replace('/"subtableId";i:[\d]+;/', '', $response); |
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.
@katebutler to possibly avoid regexes would it be better to do something similar as in PHP renderer where we iterate over all rows and then call in this case $row->removeSubtable()
like
if ($this->hide...) {
foreach ($table->getRows() as $row) {
$row->removeSubtable();
}
}
haven't tested but could work
…cted file; force rowMetadata 'segment' value to string type
No description provided.