Commit graph

839 commits

Author SHA1 Message Date
Kunal Mehta b185d9892f Upgrade phan-taint-check-plugin to 1.2.0
Change-Id: I2fa1c622dc495e3f4969d7684934f1839f9caf00
2018-05-04 20:01:48 -07:00
Gergő Tisza cc44c3c7a8 Add notice about resource loading to highlight()
Co-Authored-By: Timo Tijhof <krinklemail@gmail.com>
Change-Id: Ide7ab4b84d1aacad2db8400de9e350a09c80e8c0
2018-05-01 09:17:58 +00:00
Translation updater bot 772d658f99 Localisation updates from https://translatewiki.net.
Change-Id: Ibcedb8264be6f57afe0e438175fab4f510265b75
2018-04-21 22:15:49 +02:00
Translation updater bot d415ae2dae Localisation updates from https://translatewiki.net.
Change-Id: I9c776881b46a46fa8c55a931df4fca62e212e356
2018-04-19 22:14:01 +02:00
libraryupgrader 613e8464b0 build: Updating mediawiki/mediawiki-codesniffer to 18.0.0
Change-Id: I7950c319ca6a496ae57702bdebb05c0a96421646
2018-04-14 06:59:16 +00:00
Jayprakash12345 a79bf7638c Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: I99e68197bbe0438c7a5a55815e8000f4deb49234
2018-04-13 15:25:52 +00:00
Translation updater bot 7538b7aefc Localisation updates from https://translatewiki.net.
Change-Id: I118728e3923b13a68a00d47d7d9aabafc074f86e
2018-04-10 22:15:49 +02:00
Kunal Mehta 0615fe8444 build: Updating mediawiki/mediawiki-phan-config to 0.2.0
Change-Id: I1e5dc6d8fd131db8dd3296337ee73ae07b42f931
2018-04-05 17:23:15 -07:00
libraryupgrader 90212e691e build: Updating mediawiki/mediawiki-codesniffer to 17.0.0
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment

Change-Id: Id89128fd4da73a71ac818d1943fe172f20b07938
2018-03-29 06:04:38 +00:00
Ed Sanders af1a91ade9 Use OOUI 'markup' icon instead of VE's deprecated 'alienextension'
Change-Id: Iad1882c20c17792c1339cf9922b9c4c43bf6122b
2018-03-20 19:00:41 +00:00
James D. Forrester df6eec698e Parser tests: Update for breaking whitespace change in MediaWiki core
Changed as part of T157418.

Change-Id: I2b71eed948fe211389fb3ac166f04cd39d118328
2018-03-20 11:43:33 -07:00
libraryupgrader a6c8aa00a5 build: Updating jakub-onderka/php-parallel-lint to 1.0.0
Change-Id: I7ae26de903868fc61cae4fbaa9abb717ec93dde2
2018-03-10 05:56:54 +00:00
jenkins-bot 2335b0e743 Merge "Update parser tests for RemexHtml as tidy implementation" 2018-03-06 22:27:46 +00:00
Translation updater bot 6392f1b392 Localisation updates from https://translatewiki.net.
Change-Id: I1a40dd7ea52cf980ce41ead53df469b79882b60e
2018-03-05 22:25:04 +01:00
Kunal Mehta e56b9a7427 Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: Ic848fa4ffdeccb8340d347aeb23216364238501d
2018-03-02 15:40:34 -08:00
libraryupgrader 330ac626c2 build: Updating mediawiki/mediawiki-codesniffer to 16.0.1
Change-Id: I30042215bd10f6f0257007d6370e944b4213eedb
2018-02-25 11:31:43 +00:00
Kunal Mehta 14d34dfe56 Update parser tests for RemexHtml as tidy implementation
Bug: T188167
Depends-On: Ic7c34d57a300dbd36a37f03fbfe33391b2950b44
Change-Id: I807a99dc9c873f3e6eb67fd62574f7916530d62e
2018-02-23 22:31:41 -08:00
James D. Forrester 6f9868891e build: Bump devDependencies to latest
grunt                  1.0.1  →   1.0.2
 grunt-banana-checker   0.5.0  →   0.6.0
 grunt-eslint          20.0.0  →  20.1.0

Change-Id: I409217f61deab2db06e15ba6761327c768aa179f
2018-02-23 18:35:07 -08:00
Timo Tijhof 8c3a3ffda0 Update highlight() to use getWithSetCallback() idiom
* Use backend-specific makeGlobalKey() method instead of
  deprecated wfGlobalCacheKey().

