MediaWiki  1.30.0
autoload.ide.php File Reference

This file is PHPUnit autoload file for PhpStorm IDE and other JetBrains IDEs. More...

Go to the source code of this file.

Variables

global $argv = '--wiki'
 
global $IP
 
 $maintenance = new PHPUnitMaintClass()
 
if(file_exists("$IP/StartProfiler.php")) $requireOnceGlobalsScope
 
 $self = $maintenance->getName()
 
 $wgProfiler = []
 
foreach(array_keys( $GLOBALS) as $varName) if(is_readable("$IP/vendor/autoload.php")) if(defined( 'MW_CONFIG_CALLBACK')) else
 

Detailed Description

This file is PHPUnit autoload file for PhpStorm IDE and other JetBrains IDEs.

This file should be set in Languages and frameworks > PHP > PhpUnit select Use Composer autoloader and set Path to script to <path to this file>. After that, tests can be run in PhpStorm using Right-click > Run or Ctrl + Shift + F10. Also, tests can be run with debugger very easily.

This file basically does almost the same thing as tests/phpunit/phpunit.php, except that all code is going to be executed inside some function, so some hacks needed to make old code to be executed as if it was executed on top of the execution stack.

PS: Mostly it is copy-paste from phpunit.php and doMaintenance.php.

Definition in file autoload.ide.php.

Variable Documentation

◆ $argv

◆ $IP

Definition at line 40 of file autoload.ide.php.

◆ $maintenance

$maintenance = new PHPUnitMaintClass()

Definition at line 32 of file autoload.ide.php.

◆ $requireOnceGlobalsScope

if (file_exists("$IP/StartProfiler.php")) $requireOnceGlobalsScope
Initial value:
= function ( $file ) use ( $self ) {
foreach ( array_keys( $GLOBALS ) as $varName ) {
eval( sprintf( 'global $%s;', $varName ) );
}
require_once $file;
unset( $file );
$definedVars = get_defined_vars();
foreach ( $definedVars as $varName => $value ) {
eval( sprintf( 'global $%s; $%s = $value;', $varName, $varName ) );
}
}

Definition at line 52 of file autoload.ide.php.

◆ $self

$self = $maintenance->getName()

Definition at line 39 of file autoload.ide.php.

◆ $wgProfiler

$wgProfiler = []

Definition at line 47 of file autoload.ide.php.

◆ else

foreach (array_keys($GLOBALS) as $varName) if (is_readable("$IP/vendor/autoload.php")) if (defined('MW_CONFIG_CALLBACK')) else
Initial value:
{
require $maintenance->loadSettings()

Definition at line 83 of file autoload.ide.php.

use
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: MIT-LICENSE.txt:10
$maintenance
$maintenance
Definition: autoload.ide.php:32
$self
$self
Definition: autoload.ide.php:39
$GLOBALS
$GLOBALS['wgAutoloadClasses']['LocalisationUpdate']
Definition: Autoload.php:10
$value
$value
Definition: styleTest.css.php:45
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9