jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/360901 )

Change subject: docparser: Fix handling for fake trait constructors
......................................................................


docparser: Fix handling for fake trait constructors

I forgot about them in 85e3070600e2c76e699ddbaab12b067a16d99463,
which caused us not to generate any test cases for configuration
options provided by mixins/traits.

Change-Id: I2c7f3354cbb0b82f876ab4ecdebfacab33a2c43e
---
M bin/docparser.rb
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/bin/docparser.rb b/bin/docparser.rb
index 7bdff9c..bb814f0 100644
--- a/bin/docparser.rb
+++ b/bin/docparser.rb
@@ -73,6 +73,7 @@
 
                js_class_constructor = false
                js_class_constructor_desc = ''
+               php_trait_constructor = false
                ignore = false
 
                comment, code_line = d.split '*/'
@@ -223,6 +224,7 @@
                                data[:static] = true if static
                                data[:parent] = cleanup_class_name(parent) if 
parent
                                data[:name] ||= cleanup_class_name(name)
+                               php_trait_constructor = true if kind == :method 
&& data[:name] == 'initialize' + current_class[:name]
                        end
                end
 
@@ -237,7 +239,8 @@
                end
 
                # standardize
-               if data[:name] == '__construct' || js_class_constructor
+               # (also handle fake constructors for traits)
+               if data[:name] == '__construct' || js_class_constructor || 
php_trait_constructor
                        data[:name] = '#constructor'
                end
 

-- 
To view, visit https://gerrit.wikimedia.org/r/360901
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c7f3354cbb0b82f876ab4ecdebfacab33a2c43e
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to