Commit graph

879 commits

Author SHA1 Message Date
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
Kunal Mehta 054302f83c build: Adding MinusX
Change-Id: Ib2b2f09c495f62b458c2c6175e5c0d27b14984ec
2017-11-03 19:49:51 -07:00
Translation updater bot 35facbff5b Localisation updates from https://translatewiki.net.
Change-Id: Ib9d6ca28dc2d4b88a1e302559f55d04618fefe8c
2017-10-23 23:42:47 +02:00
libraryupgrader 2faa7ef9f3 build: Updating mediawiki/mediawiki-codesniffer to 14.1.0
And moved phpcs.xml to .phpcs.xml (T177256).

Change-Id: If284e34e02d4f678b0ae0d2863d3feb7f8d55d0d
2017-10-21 04:30:56 +00:00
Translation updater bot 18b04cb331 Localisation updates from https://translatewiki.net.
Change-Id: I966c97286ecebc21eb94eb3ddc5708085034ebd1
2017-10-09 23:07:36 +02:00
Umherirrender 1f6ddc4176 Improve some parameter docs
Change-Id: I40589bae00401a5fb253d0261f0f4d881ae37084
2017-10-07 17:16:00 +02:00
Max Semenik 965ddd069e Don't use deprecated function wfShellExecDisabled()
Change-Id: I1dad6068c1691df4b49824b72af01d8508bfe9a8
2017-10-04 14:50:04 -07:00
Translation updater bot 91c94cc025 Localisation updates from https://translatewiki.net.
Change-Id: I8e430b83e9e9ab5581329ada8498763fb630f093
2017-09-24 23:02:32 +02:00
libraryupgrader 365c3627c6 build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: Idb1e57b59484b97e9c1b527a95e87e1ec5e069da
2017-09-24 05:33:42 +00:00
Translation updater bot 08ae879ac6 Localisation updates from https://translatewiki.net.
Change-Id: I8cc14afd776b34e43cdd7f4e0439d0daa8e4757e
2017-09-17 22:44:12 +02:00
Translation updater bot d42321cab0 Localisation updates from https://translatewiki.net.
Change-Id: Iffc233f9dc5f629b1bd7a0d4a7a6f9bd62142573
2017-09-13 22:54:01 +02:00