aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/autoload.ide.php
Commit message (Collapse)AuthorAgeFilesLines
* Delete autoload.ide.phpAryeh Gregor2018-08-091-103/+0
| | | | | | | | | Unmaintained and possibly doesn't work. If this works and someone actually wants it to continue working, please step up to maintain it, preferably without copy-paste and with tests. Bug: T173899 Change-Id: I19378f8ddcd004af1c92cb45cafe2366ae2f353f
* Setup: Deprecate StartProfiler, move default to DefaultSettingsTimo Tijhof2018-03-291-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $wgProfiler was introduced in 3ea576aa25 (r15605; 2006; MW 1.8). The global was used from the Profiler.php class file, which would be manually from StartProfiler.php, which then (if enabled) assigned the global an actual instance of the Profiler class. We needed it that way because we actually instantiated and used the Profiler object (via wfProfileIn) very early on in WebStart. Specifically, before any settings and classes load. This first changed in 5a6d1ee2d3 (r86228; 2011; MW 1.17). That commit deprecated use of $wgProfiler as an object in favour of assigning it an array that MediaWiki would use to construct the class. Profiling methods were also changed to lazy-instantiate the class, which would first happen via a wfProfileIn() call two lines before loading DefaultSettings and LocalSettings. Some more relevant clean up happened in a0123d0549 (r89206; 2011). Now, in 2018, we don't actually lazy-instantiate the Profiler until after DefaultSetting and LocalSettings load. As such, I think we can finally get rid of its out-of-bound load strategy. Instead, we can simply set the default in DefaultSettings, and recommend admins to set their value in LocalSettings. Bug: T189966 Change-Id: I4e8dd9558132a5e38c22b26fed9c4b54cd324da7
* Use ::class to resolve class names in testsUmherirrender2018-01-261-1/+1
| | | | | | | This helps to find renamed or misspelled classes earlier. Phan will check the class names Change-Id: Ie541a7baae10ab6f5c13f95ac2ff6598b8f8950c
* Setup: Include StartProfiler before othersTimo Tijhof2017-11-091-4/+3
| | | | | Bug: T180183 Change-Id: Ibcf78d094cf4dcf09bc919a5f8168f45ae225ebc
* Merge ProfilerFunctions into GlobalFunctionsTimo Tijhof2017-11-091-2/+0
| | | | | | | | | | | Even if people use these (deprecated) functions in the earliest hooks or in LocalSettings.php, it will keep working because GlobalFunctions is loaded between DefaultSettings.php and LocalSettings.php. The only places affected would be files in core: AutoLoader.php, Defines.php, and DefaultSettings.php, which don't use these functions. Change-Id: If4c0e8cbe1ea918283df22d72f792a3806569216
* Miscellaneous indentation tweaksBartosz DziewoƄski2017-02-271-3/+6
| | | | | | | | | | I was bored. What? Don't look at me that way. I mostly targetted mixed tabs and spaces, but others were not spared. Note that some of the whitespace changes are inside HTML output, extended regexps or SQL snippets. Change-Id: Ie206cc946459f6befcfc2d520e35ad3ea3c0f1e0
* PHPUnit autoload file for PhpStormAleksey Bekh-Ivanov (WMDE)2017-01-311-0/+109
`autoload.ide.php` is PhpUnit entry point 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 `tests/phpunit/autoload.ide.php` After that, tests can be run in PhpStorm using Right-click > Run or `Ctrl + Shift + F10`. Also, tests can be run with debugger. `autoload.ide.php` basically does almost the same thing as `tests/phpunit/phpunit.php`, except that all code is 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`. Change-Id: Idcee38d149542f747ed52c8c9491c6651a0581d9