* Call makeCacheKey() inline and reduce to only producing
  part of the key (makeCacheKeyHash).

* Add a $ttl (1 month), instead of the previously unspecified
  expiry (default: indefinite).

Change-Id: I913a768a3b61cc31ce14fa086a563ceecca7c603
2018-02-22 23:53:56 +00:00
Timo Tijhof ae9b8419dc Factor out plainCodeWrap to avoid recursive call to self
The recursive call is somewhat counter-intuitive, and seems like it could
easily break if forgotten. Instead, move the part that we want to re-use
out into its own method.

Change-Id: I64ced0da211155299744d3c86f7818e751ad027e
2018-02-22 23:40:19 +00:00
Timo Tijhof 92602f33da Minor clean up
* Move "empty tag" case to earlier in highlight() by comparing to
  empty string without strlen(). Follows-up cda15b184.

* Turn "shell disabled" case into 'elseif' after length check,
  instead of subsequent 'if'. That way, in case of a too large
  string, we don't need to check if shell is disabled, and it
  also provides the user with the size-related error instead of
  the shell-related one.

* Add a few clarifying code comments.

Change-Id: Ib0ef9e683ac4aadd0461fe061ddbe9bfb0a27a82
2018-02-22 23:40:07 +00:00
Kunal Mehta cda15b184c If there is no input, don't try and shell out to pygments
pygments will just wait for stdin if the stdin that was passed
to it was empty.

Bug: T188019
Change-Id: I46271f31df74822bc71b3ac283fa572f2d149d67
2018-02-22 13:29:58 -08:00
libraryupgrader 3a588ed5da build: Updating mediawiki/minus-x to 0.3.1
Change-Id: I94381a6b6fc7f3fc19dc67008f7edc8cfef20331
2018-02-18 09:46:21 +00:00
Kunal Mehta b7d670c346 Set phan-taint-check-plugin version in composer.json
We cannot set this in the normal "require-dev" because the plugin
depends on exactly PHP 7.0, preventing running tests on any other PHP
version.

Instead, CI will read the version number out of the "extra" field to
figure out what version to install.

Bug: T187497
Change-Id: I36cb5e14e740afabdd42a04ff19b6d59a59a502e
2018-02-16 13:44:31 -08:00
Kunal Mehta e75fda881e Migrate to mediawiki-phan-config
Change-Id: I038c599b428683cee669e69e9a5106f178b129a2
2018-02-15 14:29:11 -08:00
Kunal Mehta 141455aa33 Move classes into includes/
Change-Id: Ie26b5be1bb2551ed339fdb4a587a89823c609b2e
2018-02-15 14:29:07 -08:00
Kunal Mehta dcd54e6c09 Remove unused back-compat ResourceLoaderGeSHiVisualEditorModule alias
This isn't used by anything.

And use ::class syntax while we're at it.

Change-Id: I5cb0b9f36903636825080026d9bc18e5a7f7379e
2018-02-15 14:17:39 -08:00
libraryupgrader 60b26d5a1c build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
Change-Id: I6d43d6e3af599d2662709a809c61ec0987487f73
2018-02-15 14:15:26 +00:00
Translation updater bot 52870eb4a6 Localisation updates from https://translatewiki.net.
Change-Id: I9843b2d8ac5f8c64002d0f7d6fd64aae274f5b68
2018-02-10 09:15:29 +01:00
zoranzoki21 0d1acc53b6 Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: Icca050498f0be381b8bc142e38462ac74455c336
2018-02-03 16:34:16 +01:00
Jayprakash12345 d81620b94f Use SPDX 3.0 license identifier
Bug: T183858
Change-Id: Ic53ab079fdc36dc4497e930283ad93b586ef7b6f
2018-01-29 05:54:24 +00:00
zoranzoki21 55e9170492 Update Maintenance scripts in extensions to use $this->requireExtension()
Bug: T152139
Change-Id: I9aead5ae7106150dfae749a91b6b403c94811f3f
2018-01-28 16:42:01 +00:00
jenkins-bot 767247c546 Merge "Use shell restrictions to contain pygments" 2018-01-11 21:28:52 +00:00
jenkins-bot 05396252c5 Merge "Mark es6 file as such" 2018-01-11 17:37:23 +00:00
Ed Sanders 3878e424b1 Mark es6 file as such
Change-Id: I981ac80d93c81a2256c6bc5e519e653c8400d63b
2018-01-11 14:46:17 +01:00
Ed Sanders b5eb22bf04 Document monospace hack
Change-Id: Ia27dccdb9dc2de6ca66e08c54c62eb91302a381c
2018-01-11 14:45:39 +01:00
Kunal Mehta dc4e684056 Use shell restrictions to contain pygments
If enabled, apply the default restrictions and take away network access
from pygments.

