Hi Jeroen,
ok, as far as I understand include_once( __DIR__ . '/vendor/autoload.php' ); ...is meant to be... require_once( __DIR__ . '/../vendor/autoload.php' ); ...and autoload.php will resist in wikiroot/vendor together with additional packages which are not mediawiki-extensions. We do not need multiple autoloader.php. Then I can follow your blog instructions. >I'm not sure what you mean by this. Well for example if I want to install an extension locally from disk (zip-archive) into directory extensions I have to change the global composer.json under wikiroot ("packagist": false etc.). Or is there another workflow? Or is there a way to target different sections of the entry "repositories": in the global composer.json under wikiroot? cheers. -----Ursprüngliche Nachricht----- Von: Jeroen De Dauw [mailto:jeroended...@gmail.com] Gesendet: Dienstag, 26. November 2013 03:48 An: Lists Cc: Semantic MediaWiki developers Betreff: Re: [SMW-devel] raising composer features 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