Commit graph

34 commits

Author SHA1 Message Date
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Ricordisamoa
36797512ce Remove obsolete ignored path from maintenance/checkSyntax.php
includes/NamespaceCompat.php has been deleted in 2010
with commit 38e663d0ed

Change-Id: I258a6e458c55871279895f2a78e076ea79e91f44
2016-02-17 00:45:38 +01:00
Ricordisamoa
e3debf80f2 Remove PHP < 5.3 support from maintenance/checkSyntax.php
Change-Id: I2b8e941ef036b8de499a45cf077b07d3f4957540
2016-02-11 09:51:01 +01:00
Max Semenik
59db24e90b Use addDescription() instead of accessing mDescription directly
Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
2016-01-30 01:28:32 -08:00
Kunal Mehta
f6e5079a69 Use mediawiki/at-ease library for suppressing warnings
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.

Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.

Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.

Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
2015-06-11 18:49:29 +00:00
umherirrender
b409008ca5 Remove wrong @return from doc blocks
These functions actually does not return anything, so the @return is
wrong here. '@return void' is ignored.

Change-Id: I11495ee05b943c16c1c4715d617c8b50de22276c
2014-08-25 13:50:05 +00:00
Siebrand Mazeland
f2f31fadc7 Update formatting in maintenance/ (2/4)
Change-Id: I2b791d3bff0de464b6bdaaeae0622c065389c31c
2014-04-23 20:08:42 +02:00
Siebrand Mazeland
ebbf031774 Pass phpcs-strict on maintenance/ (7/8)
Change-Id: Ibb03a775055c687a4c5bc6864172e043d3a7e3d8
2014-04-23 12:16:10 +02:00
umherirrender
e78776373e Fixed some @params documentation (maintenance)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I727deec35a712de0f0c676cc87dfa661f1ee965b
2014-04-17 22:48:32 +02:00
Chad Horohoe
4d6dad7100 Remove vestiges of AdminSettings.php
This has been deprecated and mostly unused for quite some time.
Remove the few remaining uses that exist.

Change-Id: I522ef138d291cf7567250fef1de34bb41673bc6c
2014-01-29 15:09:33 -08:00
Timo Tijhof
beb1c4a0ec phpcs: More require/include is not a function
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.

Also updated usage in text in documentation and the
installer LocalSettingsGenerator.

Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;

Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
2013-05-21 23:26:28 +02:00
Timo Tijhof
50e7985d4d phpcs: Fix WhiteSpace.LanguageConstructSpacing warnings
Squiz.WhiteSpace.LanguageConstructSpacing:
   Language constructs must be followed by a single space;
   expected "require_once expression" but found
   "require_once(expression)"

It is a keyword (e.g. like `new`, `return` and `print`). As
such the parentheses don't make sense.

Per our code conventions, we use a space after keywords like
these. We appeared to have an unwritten exception for `require`
that doesn't make sense. About 60% of require/include usage
was missing the space and/or had superfluous parentheses.

It is as silly as print("foo") or return("foo"), it works
because keywords have no significance for whitespace between
it and the expression that follows, and since experessions can
be wrapped in parentheses for clarity (e.g. when doing string
concatenation or mathematical operations) the parenthesis
before and after basiclaly just ignored.

Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
2013-05-09 05:56:26 +02:00
umherirrender
b114f5e1c1 Fixed some spacing in maintenance folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I9657f72996358f8c1c154cea1ea97970d973723c
2013-04-18 20:48:44 +02:00
Antoine Musso
f6b92231fd style: normalize end of files
By PSR2 PHP Standard, the files should ends with exactly one newline.
Some of our files have 2 or more and some other were missing a newline.

Fix almost all occurences of CodeSniffer sniff:
PSR2.Files.EndFileNewline.TooMany

I have not fixed the selenium files, I believe we will drop them.

