Commit graph

25 commits

Author SHA1 Message Date
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
libraryupgrader 77ac013073 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Change-Id: If136f446383a4b7563bf5c6d26c1af64513caf09
2017-12-30 02:52:44 +00:00
libraryupgrader c3f97c046c build: Updating mediawiki/minus-x to 0.2.1
Change-Id: Iaede6ca152d740ef35128797105b5c6b800771da
2017-12-11 09:02:46 +00:00
Reedy 8cc811d9c3 Update symfony/process to ~3.3
Change-Id: I38544e88880311bab8add376cc1f17c6a423684d
Depends-On: I2dc357691d672626c90ee4c4ad696b5862bda764
2017-11-23 12:27:26 +00:00
Kunal Mehta 054302f83c build: Adding MinusX
Change-Id: Ib2b2f09c495f62b458c2c6175e5c0d27b14984ec
2017-11-03 19:49:51 -07: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
libraryupgrader 365c3627c6 build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: Idb1e57b59484b97e9c1b527a95e87e1ec5e069da
2017-09-24 05:33:42 +00:00
libraryupgrader f8a4f8cb0e build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.ClassMatchesFilename.WrongCase

Change-Id: I2781f52be104163ba58e30055bc7593da6ded29a
2017-09-02 08:53:42 +00:00
Kunal Mehta 1abf516d6a build: Updating mediawiki/mediawiki-codesniffer to 0.11.0
Change-Id: I9df860b01a9e99174e4f0f6fe65670dffa548988
2017-08-11 00:34:10 -04:00
Kunal Mehta e700c15b81 build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch

The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment

Change-Id: I6f0b55e7694cdae1fcdd68b33449db412a656e37
2017-07-23 00:38:40 -07:00
Umherirrender 52548536ba build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
Change-Id: Ie3c4add8601ace14b6ff956e1fb451bc2d379860
2017-07-08 11:51:43 +02:00
Umherirrender 62d8ae19d3 Update mediawiki/codesniffer to 0.7.2
Short array syntax will be used in follow ups
to keep this patch set small


Change-Id: Ibfb09fb93a827d2c23060e79d287c963fe149770
2017-06-13 12:22:06 +02:00
Derk-Jan Hartman e908a9ef43 Remove 'GeSHi' name from composer and npm manifests
Both of these seem to be private, and are therefore easily renamed.

Bug: T164939
Change-Id: I09be0ef0131d31182ed8bb6be221c76dba2c1a53
2017-05-21 13:26:40 +00:00
Antoine Musso 5ee2deb6d8 build: add jakub-onderka/php-console-highlighter
Highlight PHP code when parallel-lint fails

Change-Id: Ie7582baa805457a0445a119bfd5fb859f693e51f
2017-05-05 21:40:02 +02:00
Umherirrender ed7f1f6dc4 Add fix phpcbf command to composer.json
This allows to use the phpcbf easily

Change-Id: I76b14ace9fb95bf2ae30bfd56c41019c88c862ac
2017-04-28 23:57:37 +02:00
Reedy 370d8750ac Update symfony/process from ~3.0 to ~3.2
Change-Id: Ibf91f004e69a82161d9e567c539dd532c96df336
Depends-On: I78d1459d7f7e980ac4b6c4a6e57b5d8d6f97f3e6
2017-04-04 20:59:34 +01:00
Reedy 79dcd57ee8 Update symfony/process to ~3.0
Change-Id: I4f8c1e789ed706074c229e06374f38b9abaa15f5
Depends-On: I99661d2770329a54195b07e894c6a29a9397c87d
2016-04-02 20:57:52 +00:00
Reedy 0983a55488 Update symfony/process to ~2.6
Depends-On: I99d551cd89b38a25943080690165344cf973dce7
Change-Id: Ia959f51c4327412b0604a9ecf537dbb07cbeb87d
2016-01-12 00:51:43 +00:00
Kunal Mehta 8b876b8bbc build: Updating development dependencies
* jakub-onderka/php-parallel-lint: 0.9 → 0.9.2

Change-Id: If16a3bea816ccf476bff8d495a112438be264366
2016-01-05 10:41:02 -08:00
Kunal Mehta bc7c897fcd build: Updating development dependencies
* mediawiki/mediawiki-codesniffer: 0.5.0 → 0.5.1

Change-Id: I1b9d9e24ef9788582a42d4368b21e5c9a676f85e
2016-01-03 18:53:25 -08:00
Ori Livneh f89bc8d62c Drop dependency on kzykhys/pygments
kzykhys/pygments provides very little added value when compared to just using
symfony/process directly. Since kzykhys/pygments appears to be unmaintained and
is currently broken, depend on symfony/process directly instead.

Change-Id: I34c7e4201c2c21d3f8607ec826a4c9869e2da917
Task: T120068
2015-12-04 15:02:13 -08:00
Kunal Mehta c3a69e1ffe build: Updating development dependencies
* mediawiki/mediawiki-codesniffer: 0.4.0 → 0.5.0

Change-Id: If179bcf09f139c97c22a9bcab95e33ed6c9ffe66
2015-10-23 15:33:06 -07:00
paladox 96806a8f39 Update mediawiki-codesniffer and parallel-lint settings
Change-Id: I34446a973c2e07add2d0e573e9dfec6fb49d60a9
2015-09-29 01:45:26 +02:00
paladox ee3896a51c Add php code sniffer to SyntaxHighlight_GeSHi
Requires https://gerrit.wikimedia.org/r/#/c/225035/

Change-Id: If46b56fa8aa26b03890274ac772110eba9519f8d
2015-09-27 21:16:58 +02:00
Ori Livneh 6484894497 Highlight using Pygments rather than Geshi
GeSHi is unmaintained, lacks support for many popular modern languages, and
suffers from deep architectural flaws, chief among them the inconsistent
tokenization of different languages, each of which requires a custom
stylesheet.

Pygments is a well-maintained alternative. It is, by my count, the most popular
syntax highlighting library around. It is BSD-licensed, actively maintained,
and is widely used in PHP projects.

To keep this easy to review, this change does not include update for l10n
files, and it does not delete the geshi/ directory. I will do those in a
separate patch.

The chief change between this and the previous implementation is that errors
result in the code block not being highlighted, as opposed to not being printed
at all, having been replaced by an angry red error message. I think that is the
right user experience. If you go to StackOverflow or GitHub and try to mark up
your code block as being written in some language that their highlighter
doesn't know about, you don't get an error message -- the code simply doesn't
get highlighted.

Because we don't recursively load dependencies for extensions, to test this,
you will need to create a composer.local.json in $IP and add:

    {
        "extra": {
            "merge-plugin": {
                "include": [
                    "extensions/SyntaxHighlight_GeSHi/composer.json"
                ]
            }
        }
    }

Then run `composer update`.

Bug: T85794
Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
2015-06-22 23:37:15 +01:00