Commit graph

60 commits

Author SHA1 Message Date
jenkins-bot
8a7e518da0 Merge "Don't run phpcs on node_modules folder" 2015-05-28 18:28:35 +00:00
jdlrobson
479b57720b Don't run phpcs on node_modules folder
This is an artifact created by npm in certain modules. These modules
may contain PHP e.g. grunt-phpdocumentor

Change-Id: Ie46bceb5acbe6141d1e0dc4d3397d04f41d01485
2015-05-28 19:08:42 +02:00
Bryan Davis
7bd889ee04 Bump composer-merge-plugin to v1.1.0
Bug: T97560
Change-Id: Idc3ae196f7fc9483f5c474b32d92e30be8325d62
2015-05-28 03:37:28 +00:00
kaldari
e1611fec8d Merge "Bumping lightncandy version from 0.18 to 0.21" 2015-05-20 21:47:14 +00:00
kaldari
a58bf0b3e1 Bumping lightncandy version from 0.18 to 0.21
See also change in vendor repo: I0ba740a88b636a9c1

Change-Id: Idbcc356595db2ceb267690570ef23cd08294426e
2015-05-15 22:26:39 +00:00
James D. Forrester
6c98f7d1c6 Update OOjs UI to v0.11.3
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.11.3/History.md

Change-Id: I3b1ffc8fd346bb6cc8f1029f64e4855afa1db168
2015-05-12 13:27:49 +01:00
jenkins-bot
51b498240f Merge "Start using the Assert helper class for checking parameters." 2015-05-11 18:15:44 +00:00
daniel
7081228214 Start using the Assert helper class for checking parameters.
This introduces https://github.com/wmde/Assert as a dependency,
as discussed in the RFC T91071.

This change uses assertions to check some parameters in some places,
to showcase the main intended use case for assertions in MediaWiki.

Bug: T91071
Change-Id: I93ac39b7c146f10532e37b51d973b59b9c424b2f
2015-05-11 17:54:07 +00:00
James D. Forrester
dfdf72045f Update OOjs UI to v0.11.2
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.11.2/History.md

Change-Id: I0188c5b80958d9a6a3d063292df724f507b7287f
2015-05-11 18:31:01 +01:00
James D. Forrester
9ca24dc486 Update OOjs UI to v0.11.1
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.11.1/History.md

Change-Id: I8774390ed8393801212f2270a786984687794aeb
2015-05-04 17:49:15 -07:00
Bartosz Dziewoński
5d62627a21 Update OOjs UI to v0.11.0
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.11.0/History.md

Local changes to accommodate for font-size change.

This is a total hack. Sorry. I will get it killed.

Bug: T91152
Change-Id: Ie69d14b9094b8cbd4e051985ffd6aaac490be3a6
2015-04-29 18:53:56 -07:00
James D. Forrester
ab0fd51b1e Update OOjs UI to v0.10.1
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.10.1/History.md

Change-Id: If390a691c73491be4f080e70788b6b8b8f698be0
2015-04-27 10:24:13 -07:00
James D. Forrester
87619fe704 Update OOjs UI to v0.10.0
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.10.0/History.md

Change-Id: If8cd89dd0035fb570f69c56855c048612971ee91
2015-04-22 18:23:46 -07:00
Timo Tijhof
38e9c763f4 Update OOjs UI to v0.9.8
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.9.8/History.md

Change-Id: I369a24f74c455cd42571718a7b0078fd24c5f25e
2015-04-12 18:25:32 +01:00
Roan Kattouw
17f469814f Update OOjs UI to v0.9.7
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.9.7/History.md

Change-Id: I6548deccf1bce60873ed16229905cfa5790ec4a0
2015-04-03 15:06:31 -07:00
jenkins-bot
b594c133f3 Merge "Use wikimedia/utfnormal library, add backwards-compatability layer" 2015-03-31 00:51:16 +00:00
James D. Forrester
f77b9bcc2c Update OOjs UI to v0.9.4
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.9.4/History.md

