[Wikidata-bugs] [Maniphest] [Commented On] T122748: Support putting extension.json in a callback

2016-01-02 Thread Paladox
Paladox added a comment.

Well because wikibase file looks like for example 
https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/master/client/WikibaseClient.php
 some is a callback and some isen't.  The extension fails because some of the 
code should be outside of the callback and the rest in the callback.

What I think we should do is have an extension.json file that is the main file 
then add code for "example require-extension":"extension2.json." that will hold 
the callback.


TASK DETAIL
  https://phabricator.wikimedia.org/T122748

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Paladox
Cc: Florian, Legoktm, Aklapper, Paladox, StudiesWorld, Wikidata-bugs, aude, 
Mbch331, Krenair



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T122748: Support putting extension.json in a callback

2016-01-02 Thread Florian
Florian added a comment.

"putting extension.json in a callback" doesn't make sense for me :)

I'm pretty sure, if Wikibase will be converted to extension.json, that it will 
work with the current implemenation of ExtensionRegistration :)

In https://phabricator.wikimedia.org/T122748#1912873, @Paladox wrote:

> "CallbackConfig": {
>  "config": {},
>  "AutoloadClasses": {}
>  }


That looks like you propose to allow a dirty nesting of extensionregistration 
keys. How would this be processed? I'm pretty sure, this will not find a way 
into our code, it's pretty useless.

I think you misunderstand the use of call_user_func(), right? I'm not sure, why 
Wikibase do that, but this (from my point of view) doesn't need (and can) be 
migrated to extension registration.


TASK DETAIL
  https://phabricator.wikimedia.org/T122748

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Florian
Cc: Florian, Legoktm, Aklapper, Paladox, StudiesWorld, Wikidata-bugs, aude, 
Mbch331, Krenair



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T122748: Support putting extension.json in a callback

2016-01-02 Thread Florian
Florian added a subscriber: Florian.
Florian added a comment.

I really don't understand, what you mean/want? What should be run in a callback 
and why?


TASK DETAIL
  https://phabricator.wikimedia.org/T122748

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Florian
Cc: Florian, Legoktm, Aklapper, Paladox, StudiesWorld, Wikidata-bugs, aude, 
Mbch331, Krenair



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T122748: Support putting extension.json in a callback

2016-01-02 Thread Florian
Florian added a comment.

In https://phabricator.wikimedia.org/T122748#1912840, @Paladox wrote:

> What I think we should do is have an extension.json file that is the main 
> file then add code for "example require-extension":"extension2.json." that 
> will hold the callback.


I'm not sure, how you would implement this, and why, but I would say: no, we 
don't need this :)

The question still is: What is the goal you want to achieve? The extension.json 
is simply a descriptor file, it doesn't hold any logic, it simply tells the 
ExtensionProcessor what to do. I actually does not understand what you want to 
fix, because I don't see any broken behaviour. Maybe you can give clear steps 
to reproduce your problem, with the expected and the observed behaviour :)


TASK DETAIL
  https://phabricator.wikimedia.org/T122748

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Florian
Cc: Florian, Legoktm, Aklapper, Paladox, StudiesWorld, Wikidata-bugs, aude, 
Mbch331, Krenair



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T122748: Support putting extension.json in a callback

2016-01-02 Thread Paladox
Paladox added a comment.

Sorry I doint have steps to reproduce since it isent broken. this is a feature 
request.

Currently wikibase uses callbacks for some of its code.

In extension.json to do a callback you have to set "callback": 
"example::example" but if you have most of your code that needs to be in a 
callback that makes the extension.json file useless since we might as well set 
it in the php file.

We should have the ability to set extension.json in a callback.

I am not sure if this is possible but could it be done like this

"CallbackConfig": {
"config": {},
"AutoloadClasses": {}
}


TASK DETAIL
  https://phabricator.wikimedia.org/T122748

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Paladox
Cc: Florian, Legoktm, Aklapper, Paladox, StudiesWorld, Wikidata-bugs, aude, 
Mbch331, Krenair



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T122748: Support putting extension.json in a callback

2016-01-02 Thread Paladox
Paladox added a comment.

The workaround is to be everything in the callback hook in extension.json which 
would make the file pointless if we have too do that.


TASK DETAIL
  https://phabricator.wikimedia.org/T122748

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Paladox
Cc: Legoktm, Aklapper, Paladox, StudiesWorld, Wikidata-bugs, aude, Mbch331, 
Krenair



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T122748: Support putting extension.json in a callback

2016-01-02 Thread Paladox
Paladox added a comment.

How can I migrate wikibase to extension registration since I have tried here 
https://gerrit.wikimedia.org/r/#/c/229119/ but keeps failing and I am not sure 
why.


TASK DETAIL
  https://phabricator.wikimedia.org/T122748

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Paladox
Cc: Florian, Legoktm, Aklapper, Paladox, StudiesWorld, Wikidata-bugs, aude, 
Mbch331, Krenair



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs