Repository navigation
Conversation
History read the SQL history feature in its constructor. The service is created before the user is authenticated (the response renderer needs the console), so it kept the empty relation parameters and the history was never saved to nor read from the configuration storage. Read the relation parameters when they are needed instead. Signed-off-by: Магда М.Г. <mail@mgmagda.ru>
| private function getSqlHistoryFeature(): SqlHistoryFeature|null | ||
| { | ||
| $this->sqlHistoryFeature = $relation->getRelationParameters()->sqlHistoryFeature; | ||
| return $this->relation->getRelationParameters()->sqlHistoryFeature; |
Contributor
There was a problem hiding this comment.
You don't need a method for one line and you definitely don't need that comment.
Author
There was a problem hiding this comment.
Done: removed the method and the comment, the lookup is inline now.
Signed-off-by: Магда М.Г. <mail@mgmagda.ru>
kamil-tekiela
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With the configuration storage and
$cfg['QueryHistoryDB'] = true, the console history tab stays empty and nothing is written topma__history.Console\HistoryreadssqlHistoryFeaturein its constructor. The service is built early, before authentication (theResponseRendererneedsHeader->Console->History, e.g. inTokenRequestParamChecking), when the relation parameters are still empty.Authenticationlater callsinitRelationParamsCache(), butHistorykeeps the empty value for the whole request.To reproduce: configure pmadb with the history table, enable
QueryHistoryDB, run a few queries and open the console History tab, or checkpma__history.The feature is now read from
Relationwhen it is used. Addedtests/unit/Console/HistoryTest.php, which fails without the change.Signed-off-byline as described in our DCO. This ensures that the work you're submitting is your own creation.