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
* This patch only adds support for
- selser manual edits tests
- selser changetree [5] tests
Both these types of selser tests are known statically.
* This doesn't yet add support for selser auto-edit tests since
they cannot be determined statically.
There is some code already in place in the test runner to apply
change trees, but it will all likely get refactored in a future
patch.
Bug: T270311
Depends-On: I3be7826e08be120043f3bcd9151bade930b65fb7
Change-Id: Ic824dae6ee49867c766d40c11acfda117c7e2689
Move the relevant options to the config file instead, and add some hacky
code to force that config file if none was passed. "--help" works even
without the previous hack.
Bug: T90875
Change-Id: I84421e3eeaad0f88be83477cb99d6524abe13b77
MediaWiki still supports PHP 7.2+, but we want to mainly test in newer versions
of PHP. Setting minimum_target_php_version to 7.2 this lets us run phan without
phan trying to get us to make PHP 7.2-incompatible changes to 'appease' PHP 8.0
or whatever later changes.
Some switches of generic 'resource' type-hinting to 'resource|object' to inform
phan to ignore this (triggering PHPCS at the time, ah well), rather than trying
to hint the specific novel PHP encapsulation classes to that have replaced them
from PHP 8.0 onwards but don't yet exist, and fixes from where we were checking
the results of implode and explode.
Bug: T293924
Change-Id: I629e3fb3adfad73beb3d424a07e643c2e079d9bb
Also remove the unmaintained kafka-php package from the from "suggested"
and "dev" composer dependencies, as this is now no longer used.
Change-Id: If5668974f417b627df95bce47db18d46fa03327c
This appears impossible to use because the request is always made
with `Content-Type: application/json`.
* It seems unreasonable for an Etcd server to not support JSON.
* It seems unreasonable for an Etcd server to respond with YAML
to a JSON request.
* It seems unlikely that anyone would prefer YAML over JSON for
the automated encoding and decoding of fully automated inter-service
communication.
Change-Id: I290e03e17d547c3dc675820bb024c940e02e097a
Some node modules include PHP scripts, and these files shouldn't be
analyzed.
This could be improved further by excluding `extensions/*/{node_modules,vendor}`,
but I wasn't able to find a way to represent this for php-parallel-lint
without listing each directory individually.
For comparison, .phpcs.xml has this line to exclude dependencies:
<exclude-pattern type="relative">^(\.git|coverage|node_modules|vendor)/*</exclude-pattern>
Change-Id: I285eb32f67b71eaf111c9c9cd12f8205ba97eaf3
Also, re-alpha-sort the lists of external libraries in the release
notes file.
Bug: T287972
Depends-On: Ib55a7fc8968ec7e951d4e4d160db0601aaff74ea
Change-Id: If9fd7efd0f232a567204fee0b7b093f6edacd456
Also note in RELEASE-NOTES about promotion from require-dev to require
Depends-On: Ibfdbd2a479bd13d95e00fb41c2dd26b6ea6ea561
Change-Id: Ie1368ea2e5799b6b1e3f991b8156b967e12e0210
All libraries and extensions require ^0.5.0 so this should Just Work™.
Bug: T287972
Depends-On: I38ff3873df866cd896c9028dc6277ac7aac8a932
Change-Id: I0689e447d7b603a347869aa442a58602f45b2647