Le 26/11/13 22:12, Tyler Romeo a écrit :
> Hey everybody,
> 
> tl;dr - How do we add 3rd party libs to core: composer, git submodules, or
> copying the code?

Hello,

Thank you for bringing the subject there. A few folks are eager to have
composer support for MediaWiki / extensions.  I could not find anytime
to work on it though :-(

Basically:

We tend to copy code and let it bit rot. At least there is no unexpected
breakage.

 Git submodules are a mess, needs to download code from github/whatever.
And I tend to dislike submodules.

Result: we need a dependency manager
Fact: Composer is more modern than pear


You should talk about it with Jeroen De Dauw. Since I talked about
composer with him he converted all his extensions to it and seems to
really want us to finally use composer for everything.  He largely
rewrote the lame page I have dumped a year ago at
https://www.mediawiki.org/wiki/Composer

As usual with Jeroen, it is fully documented with nice examples and step
by step tutorials. Definitely worth a read.

Also look at:
 
http://www.bn2vs.com/blog/2013/11/24/introduction-to-composer-for-mediawiki-developers/


<snip>
> Also, just to clarify, this is not an out-of-the-blue request for comment.
> I am currently considering whether we might want to replace our
> HttpFunctions file with the third-party Guzzle library, since the latter is
> very stable, much much more functional, and a lot easier to use. However,
> this is out-of-scope for the discussion, so if you have an opinion on
> whether doing this is a good/bad idea, please start another thread.

We invented the wheel but forgot to evangelize our classes or make them
easy to reuse.  So we are left with a bunch of code which is robust but
has counterpart which are more modern / populars.  I wish years ago we
thought about code reusability and publishing our classes as easy to use
modules.  We would have ended up as a leading PHP group, that was not a
priority though, the Wikimedia sites is.


You could start out a RFC to identify class that be replaced by a better
third party libraries.  I don't mind.

Symfony (a french PHP framework which is really spring for PHP) has a
bunch of reusable components:

 http://symfony.com/components

Among them:
  Console : could a bunch of our Maintenance class
  HttpFoundation : what you said, HTTP on rails
  Routing : do we have a router?
  ..

cheers,

-- 
Antoine "hashar" Musso


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to