This task is for a new student in MD Systems, don't do it if it was not assigned to you.
Problem Description:
#2536418: Create a method/property for SourcePluginUiBase moved some code of the SourcePlugins to a base class which all SourcePlugins extend. The overviewForm() and overviewSubmitForm() methods in LocaleSourcePluginUi have an outdated PHPDoc, the other classes (including the base class) are trying to inherit their PHPDoc, but there is nothing to inherit.
Proposed Resoluton:
Update the documentation, as the interface it mentions does no longer exist.
The PHPDoc in LocaleSourcePluginUi should probably move to the SourcePluginUiInterface. Then the other Plugins can succesfully inherit the PHPDoc from the base class. Maybe there are some more methods which need documentation and should be added to the Interface.
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | add_missing-2539332-24.patch | 2.14 KB | Bambell |
Comments
Comment #1
LKS90 commentedComment #2
MatejZmitko commentedComment #3
MatejZmitko commentedComment #5
johnchqueComment #6
MatejZmitko commentedComment #7
Bambell commentedHi @MatejZmitko. Here are some thoughts :
Looking at the issue summary, it states that methods
overviewFormandoverviewSubmitForm(should readoverviewFormSubmit) ofLocaleSourcePluginUihave outdated documentation. You got that right. Looking at those functions, we see that the documentation states that those methods implement interfaceTMGMTSourceUIControllerInterfacewhich, if you search carefully (or with PHPStorm'sctrl+shift+Ffunctionality) doesn't exist anymore. FurtherLocaleSourcePluginUinow extendsSourcePluginUiBasewhich define / have an implementation for methodsoverviewFormandoverviewFormSubmit, so those two methods inLocaleSourcePluginUiare actually overriding those of the parent class (inheritance =@inheritdoc). We see that the documentation for those two functions inSourcePluginUiBasemention{@inheritdoc}, but that class doesn't inherit any class that contain those functions. The issue summary states that you should "[Move] the PHPDoc inLocaleSourcePluginUi[to]SourcePluginUiInterface". However, the interface doesn't define those methods, so the methods in the base class should be documented. Those two methods in the base class are overridden inConfigSourcePluginUi,ContentEntitySourcePluginUiandLocaleSourcePluginUi. In the first two classes, the methods try to inherit documentation from their parent class and the documentation for the methods inLocaleSourcePluginUiis outdated, as mentioned previously, so the only workaround to this is to write new documentation for the base class and inherit that documentation inLocaleSourcePluginUi. That way, those 3 classes will inherit documentation from their parent class. Those methods appear to take the same parameters asDrupal\tmgmt\SourcePluginUiBase\overviewSearchFormPart, so it would certainly make sense to copy that documentation. Note that only the first of the two methods return something.Hope that helps to move forward with the issue.
Comment #8
MatejZmitko commentedThe first path with fixed mistakes
Comment #9
Bambell commentedCan this be removed?
Sorry for the poor advise, but
form_stateisn't an array, but rather an object. This would be more appropriate :I guess the documentation for the other parameters is fine enough.
Comment #10
MatejZmitko commentedComment #11
MatejZmitko commentedComment #12
MatejZmitko commentedComment #13
Bambell commentedIn case it wasn't noticed yet, those files that Git generate are plain text files, so you can open them up with any text editor and investigate their content. As mentioned multiple times already :
"An interdiff is a text file in patch format that describes the changes between two versions of a patch.".
https://www.drupal.org/documentation/git/interdiff
#12 doesn't correspond to this description; it's #11 with spaces between the
@paramtags.Can you please try uploading again an interdiff of #3 with #11 or better, #8 (preivous patch) with #11?
Comment #14
MatejZmitko commentedComment #15
johnchqueThere should be 3 spaces between '*' and 'The current state...'
Missing . in the end.
Comment #16
MatejZmitko commentedComment #17
Bambell commentedHi @MatejZmitko. I think you forgot to upload the corresponding patch and only uploaded an interdiff. It would also help if you could leave a comment along with your uploads.
Comment #18
MatejZmitko commentedSo, this is the interdiff with all the code modifications between patch #8 and #11.
Comment #19
MatejZmitko commentedSorry for the wrong file naming, should be fine now. An interdiff between patch #8 and #11
Comment #20
Bambell commentedNot yet, unfortunately. This patch is still introducing unneeded spaces. Also, it would help if you could name your patches using the "Patchname suggestion" button :
Comment #21
MatejZmitko commentedFinal patch in this issue, with all needed code modifications.
Comment #22
Bambell commentedLooks good to me, yes. Thanks.
Comment #23
miro_dietiker@Bambell, plz add the missing first line comment summary for the methods.
Comment #24
Bambell commentedAdding a comment to the docblocks.
Comment #25
miro_dietikerCommitted.