Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Note: This issue is reserved for an intern applicant at MD Systems. Please do not work on this unless assigned to it by us :)
Problem/Motivation
The interface committed in #2754253: Lack of standard result in collaboration of analyzers does not really contribute in any way, as there is already AnalyzerResultInterface.
Proposed resolution
Delete DefaultAnalyzerResultInterface.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#19 | interdiff-2770667-16-19.txt | 1.58 KB | toncic |
#19 | remove-2770667-19.patch | 8.7 KB | toncic |
| |||
#16 | interdiff-2770667-14-16.txt | 1.96 KB | toncic |
#16 | remove-2770667-16.patch | 8.65 KB | toncic |
| |||
#14 | interdiff-2770667-12-14.txt | 6.17 KB | toncic |
Comments
Comment #2
tduong CreditAttribution: tduong at MD Systems GmbH commentedComment #3
toncic CreditAttribution: toncic at MD Systems GmbH commentedDeleted DefaultAnalyzerResultInterface.
Comment #5
miro_dietikerIt seems there are coincidental changes here from a different issue...
See #2495737: No Past log event if parsing failed.
Plz make sure to only focus on the issue scope with extracting patches.
Comment #6
toncic CreditAttribution: toncic at MD Systems GmbH commentedPatch with only deleted file.
Comment #8
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedTests are failing because class
Drupal\inmail\DefaultAnalyzerResult
still implement this interface. Also, I think Git can be configured to generate more simple / readable patches when deleting or renaming files. Please ping me back Monday about this :).Comment #9
toncic CreditAttribution: toncic at MD Systems GmbH commentedRemoved to implement interface.
Comment #10
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedLooks good to me, setting to RTBC.
Comment #11
miro_dietikerNo, sorry. :-)
The Interface now has the doc blocks. The DefaultAnalyzerResult only refers to documentation through {@inheritdoc}
By dropping the interface, it also means moving the documentation down to DefaultAnalyzerResult.
Comment #12
toncic CreditAttribution: toncic at MD Systems GmbH commentedFixed documentation for functions.
Comment #13
tduong CreditAttribution: tduong at MD Systems GmbH commentedNice :) Just some standard coding fixes:
The description of the param should be below the @param annotation line and indented with 3 white-spaces from the * (see @param documentation, and add the dot at the end of the comment.
Add the $sender type hint.
Missing dot at the end of the sentence. And 3 white-spaces from *. There are many similar places that need to be fixed. Please check the other documentations and fix them accordingly.
This comment is odd imo. Write something like "Determines if the user is authenticated."
Dot instead of semicolon ;)
Missing type hint, as well as many other places. Please check them out.
Missing return description, something like "Contexts array of the given data type, keyed by context name."
Comment #14
toncic CreditAttribution: toncic at MD Systems GmbH commentedFixed coding standards.
Comment #15
tduong CreditAttribution: tduong at MD Systems GmbH commentedGood, looks better. More smell code to be fixed for you :P
Missing dot :P
This should be "or" instead of "on"
Better "The message subject."
Typo: ana --> an
Missing dot :P
4 white spaces instead of 3 :P
Comment #16
toncic CreditAttribution: toncic at MD Systems GmbH commentedFixed coding standard.
Comment #17
toncic CreditAttribution: toncic at MD Systems GmbH commentedComment #18
tduong CreditAttribution: tduong at MD Systems GmbH commentedMuch better :D sorry, few more standards for you ^^'
According to the Drupal API documentation standards, you should use a third person verb to start the summary of a class, interface, or method.
Maybe better "Gets an array of all collected contexts for this analyzer result."
You've missed the last part of the sentence: "Contexts array of the given data type, keyed by context name."
Then probably this should be "Returns the contexts of the given type."
Comment #19
toncic CreditAttribution: toncic at MD Systems GmbH commentedFixed coding standard, I hope :).
Comment #20
tduong CreditAttribution: tduong at MD Systems GmbH commentedYeah, now I guess it is alright! :D
Sorry for being a "too harsh teacher" ;P
Comment #22
miro_dietikerCommitted. We can improve every time we use those methods...
I'm not so happy about the user + account term mixing, but also wasn't sure how to name it clean & consistently.
Comment #23
mbovan CreditAttribution: mbovan as a volunteer and for Google Summer of Code commentedI haven't seen this issue before... Seems like it broke tests in Mailhandler, so created an issue: #2783383: User DefaultAnalyzerResult instead of DefaultAnalyzerResultInterface.
Comment #24
miro_dietiker@mbovan many issues about refactoring inmail are changing APIs and might break mailhandler.
Sorry about that, but cleanup our architecture is more important than a stable API. There are not many integrations yet, so the price isn't too big yet.