Change-Id: I0ab9ef6d67e16379785e143cb20ae8de7fe78a7e
2015-03-25 15:27:02 -07:00
Kunal Mehta
13975fe76a Use wikimedia/utfnormal library, add backwards-compatability layer
This drops support for the custom utf8 normal PHP extension in favor
of the intl extension.

Bug: T90825
Change-Id: Ifbaeb2ef684217cf6187ccc4fb4d303f89608300
2015-03-24 12:59:26 -07:00
James D. Forrester
0e6c8687dd Update OOjs UI to v0.9.3
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.9.3/History.md

Change-Id: Iab68173bddc023b874423ad87d1dd874925a227f
2015-03-19 16:21:21 -07:00
James D. Forrester
d1b8defcbb Update OOjs UI to v0.9.1
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.9.1/History.md

Change-Id: I936ea56e1c99f576f44115a9b2fa075ef1ab14bd
2015-03-12 12:41:04 -07:00
Ori Livneh
87dfc20b1e Add StatsD metric logging
This patch adds a metric data service object to the IContextSource interface,
with full support for StatsD meters, gauges, counters and timing metrics, via
the liuggio/statsd-php-client, which this patch also introduces.

Usage example:

    $stats = $context->getStats();
    $stats->increment( 'resourceloader.cache.hits' );
    $stats->timing( 'resourceloader.cache.rtt', $rtt );

The metrics are flushed to a StatsD server, which may be specified via the
'StatsdServer' configuration key. If no such configuration key exists, the
metrics are discarded.

The StatsD client supplants MediaWiki's StatCounter class. wfIncrStats()
will continue to work, but it will delegate to the StatsD data object.

Change-Id: Ie10db1c154d225971398e189737de7c560bf0f90
2015-03-09 16:57:14 -07:00
James D. Forrester
70b1fc1bc8 Update OOjs UI to v0.9.0
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.9.0/History.md

Change-Id: I73d20f6556558bd5675c11addfcd27d417173693
2015-03-04 16:49:38 -08:00
Kunal Mehta
1999eb3879 Add composer lint, phpcs, and test commands
lint uses jakub-onderka/php-parallel-lint to check the syntax of the provided
PHP files or directories.

phpcs uses the MediaWiki codesniffer standard to check the provided files or
directories.

test runs both lint and phpcs together. phpunit is not included at this time
because our phpunit tests require a database to be set up and are very very
slow.

Example usage:
  composer lint .  # Lint all files
  composer phpcs includes/FooBar.php  # Check code style of one file
  composer test extensions/FooBar  # Lint and check an extension

Change-Id: I3c7ac7a02668776de6400ac268f37e7e6b35a3c6
2015-03-01 07:07:38 +00:00
James D. Forrester
e5255674fb Update OOjs UI to v0.8.2
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.8.2/History.md

Change-Id: Ie6722b1aae1970d628a82c491c8d525768d01925
2015-02-27 13:09:43 -05:00
James D. Forrester
39db7e461b Update OOjs UI to v0.8.1
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.8.1/History.md

Change-Id: I5ad8d6aac0fb4ef146ef4f36459e4b0e398a66e8
2015-02-26 02:47:10 +00:00
aude
df58a3694e Require ext-iconv and suggest ext-intl in composer.json
Since iconv is required, per running install.php, and
intl is recommended.

Bug: T90439
Change-Id: I70f6ce9d8d71f8abd3800bbe00aa0f754ce297a2
2015-02-23 18:50:57 +00:00
Kunal Mehta
81c5bc1231 Upgrade composer-merge-plugin to 1.0.0
* Smaller install size
* Included files are processed recursively, with an option to disable

Change-Id: I65bf1e0d0e972846ed9e30761738aaf3a2127c2f
2015-02-20 17:27:20 -08:00
James D. Forrester
d50f6c0e22 Update OOjs UI to v0.8.0
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.8.0/History.md

Change-Id: If14d382beae3f42d2ffb3a43ee0c3e2a488a5fa1
2015-02-18 17:39:13 -08:00
James D. Forrester
cc97bd4c32 Update OOjs UI to v0.7.0
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.7.0/History.md

