Commit graph

2242 commits

Author SHA1 Message Date
Moritz Schubotz (physikerwelt) c1c4e42c86 Improve tests coverage for MathFormatter
Change-Id: I2c9141753b59d99a1caf84279a0afcaf8431e631
2018-06-01 14:45:04 +00:00
Translation updater bot 6f32168683 Localisation updates from https://translatewiki.net.
Change-Id: I86e4be45559253e83163f5a87100110f83191f80
2018-05-31 22:28:37 +02:00
jenkins-bot c9f3df706a Merge "Remove dead texvc code from the math extension" 2018-05-31 12:33:08 +00:00
Translation updater bot 7d420d87ab Localisation updates from https://translatewiki.net.
Change-Id: I52a32ddf6f8ad95f60b67fa06ad3c50241cda4a0
2018-05-29 22:24:58 +02:00
Moritz Schubotz (physikerwelt) 4156f1c9b7
Remove dead texvc code from the math extension
In T74240 support for LaTeX based rendering of the <math/>-tags was
removed. This change eliminates the unused code from the repository.

Bug: T195871
Change-Id: Ic57d83fa49f090b574ce8b82fd2ebc84a5350318
2018-05-29 17:41:53 +02:00
jenkins-bot 8879b5b7a1 Merge "Delete Selenium tests in Ruby" 2018-05-29 11:28:55 +00:00
Translation updater bot e4fe0f4362 Localisation updates from https://translatewiki.net.
Change-Id: I130712dca0971b54b8fc0da81b7f65251489e855
2018-05-28 22:42:21 +02:00
libraryupgrader 2587469834 build: Updating mediawiki/mediawiki-codesniffer to 20.0.0
Change-Id: I4385a05df9b40d4da19f280bd211e8c261d22c41
2018-05-26 04:26:21 +00:00
Željko Filipin 88e9149e3e Delete Selenium tests in Ruby
They are replaced by Selenuium tests in Node.js.

Bug: T162455
Change-Id: I1f5bc8f9c5cd687a6ba116f2f0461eb2992096c7
Depends-On: Ibd8a39cc75231932f872456b8d3ec1fe41ef23e2
2018-05-25 05:58:17 +00:00
jenkins-bot 5581b9779a Merge "Selenium tests for Math" 2018-05-24 16:14:52 +00:00
Translation updater bot db1b5ac764 Localisation updates from https://translatewiki.net.
Change-Id: Iead36f61b847672ce9356b9da2182704c294d586
2018-05-23 22:20:19 +02:00
Translation updater bot 9886918fe5 Localisation updates from https://translatewiki.net.
Change-Id: Ia43294cac9a175031e4a572425e81a685b94c14c
2018-05-21 22:10:26 +02:00
Moritz Schubotz (physikerwelt) b5cf0e0b77
Serve png mode from mathoid
* Use the exactly same routines to deliver png images that are used in
  mathml mode.
* Change the output to use mathoids png image rather than the mathml
  and svg output.
* Locally tested on Firefox and Chrome: Depending on the mode either
  the SVG or the PNG path is used.

Bug: T74240
Change-Id: I4b1cac92eb9a02190f316faab6621940951603d5
2018-05-21 13:47:49 +02:00
Željko Filipin befe4af465 Selenium tests for Math
* Implement a basic tests that renders $2+3$

Bug: T162455
Change-Id: Ic605bd0d934d0f138390145fa5f5bddaa8f8e578
2018-05-19 17:04:22 +00:00
jenkins-bot 22d63b1973 Merge "Throw InvalidArgumentException when validating/formatting null" 2018-05-18 19:00:32 +00:00
Thiemo Kreuz b12b4f740f Throw InvalidArgumentException when validating/formatting null
Change-Id: Ia46f76a89b26c830aab70ebf5fcc222711c325d1
2018-05-18 20:02:43 +02:00
Thiemo Kreuz 670f0bb8f9 Don't expect objects by reference in hook handlers
The motivation for this patch is to make the code less complex, better
readable, and less brittle.

Example:

public function onExampleHook( Parser &$parser, array &$result ) {
    /* This is the hook handler */
}

In this example the $result array is meant to be manipulated by the
hook handler. Changes should become visible to the caller. Since PHP
passes arrays by value, the & is needed to make this possible.

