Hey Lists,

> But some extensions are now in wikiroot/vendor others in
wikiroot/extensions

The idea here is that extensions end up in wikiroot/extensions, and all
other packages end up in wikiroot/vendor. This should already be the case
when doing an SMW install. Though not all my packages have been updated to
use the mediawiki-extension type yet, so some extensions might currently be
ending up in wikiroot/vendor, which will be fixed in due time.

What about:
> include_once( __DIR__ . '/vendor/autoload.php' );
>
> Befor I begin to make my extensions composer compatible I want to make
> clear
> what I have to include.
>
> In the entry point of SMW it tries to include autoload with:
>
> include_once( __DIR__ . '/vendor/autoload.php' );
>
> ...but in extensions/SemanticMediawiki resist no "autoload.php".
>
> ...does...
>
> "autoload": {
> "files": ["MyExtension.php"]
>
> ...mean I'am a substitution of "autoload.php"?
>

If you want to make your package installable via Composer, you just need to
correctly specify things in the autoload section, as I described in my blog
post. If you are writing a MediaWiki extension, you do not need to bother
with the composer autoloader, or even really know it exists.

The autoloader is supposed to be included by the package into which the
Composer install is done. In our case this is MediaWiki core (or the
Extension Installer). You thus can provide support for installing
dependencies into a MediaWiki extension, as SMW has been doing for a while.
This supports an entirely different workflow then the one I'm recommending
MediaWiki users to follow though. It is mainly of use to developers. For
instance, you can include the autoloader from your test bootstarp, so one
can clone a project and just run phpunit, without having to set things up
manually. Example:
https://github.com/DataValues/Geo/blob/master/tests/bootstrap.php

By the way after installing subpages in a second turn SMW was uninstalled!
> ;-). Might be because of my composer.json...I replaced the require
> statements.
>

Well doh! If you remove the package from your package list, Composer will
be helpful and clean it up for you next time you run its updater!

Any ideas how to implement partial updates and different repositories?
>

I'm not sure what you mean by this. Can you detail what this functionality
would entail and why it is useful?

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil. ~=[,,_,,]:3
--
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to