Change-Id: I70c56ce5aa070d1a5e6f51f80fce7cd7750b3007
2015-02-11 16:08:17 -08:00
Kunal Mehta
57e411855c composer.json: Specify a specific version of PHPUnit to use (~4.5)
Using * will use the latest compatible version, which could potentially
introduce breaking changes. ~4.5 is equivalent to >=4.5,<5.0

Change-Id: I65bf0998cc028707f607ce7adaf45e27b1e6bca1
2015-02-09 20:22:16 -08:00
James D. Forrester
c0b0c8a03a Update OOjs UI to v0.6.6
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.6.6/History.md

Change-Id: I8e0ea18c23df5fe0530cc841799830c4f0082eff
2015-02-04 08:52:31 -08:00
James D. Forrester
fa81c6fc9b Update OOjs UI to v0.6.5
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.6.5/History.md

Change-Id: I1278a9d0f3b63977f293a79c73283593c65bf910
2015-02-01 19:30:33 -08:00
Kevin Israel
efccdd5700 composer.json: Correct license identifier
According to <https://spdx.org/licenses/>, "GPL-2.0" means "GNU General
Public License v2.0 only", not "GNU General Public License v2.0 or later",
which has the identifier "GPL-2.0+".

Also made the same change in the documentation for $wgExtensionCredits.

Change-Id: If25c15d03a71d7c50c9c85a04c2a589a3d978ad0
2015-01-31 20:10:44 -05:00
James D. Forrester
fc38b9b13a Update OOjs UI to v0.6.4
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.6.4/History.md

Change-Id: I75746e6f702e2108e5282f9a37827a1a533ab57a
2015-01-30 17:18:33 -08:00
jenkins-bot
604f610fce Merge "Adding PHP mustache parser (lightncandy)" 2015-01-21 01:56:19 +00:00
James D. Forrester
e223e8a04e Update OOjs UI to v0.6.3
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.6.3/History.md

Change-Id: If0fc682b3a7f186d53ca70fdb66dded66a7f4814
2015-01-15 16:06:57 -08:00
kaldari
9bb7c560db Adding PHP mustache parser (lightncandy)
Per front-end standards group and architecture cabal

See corresponding change for vendor repo: change Id86b118c

Change-Id: I281acc49c1959bc01d0c1580089fe6896992ba19
2015-01-15 15:19:05 -08:00
James D. Forrester
a0f2cb4618 Update OOjs UI to v0.6.2
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.6.2/History.md

Change-Id: Ia694c95107e88dd21db358daf503875cb13c5059
2015-01-09 17:38:03 -08:00
Bryan Davis
578f2cc8b0 Introduce Composer merge plugin
Require Composer merge plugin to allow easier local Composer dependency
management without composer.json edit conflicts. The configuration
provided will merge Composer configuration directives found in
a `composer.local.json` config file into those specified by MediaWiki's
composer.json file at Composer runtime.

Bug: T67188
Change-Id: I66a19d0154191e536aab37a5e183e4505bf3e9be
2015-01-08 16:18:54 -07:00
Kunal Mehta
bfe4ddd810 Implement extension registration from an extension.json file
Introduces wfLoadExtension()/wfLoadSkin() which should be used in
LocalSettings.php rather than require-ing a PHP entry point.

Extensions and skins would add "extension.json" or "skin.json" files
in their root, which contains all the information typically
present in PHP entry point files (classes to autoload, special pages,
API modules, etc.) A full schema can be found at
docs/extension.schema.json, and a script to validate these to the
schema is provided. An additional script is provided to convert
typical PHP entry point files into their JSON equivalents.

The basic flow of loading an extension goes like:
 * Get the ExtensionRegistry singleton instance
 * ExtensionRegistry takes a filename, reads the file or tries
   to get the parsed JSON from APC if possible.
 * The JSON is run through a Processor instance,
   which registers things with the appropriate
   global settings.
 * The output of the processor is cached in APC if possible.
 * The extension/skin is marked as loaded in the
   ExtensionRegistry and a callback function is executed
   if one was specified.