Change-Id: I89fca8c1786fee94855b7b77bb0f364001ee84b6
2013-02-03 15:04:39 +01:00
jeroendedauw
38c7f444e1 Use __DIR__ instead of dirname( __FILE__ )
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)

Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
2012-08-27 21:45:00 +02:00
Alexandre Emsenhuber
9eee3153ae Improve documentation of maintenance scripts.
Change-Id: I328a3d42a09f2b082ebc153c2f399793e23942d7
2012-06-16 22:59:39 +02:00
Kevin Israel
2fc34e30f4 (bug 35749) Update checkSyntax.php to use Git
checkSyntax.php now uses git commands to retrieve a list of modified
files instead of the svn command-line client.

The script now considers any files that have been changed since
the nearest common ancestor to the master branch to be "modified",
as it is probably desirable to include files modified in previous
commits on the same local topic branch that have not yet made it
into master.

Change-Id: I0d4a02d4591242a9fd45291f5c4230c535e861b3
2012-04-06 00:36:39 -04:00
Sam Reed
e336b5e951 Remove some unused getting of non existent arguments
Documentation
2011-10-18 17:31:54 +00:00
Chad Horohoe
f1cd059859 Bunch of error suppression operator fixes (bug 2011-07-06 21:57:44 +00:00
Chad Horohoe
e6fd7607d7 Add check for evil, EVIL @ 2011-05-15 14:32:49 +00:00
Alexandre Emsenhuber
2e7cde3370 Fix directory name, mw-config, not config 2011-05-15 14:15:43 +00:00
Chad Horohoe
26505b170a Fix concern raised by Brion in r74108 (but has really existed since the maintenance rewrite). Right now, including a maintenance script causes it to execute. This is bad when you want to reuse the particular class but not have it start executing all by itself.
Until now, we relied on setting MW_NO_SETUP which was a) hacky, b) irreversable, and c) likely to be forgotten if you didn't use one of the wrappers like runChild().

Instead, move the freaky magic to doMaintenance and have *it* check if it's in a specific call stack that indicates this is being run from the file scope and should be executed. Rename DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN so it's nice and clear what magic happens behind the require_once().
2011-01-13 22:58:55 +00:00
Mark A. Hershberger
617a5b1e15 Whitespace fixup under tha maint directory. 2010-12-04 03:20:14 +00:00
Alexandre Emsenhuber
60588f1f9c Fix path 2010-11-21 15:44:46 +00:00
Sam Reed
39c005ca79 bug 25517 Assignment in conditions should be avoided/ http://www.mediawiki.org/wiki/Manual:Coding_conventions#Assignment_expressions 2010-11-01 00:07:17 +00:00
Alexandre Emsenhuber
066984cbe3 * Standardised file description headers
* added @file where needed
* added file description headers where needed
2010-09-05 13:15:48 +00:00
Sam Reed
6afa6c6ab5 Fix some wrong usages of static method calls (actually belong to class instance) 2010-07-25 18:00:32 +00:00
Alexandre Emsenhuber
3e87ac3ab3 Missing line break 2010-06-06 13:31:44 +00:00
Sam Reed
659778619c Stylize maintenance folder.. 2010-05-22 16:50:39 +00:00
Max Semenik
2054cb6307 checkSyntax: fixed check for exclusions on Windows 2010-04-08 15:55:59 +00:00
Chad Horohoe
9b5196a68d Fix child class visibility 2010-03-10 12:59:44 +00:00
Alexandre Emsenhuber
d32bacd5a5 There's also File_Ogg in MetavidWiki extension ;) 2010-03-08 20:39:47 +00:00
Alexandre Emsenhuber
d34719b7b4 Follow-up r63292: this one is no longer needed 2010-03-05 21:31:35 +00:00
Max Semenik
210d9a402d Renamed syntaxChecker.php --> checkSyntax, our convention seems to prefer verbs. Also, fixed it to handle --modified with renamed files correctly :P 2010-02-24 17:21:48 +00:00
Renamed from maintenance/syntaxChecker.php (Browse further)