This version, unlike 0.10.0, supports PHP 8.1. (The library isn’t used
in MediaWiki itself, but needs to be installed for WikibaseLexeme tests
to work, see change I3909fb3402 / commit 25e6dbdb1a.)
Bug: T319219
Change-Id: I4ca5caf3535d440cb22d336134b32d50e0c23440
This patch only adds and removes suppressions, which must be done in the
same patch as the version bump.
Bug: T298571
Change-Id: I4044d4d9ce82b3dae7ba0af85bf04f22cb1dd347
* DeprecatedHooksTest: Don't use assertContains().
* Replace uses of deprecated asserts:
- assertFileNotExists() -> assertFileDoesNotExist()
* Update hierarchy of MediaWikiPHPUnitResultPrinter, since ResultPrinter
is an interface in PHPUnit 9.
* Remove temporary forward-compat methods.
* Remove directories that don't exist from tests/phpunit/suite.xml, since
they now make PHPUnit exit:
- tests/phpunit/skins, it used to have SideBarTest, then moved to
tests/phpunit/includes/skins
- tests/phpunit/documentation, it used to have ReleaseNotesTest, then
moved to tests/phpunit/unit/documentation
* Update configuration with --migrate-configuration and reformat.
* Avoid redefining getMockBuilder() in
ActionModuleBasedHandlerTestTrait, use a @method annotation instead.
* In RCCacheEntryFactoryTest, avoid using internal PHPUnit logic for
HTML validation, and use native PHP methods instead. The code was
copied from Xml::load (moved to \Xml\Loader::load in PHPUnit 9) and
simplified for this use case.
Bug: T243600
Bug: T262076
Change-Id: I851b9158b73d0cfc315eed9d63b15c54b05895e3
This patch or its equivalent has been landed in REL1_35, REL1_36, REL1_37,
and REL1_38 for dropping PHP 7.2, and REL1_39 for dropping PHP 7.3 as well.
Now that Wikimedia servers have moved, it's time to do this for real.
Bug: T261872
Change-Id: I6627e456447ac6e3094b3bcd9c21753904170f64
This reverts commit 2cb32437ef.
Reason for revert: We stopped using Prophecy (T315966).
Bug: T315892
Change-Id: I9eb04d903f7ec715c76836c7b5736b50e6490340
To be used in Scribunto, ref T313341.
Bug: T313341
Depends-On: I6c5ab99fde1eeb2fb48f4d42c3e886484675aa86
Change-Id: Ica3f0c81305eec7d800c794030d8346a85ea84ac
This package is installed by plenty of extensions, including
Wikimedia-deployed ones [1]; if you use the composer merge plugin to
manage dependencies, then composer will ask you if composer/installers
should be allowed to run code, because the merge plugin doesn’t merge
the allow-plugins information. Therefore, explicitly list and disallow
the plugin in MediaWiki core, even though we don’t use the package
directly.
[1]: https://codesearch.wmcloud.org/deployed/?q=composer%2Finstallers&files=^composer\.json%24
Bug: T298283
Change-Id: I29f9fb27b9d38fbb1607a0dc9991548e5a0ee967
I think this is no longer necessary since PHP commit 65067dff01 [1],
first included in PHP 7.2.21, 7.3.8, and in 7.4 since the beginning of
that series. That commit fixed the discrepancy between time() and
microtime() by making time() use gettimeofday() like microtime() already
did (and still does).
The PHP requirement in composer.json is tweaked to ensure no PHP 7.3
version without the fix is used; note that supported release branches
already require >=7.3.19, and the 7.2 requirement is unchanged.
This reverts commit d2c2bf6553.
[1]: 65067dff01
Change-Id: I8bfe0dceb809d0f63a2e9cc767ace9235d5f5246
To be backported to REL1_38, so no RELEASE-NOTES
Change-Id: I1fca338ca4383daf860149d88ed83dcc13cbd45f
Depends-On: Ib1931860b536e99a7efc8f072a3e2a6f4fe83e26
We use a function that’s introduced in PHP 7.3 and polyfilled in this
package (array_key_first(), in rdbms), but previously didn’t declare a
dependency on the package. (We declared a dependency on polyfill-php80,
but that doesn’t transitively pull in polyfill-php73.) Let’s add it.
(The package is already part of mediawiki/vendor, using the same
version.)
Change-Id: Ia76d4945087ba51354e21136f36f2614cf7d9bf8
This caused unexpected problems with no obvious fixes. Needs more work.
This reverts commit 7238dff532.
Bug: T310255
Bug: T90875
Change-Id: I3758cbb6d0029b20ec1b0f67dbf2f422031c50ae
* switch to phpunit.xml.dist instead of suites.xml
* switch composer.json to vendor/bin/phpunit
* tests/phpunit/phpunit.php is retained but will be removed after CI
jobs and other references on
codesearch (https://codesearch.wmcloud.org/search/?q=tests%2Fphpunit%2Fphpunit.php&i=nope&files=&excludeFiles=&repos=)
are removed
* add a default bootstrap.integration.php; unit tests in
composer.json use the non-MW bootstrap file (bootstrap.php)
* Migrate the phpunit.php logic into tests/phpunit/BootstrapIntegrationWrapper.php
Depends-On: I19d560bdcdb2ee914ab055e094841f2b5db8be55
Depends-On: Ib23209fc3b095e3c012ed84ce5c11f8b2d27b898
Co-authored-by: Daimona Eaytoy <daimona.wiki@gmail.com>
Bug: T227900
Bug: T90875
Change-Id: I82045c207738d152d5b0006f353637cfaa40bb66
Make use of `@` reference so that phpunit is invoked from a centrally
defined command. Otherwise phpunit:integration defaults to
`vendor/bin/phpunit` when `tests/phpunit/phpunit.php` may be desired
instead.
`composer phpunit:unit` does not use the composer.json defined phpunit
command, as it must use `vendor/bin/phpunit` and not
`tests/phpunit/phpunit.php`; the latter expects a LocalSettings.php file
which is not in place at the time that `composer phpunit:unit` runs in
CI.
See https://getcomposer.org/doc/articles/scripts.md#referencing-scripts
Change-Id: I13f947637060698226b6e5a2b593655798196de0