For ideal performance, a batch loading method is also provided:
 * The absolute path name to the JSON file is queued
   in the ExtensionRegistry instance.
 * When loadFromQueue() is called, it constructs a hash
   unique to the members of the current queue, and sees
   if the queue has been cached in APC. If not, it processes
   each file individually, and combines the result of each
   Processor into one giant array, which is cached in APC.
 * The giant array then sets various global settings,
   defines constants, and calls callbacks.

To invalidate the cached processed info, by default the mtime
of each JSON file is checked. However that can be slow if you
have a large number of extensions, so you can set $wgExtensionInfoMTime
to the mtime of one file, and `touch` it whenever you update
your extensions.

Change-Id: I7074b65d07c5c7d4e3f1fb0755d74a0b07ed4596
2015-01-08 01:40:01 +00:00
James D. Forrester
f478a3602b Update OOjs UI to v0.6.1
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.6.1/History.md

Change-Id: Iafe5770c74b671dc04a92b9dfab6f121e7fe718d
2015-01-05 13:06:02 +00:00
James D. Forrester
f12f0f9d5d Update OOjs UI to v0.6.0 in composer.json too
Change-Id: I0cbeaa6421a940b12ccc3a8df42b743537258e84
2014-12-16 23:53:24 +00:00
Kunal Mehta
794fc921b8 Add dependency upon oojs/ui's PHP port
Depends upon Ibca93b05 in mediawiki/vendor.

Change-Id: Ibca93b05623377dc645a28ddd337027e53983552
2014-12-12 13:02:29 -08:00
Kunal Mehta
92fad8e87a composer.json: Update issues link to point to bugs.mediawiki.org
Change-Id: I67f4403f1797a38bc3f5d7b190d7f84f6fdf457c
2014-12-11 22:47:16 +00:00
Kunal Mehta
ea97e715ba composer.json: cdb/cdb was renamed to wikimedia/cdb
The version number was also bumped to 1.0.1.

Change-Id: I67b00060e5144385314f0576a327d951027870ae
2014-12-08 22:58:05 +00:00
Kunal Mehta
e66359fb90 Set optimize-autoloader: true and prepend-autoloader: false in composer.json
Quoting Tim from 240fd31cfa6b in mediawiki/vendor (prepend-autoloader):
 Composer's autoloader is slow, taking about 63µs per class, whereas
 MediaWiki's is fast, taking about 7µs per class. This adds up to an
 overhead of about 13% of CPU time on short requests such as API calls.
 On those same short requests, MediaWiki's autoloader finds most of the
 classes. So it makes sense to run it first, before the two Composer
 autoloaders. So change the config so that composer passes
 $prepend=false to spl_autoload_register().

optimize-autoloader is also just a good idea in general.

Change-Id: I383c72a85eda415da92e8a9253e83b4ed591768b
2014-12-02 17:27:09 +00:00
Kunal Mehta
1eb52568d9 Load lessphp via composer
Adds leafo/lessphp 0.5.0 as a dependency, and removes the current
copy of lessphp.

Depends on 7b2af65827 in mediawiki/vendor.

Bug: T1337
Change-Id: Ib5ab4c872d5236258df97d49f4ba72a20758a2e9
2014-11-24 19:14:42 +00:00
Timo Tijhof
ab8beda805 resourceloader: Update cssjanus to v1.1.1
Bug: 61440
Change-Id: Id0221e9f68786758e10b2f222f5e9170898e320d
2014-11-19 23:39:09 +00:00
Kunal Mehta
987d2e4c77 Use cdb library and provide a back-compat layer
The new cdb library is pulled in via composer. Since the
library uses namespaces, a backwards-compatability layer
is provided for the old class names:
* CdbReader
* CdbWriter
* CdbException

The PHP/DBA-specific classes should never have been used directly.

Depends on I98302bdf1 in mediawiki/vendor

Change-Id: I39549ac8540b262cf91f7d1830d36327afb3033d
2014-11-19 18:39:27 +00:00
Kunal Mehta
5357441fd3 Use CSSJanus via composer
Requires I7de49f443 in mediawiki/vendor

Change-Id: I94837938f0e0f3daa4d1f53c390457f843000605
2014-11-05 21:03:26 +00:00