Commit graph

15 commits

Author SHA1 Message Date
James D. Forrester
5895ae836c .gitattributes: Ship docker-compose.yml to the tarball
Using MediaWiki with docker-compose is something that can be used by non-
developers, not just those downloading from git, and so should be exposed
in the tarball and other places that this entry in .gitattributes that we
added in 89083ea86 when this sysytem was initially provided now prevents.

Change-Id: I30ece42766153bd91ec7271286b2b2e689e57ecb
2022-11-30 09:37:13 -05:00
Kunal Mehta
e735fc0479 Remove package-lock.json from the tarball
Same rationale for excluding package.json.

Change-Id: Ia56c02ac38db29de02c7ea983adc81f9b632a419
2020-08-07 23:10:26 -07:00
Kunal Mehta
21c772fdb8 Remove Gruntfile.js from the tarball
We already exclude package.json so having Gruntfile.js is kind of useless
since you don't know what versions of packages to install.

Change-Id: I15dcb68e45a94c35c3500711eafb6573824dd472
2020-08-07 23:05:35 -07:00
jenkins-bot
20bcffd85c Merge "build: Enable binary git attribute for '*.map.json'" 2020-07-25 18:24:03 +00:00
Timo Tijhof
aa0a67c266 build: Enable binary git attribute for '*.map.json'
When using 'git grep', any match for resources/libs/something.js
also has a match for resources/libs/something.map.json (as it
contains a copy of that same source). That by itself is fairly
harmless but where it gets annoying is those same map.json files
then also contain hundreds of screens full of codes like
"EAAE,CAAC,KAAK,CAAC,EAAE;AACX;AACA" which can't be skipped over
and are present without any line breaks, which means even when
teling 'git grep' to contain 0 lines of contexts, there is still
this huge unskippable hunk in the middle of the Less pager.

Exclude these from greps by marking them as binary, which they
effectively are practically speaking since they are artefacts
with no original information.

Change-Id: I6bd3a08bfec68599939a244fc032c088e3b659fa
2020-06-23 15:51:45 +01:00
Timo Tijhof
91822c99dd docs: Rename main README to README.md
* Match the other doc files we maintain in Git under docs/ and
  for individual components, as well as all inline docs for PHP
  and JS documentation render as Markdown via JSDoc/JSDuck/Doxygen.

  This was currently the only prominent 'wikitext'-ish
  documentation file.
  Although the only wikitext-speficic syntax here was the heading.

* The current README was not shown at all in Gitiles as it requires
  the README to have a file extension, and it does not support
  '.mediawiki'.

Follows-up c0342da8e9.

Change-Id: I79e7e033690abe4de042969826964389ac57fcf6
2020-06-23 15:50:57 +01:00
Kosta Harlan
89083ea868 Add configuration for Docker based development environment
This patch introduces a simple docker-compose based development environment
with the idea to allow most development use cases for beginning and
experienced MediaWiki developers.

- PHP and Apache container with XDebug enabled
- Support for overriding services with docker-compose override file
- Documentation for usage and a documented place for sharing docker-compose
  overrides and LocalSettings.php configuration snippets for e.g. MySQL,
	DB replication, Redis, etc

Depends-On: I50079cca6a286d8aaea8fd0785be48c80e80271c
Bug: T238224
Change-Id: I3b76c1599b1ff32174af5603aadc9f7c7634c98b
2020-02-21 10:09:48 +00:00
Kosta Harlan
214750d8d2 Define unit and integration test suites
Following discussion in Ibb8175981092d7f41864e641cc3c118af70a5c76, this patch
proposes to further reduce the scope of what unit tests may access, by removing
the loading of DefaultSettings and GlobalFunctions.php. This also has the
implied effect of disabling the storage backend, as well as the global service
locator.

MediaWikiTestCase is renamed to MediaWikiIntegrationTestCase so it's scope and
purpose is more clear. Whether we still need to keep `@group Database`
annotation around is debatable, as it's unclear to me what the performance costs
are of implying database access for all tests which extend IntegrationTestCase.
As far as I can tell, `@group Database` is primarily used in CI to run faster
tests before slower ones, and with the new UnitTestCase the annotation seems
redundant.

To run all testsuites, use `composer phpunit`. Other composer scripts:

- `composer phpunit:unit` to run unit tests
- `composer phpunit:integration` to run integration tests
- `composer phpunit:coverage` to generate code coverage reports from unit
   tests (requires XDebug).

Note that you can pass arguments to composer scripts with `--`, e.g. `composer
phpunit:integration --exclude-group Dump`.

Other changes:

- Rename bootstrap.php to bootstrap.maintenance.php so it's clear it's part of
  the legacy PHPUnit-as-maintenance-class setup
- Create new bootstrap.php which loads the minimal configuration necessary for
  the tests, and do additional setup in the run() method of the unit/integration
	test case classes
- Move the unit-tests.xml file to phpunit.xml.dist in preparation for this being
  the default test configuration

For a follow-up patch:

- Find unit/integration tests for extensions/skins
- Migrate other test suites from suite.xml
- Support running all tests via vendor/bin/phpunit

Bug: T84948
Bug: T89432
Bug: T87781
Change-Id: Ie717b0ecf4fcfd089d46248f14853c80b7ef4a76
2019-06-28 12:18:18 -04:00
Kunal Mehta
b78d595fee SECURITY: Don't exclude .htaccess files from git archive
Bug: T199029
Change-Id: I7ada3dddc4f5f7f2800882ccc9c73c8494f7fac9
2018-09-20 22:26:11 +01:00
James D. Forrester
22de0e368f Follow-up 95e7c545: Fix .gitattributes file line truncation
Change-Id: I82bf4beeed41cde89da3f1f8bc517420bdfd03ad
2018-01-20 15:30:38 -08:00
Chad Horohoe
95e7c545a9 Move standard tar ignores to .gitattributes so git archive works
Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd
2018-01-18 15:14:06 -08:00
Derk-Jan Hartman
c6235442b4 MimeAnalyzer: Add testcases for mp3 detection
This is a follow-up to change Ie1a63aa

Bug: T115170
Change-Id: Iab5e19e1dd26b0d88c72ad7253cd11e865c5e008
2017-06-08 00:27:33 +00:00
btongminh
9c8f333eb8 Basic support for WebP
Adds basic image size detection for WebP and support in the
MediaHandler. Currently renders WebP files as PNGs, because that
handles transparency.

Bug: T50519
Change-Id: I3c00653a8a034efc3f6b60fe62b7ac2e5391f921
2015-06-26 19:38:38 +00:00
Ori Livneh
428c931271 Declare .icc files to be binary in .gitattributes
Follows I2ae35ddad: TinyRGB support for JPG thumbnails.

Change-Id: Ib8e7a74a6bc7b6cfbc674c8e271faa35b1f1a3c7
2015-06-22 20:49:25 -07:00
Matthew Flaschen
f64ae7564e Make *.sh files use LF
Someone setting up MediaWiki-Vagrant on Windows had an issue with
a carriage return in a shell file sha-bang, which this should fix.

Change-Id: I190a6a6f80233b4a0ac9fd6c34d1b8af9bd6f17c
2014-05-10 20:26:03 +00:00