MediaWiki REL1_30
ComposerHookHandler.php
Go to the documentation of this file.
1<?php
2
3use Composer\Package\Package;
4use Composer\Script\Event;
5
6$GLOBALS['IP'] = __DIR__ . '/../../';
7require_once __DIR__ . '/../AutoLoader.php';
8
14
15 public static function onPreUpdate( Event $event ) {
17 }
18
19 public static function onPreInstall( Event $event ) {
21 }
22
23 private static function handleChangeEvent( Event $event ) {
24 $package = $event->getComposer()->getPackage();
25
26 if ( $package instanceof Package ) {
27 $packageModifier = new ComposerPackageModifier(
28 $package,
31 );
32
33 $packageModifier->setProvidesMediaWiki();
34 }
35 }
36
37}
$GLOBALS['IP']
@licence GNU GPL v2+
static handleChangeEvent(Event $event)
static onPreInstall(Event $event)
static onPreUpdate(Event $event)
Provides access to MediaWiki's version without requiring MediaWiki (or anything else) being loaded fi...