But the & is misplaced in pretty much all cases where the parameter is
an object. The only reason we still see these & in many hook handlers
is historical: PHP 4 passed objects by value, which potentially caused
expensive cloning. This was prevented with the &.

Since PHP 5 objects are passed by reference. However, this did not
made the & entirely meaningless. Keeping the & means callees are
allowed to replace passed objects with new ones. The & makes it look
like a function might intentionally replace a passed object, which is
unintended and actually scary in cases like the Parser. Luckily all
Hooks::run I have seen so far ignore unintended out-values. So even if
a hook handler tries to do something bad like replacing the Parser
with a different one, this would not have an effect.

Removing the & does not remove the possibility to manipulate the
object. Changes done to public properties are still visible to the
caller.

Unfortunately these & cannot be removed from the callers as long as
there is a single callee expecting a reference. This patch reduces the
number of such problematic callees.

Change-Id: I21d53c989ea487607dc69e6b3365c023ef6729f5
2018-05-15 17:50:08 +02:00
Translation updater bot 7eed63d895 Localisation updates from https://translatewiki.net.
Change-Id: I60978aab1d3f51556aa5ccc855d5a93c9806973b
2018-05-14 22:44:23 +02:00
Translation updater bot 9ef67abab3 Localisation updates from https://translatewiki.net.
Change-Id: I45006aa155b9a9c6a5ee170c97468da00f90e73d
2018-05-06 22:22:31 +02:00
Kunal Mehta 7a53bd905c Disable PHPCS more narrowly
Change-Id: I20d8b519d5827e865ccd3adf7c2c6ba069f37afb
2018-05-03 19:00:55 -07:00
jenkins-bot dcf8f0926d Merge "MathChemSymbolsDataModule: Remove origin restriction" 2018-04-30 20:42:06 +00:00
jenkins-bot 332682543c Merge "MathMathSymbolsDataModule: Remove origin restriction" 2018-04-30 20:42:04 +00:00
Bartosz Dziewoński 7270d702f1 MathMathSymbolsDataModule: Remove origin restriction
Without this change it would no longer load in safe mode (T185303)
because the module would be missing.

I think this has been copy-pasted from VisualEditor, see commit
I6d097ccbf1dc2462843219adcf96bf8313e30289 there for explanation.

Bug: T185303
Change-Id: I6644a361d1450c394a7f82dc3dad97515982846d
2018-04-30 22:26:28 +02:00
Bartosz Dziewoński 4ccb9abe8a MathChemSymbolsDataModule: Remove origin restriction
Without this change it would no longer load in safe mode (T185303)
because the module would be missing.

I think this has been copy-pasted from VisualEditor, see commit
I6d097ccbf1dc2462843219adcf96bf8313e30289 there for explanation.

Bug: T185303
Change-Id: Ieed46488c94c5809e9f17f667c6926a21ffe838b
2018-04-30 22:25:52 +02:00
Translation updater bot a3aab83b87 Localisation updates from https://translatewiki.net.
Change-Id: I3c4afa25a02d2b17063c6b596b865592e81eff89
2018-04-30 22:22:23 +02:00
jenkins-bot 7349010b55 Merge "Autocomplete LaTeX commands with backslash" 2018-04-29 14:24:20 +00:00
Translation updater bot 4f4c277715 Localisation updates from https://translatewiki.net.
Change-Id: I43dcd58dba27e69c65f7001ac9e48bdd10c31912
2018-04-28 22:32:53 +02:00
Translation updater bot c8d8787040 Localisation updates from https://translatewiki.net.
Change-Id: I69006a89e9b7d6ecb72471ea4f5450a98f9318af
2018-04-27 22:26:02 +02:00
Translation updater bot 6c5983e3d6 Localisation updates from https://translatewiki.net.
Change-Id: I6fa4e2aa576439cefd85eec0a2e28623908e2899
2018-04-26 22:16:40 +02:00
jenkins-bot 5fef05a7f3 Merge "Generate HTML tag using HTML class" 2018-04-24 21:14:50 +00:00
Moritz Schubotz (physikerwelt) ffcfdf488e
Autocomplete LaTeX commands with backslash
Insert required backslash to LaTeX commands.
This should help to avoid that users ommit the backslash for LaTeX commands unintentionally.