Bug: T182468
Change-Id: I4e5a6e01a24229a3923642af8de880dbf9167562
2018-01-04 13:07:39 -08:00
Kunal Mehta 15b894bdbc Drop symfony/process dependency, use Shell\Command instead
We originally started using symfony/process because kzykhys/pygments
depended upon it. But that library was unmaintained and became broken,
so we stopped using it, and just used symfony/process directly.

At the time, the main reason in favor of symfony/process was that it
could pass stdin to pygments, while Shell\Command couldn't - but it can
now (T182463)! On top of that, there are downsides, like not respecting
the default MediaWiki shell limits, being incompatible with core's
firejail support, and requiring an external composer dependency.

Note that because Shell::command() will enforce MediaWiki's normal
limits, it's possible that some large pages may no longer render with
syntax highlighting if they pass those limits.

Bug: T182467
Bug: T181771
Change-Id: Ie1cb72b7eb17d943f79ecae4d94a2110546ef039
2018-01-04 13:07:35 -08:00
jenkins-bot 578bb79921 Merge "Run Pygments using Python 3" 2018-01-02 11:38:44 +00:00
libraryupgrader 77ac013073 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Change-Id: If136f446383a4b7563bf5c6d26c1af64513caf09
2017-12-30 02:52:44 +00:00
Kunal Mehta e50bce1036 Run Pygments using Python 3
Python 2 is dying, <https://pythonclock.org/>, it's time to move on.

The create_pygmentize_bundle script now requires Python 3 to run, and will
generate a bundle with a python3 shebang. Technically the bundle is still
compatible with Python 2 as long as the shebang is modified.

Bug: T182851
Change-Id: Ifb9d0abf092e2c08d9a638a7dda3bda0bc808789
2017-12-27 18:51:19 -08:00
Rafid Aslam 46700b5fdb Add phan configuration for static analysis and fix phan warnings
Add phan configuration for static analysis, and fix phan warnings.
`PhanDeprecatedClass` and `PhanDeprecatedFunction` rules are supressed.

Bug: T179554
Change-Id: I7cbb410ed88ba58198d0557cafd9e6df968ed885
2017-12-25 11:16:49 +07:00
Translation updater bot 2abcdb3b56 Localisation updates from https://translatewiki.net.
Change-Id: I23b9f7ffec95d8ecf6590b3142d2cb9ae24f5425
2017-12-18 23:07:11 +01:00
jenkins-bot 606cec698f Merge "Rename files to match classes" 2017-12-15 05:25:15 +00:00
libraryupgrader c3f97c046c build: Updating mediawiki/minus-x to 0.2.1
Change-Id: Iaede6ca152d740ef35128797105b5c6b800771da
2017-12-11 09:02:46 +00:00
Umherirrender deb5fc0fcf Rename files to match classes
Change-Id: I6e66abdf4f0eff0a24b96e543f2ce8f293bb7860
2017-12-10 01:32:49 +01:00
Ed Sanders 8570ae5d1d build: Update linters
Change-Id: I92f658cdb4806e7b1000c9306114072477fc9651
2017-11-30 21:55:54 +00:00
Reedy 8cc811d9c3 Update symfony/process to ~3.3
Change-Id: I38544e88880311bab8add376cc1f17c6a423684d
Depends-On: I2dc357691d672626c90ee4c4ad696b5862bda764
2017-11-23 12:27:26 +00:00
Translation updater bot e536618ba0 Localisation updates from https://translatewiki.net.
Change-Id: I0d0febc892fe521a08d10310389d58ea0f061dfd
2017-11-10 22:54:25 +01:00
Eddie Greiner-Petter 3abd668325 Add new (unprefixed) CSS modifier user-select
The CSS already has this modifier prefixed with -webkit-, -ms- and
-moz-, some browsers now support this without any prefix (according to
caniuse.com: Chrome 54+, Opera 41+).

Change-Id: Icd67250c26bec61be0fb101f1db077ee13ccf6b7
2017-11-07 19:36:32 +01:00