Change-Id: I970cec2cb597815cc4272ed573ac1a2ee2682e55
2018-04-24 20:17:21 +02:00
Translation updater bot 7b78dcfc1f Localisation updates from https://translatewiki.net.
Change-Id: Ifc0ecfe5c6d286e969c5c639d7adfb77f56e656f
2018-04-23 22:30:50 +02:00
Moritz Schubotz (physikerwelt) 9fee65ae24
Generate HTML tag using HTML class
Change-Id: I8c37fdaa112cfeac0466f4380e972b63404a8d35
2018-04-23 15:39:30 +02:00
Moritz Schubotz (physikerwelt) 6e28bf8743
Move php source files
Move php source files to scr. This allows jenkins to calculate the test
coverage.

Bug: T126034
Change-Id: If012c6a4fce0fdeaa5a63dad23210a42d1fc80e6
2018-04-23 15:09:23 +02:00
jenkins-bot 600d6867b0 Merge "Move phpunit test files" 2018-04-23 09:34:20 +00:00
Translation updater bot 8f96f27912 Localisation updates from https://translatewiki.net.
Change-Id: I0a542dd46a1191f719e548bac6c47b3d6490146c
2018-04-22 22:21:54 +02:00
Moritz Schubotz (physikerwelt) 88546ae1ad
Move phpunit test files
* currently the phpunit tests are not triggered by jenkins
* some test can't be re-enabled possible reasons:
** the texvc and texvccheck binaries are not available from jenkins
** the binaries can not be generated
** the path to the binaries are not set up correctly

Bug: T142120
Change-Id: I0c8fe5ad652c4663eeb029781521acbf56e42bad
2018-04-22 10:09:12 +02:00
jenkins-bot a1263dbe1f Merge "Update @license tags from GPLv2 to GPL-2.0-or-later" 2018-04-16 22:54:20 +00:00
jenkins-bot ad2a252ac0 Merge "build: Updating mediawiki/mediawiki-codesniffer to 18.0.0" 2018-04-15 19:40:42 +00:00
libraryupgrader d53d01b97d build: Updating mediawiki/mediawiki-codesniffer to 18.0.0
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag

Depends-On: I4e9749d8058cd6e55c7a4818d01c9d10a9d62efc
Change-Id: Ic4fbcb9ca724e940c102ac6feee0740b583cb14e
2018-04-14 22:39:05 +00:00
Translation updater bot cbbdb83251 Localisation updates from https://translatewiki.net.
Change-Id: If86799bffdfeaa0fe28faae5b0dbede69a7caa73
2018-04-14 22:13:58 +02:00
Thiemo Kreuz 0e8c745885 Update @license tags from GPLv2 to GPL-2.0-or-later
Change-Id: I150433038f8411df0b9f40f5c8933d7a533f426b
2018-04-14 09:36:27 +00:00
Jayprakash12345 270b942c64 Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: I2fe982bc146355d7faec03e39a2a59e9d32e22be
2018-04-13 17:37:23 +00:00
jenkins-bot 0a8608399a Merge "Fix MathFormatter failing on new SnakFormatter format MIME types" 2018-04-13 16:11:03 +00:00
Thiemo Kreuz 1f87afa8e6 Fix MathFormatter failing on new SnakFormatter format MIME types
A formatter like this is not supposed to check if the format is known
or not. The code calling these formatters can introduce new (sub) formats
any time. What a formatter like this should do then are two things:
* If it's some HTML format, always return HTML.
* If you really can't identify the format, do a sensible fallback.

This currently blocks introducing a new format in Wikibase.

Bug: T46727
Change-Id: I585069e8f2ba33ec657ca4d514c6d502fe0f5ba3
2018-04-13 14:46:58 +00:00
jenkins-bot 3291177420 Merge "Use "@license GPL-2.0-or-later" according to SPDX" 2018-04-13 14:21:44 +00:00
jenkins-bot dd042cb590 Merge "Use short "@license MIT" according to SPDX" 2018-04-13 14:20:46 +00:00
jenkins-bot d062b933cb Merge "Remove @file tags from normal class level comments" 2018-04-13 14:09:34 +00:00
jenkins-bot 04e17f7e1e Merge "Remove non-helpful comments" 2018-04-13 14:09:33 +00:00
Thiemo Kreuz 945ef79559 Use "@license GPL-2.0-or-later" according to SPDX
Change-Id: I5b9ba062f51dce9fcc10f7c31f37c137176bfff3
2018-04-13 16:07:10 +02:00