Commit graph

666 commits

Author SHA1 Message Date
James D. Forrester
26598c1574 Update wikimedia/assert from 0.5.0 to 0.5.1
All libraries and extensions require ^0.5.0 so this should Just Work™.

Bug: T287972
Depends-On: I38ff3873df866cd896c9028dc6277ac7aac8a932
Change-Id: I0689e447d7b603a347869aa442a58602f45b2647
2021-12-21 12:12:07 +00:00
Dan Duvall
9778adf1c5 Refactor SettingsBuilder to use BagOStuff.
Removed use of Psr\SimpleCache\CacheInterface in favor of BagOStuff, as
the latter is a tried-and-true abstraction and the former offers no real
upfront benefits since the caching patterns of SettingsBuilder are quite
basic at this time.

The simplicity of cache interface use is largely in part to the minimal
probabilistic stampede protection implementation within CachedSource
which is left untouched by this change.

Bug: T294748
Change-Id: Ie59b37a8d5c7bf96225757fa9eb9d2c762476713
2021-12-10 10:20:05 -08:00
Petr Pchelko
f98f7312e1 SettingsBuilder: add ability to validate config against schema
Not yet sure if config validation makes sense in production,
possibly before we write into cache we can validate, and then
trust that the cached values are all valid. This patch just
adds ability to validate the configuration.

"justinrainbow/json-schema" is already a transitive dependency
and is already in vendor.

Change-Id: Ib039c897a36a7e1911309fd29514657042b1b139
2021-11-30 00:09:07 +00:00
Dan Duvall
d83a7bcd09 Cache loading of SettingsBuilder sources
The `SettingsBuilder` now accepts a PSR-16 cache interface with which to
store and query settings before attempting to load from each source. By
default, no cache is used, but any object that implements the
`Psr\SimpleCache\CacheInterface` may be provided to the constructor.

An explicit dependency on "psr/simple-cache" has been added to
`composer.json`. Note that this dependency already existed in vendor
albeit it as a transitive one.

An APCu based `SharedMemoryCache` adapter is provided as a canonical
PSR-16 compliant interface for production use.

Sources are now queued by the `SettingsBuilder` when calling `load()`.
If a cache interface has been provided, and the source is considered
cacheable (implements `CacheableSource`), then it is wrapped as a
`CachedSource` which will query the cache first before loading from the
wrapped source.

Cache stampedes are mitigated using probabilistic early expiry. The
implementation for this was partially based on symfony/cache-contract
source code but also from the Wikipedia article and paper referenced
therein.

See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration

Bug: T294748
Change-Id: I52ab3899731546876ee58265bd4a1927886746dc
2021-11-29 12:54:59 -08:00
Petr Pchelko
120ef51cbf SettingsBuilder: Add YAML file format.
If php-yaml extension in installed, use that. Otherwise
we fallback to symfony Yaml parser.

php-yaml is about 20 times faster then symfony, for default-settings.yaml
it will take PHP-yaml 6ms to load it vs 100ms for symfony. But given
that the result will be cached, it's better not to bring in
a required native dependency.

Bug: T294751
Change-Id: I3ffde926c3f264cacf39810ff7bd338c9f78823d
2021-11-29 09:27:20 -08:00
Reedy
8999e0c402 composer.json: Swap composer foo for @foo
Change-Id: Ib65ad97e49ba1b847c19ce1805f32b42382882cd
2021-11-24 16:40:11 +00:00
Timo Tijhof
6655eef322 resourceloader: Update wikimedia/minify to 2.2.6
Bug: T296058
Depends-On: I526016f88ed581832fd974f55e764fd2d950992a
Change-Id: I6bceffda0c7ff4f4d92e15e85ae8719426ff4c3f
2021-11-19 20:00:08 +00:00
Tim Starling
dc8a5e1021 Upgrade to RemexHtml 3.0.1
Depends-On: I651e52c4e1346ec829a56da37e67e9649d855c08
Change-Id: Ic62ac01b4429fb269afc08aead431e78fa9eb16f
2021-11-19 00:54:28 +00:00
Reedy
64353177e1 Upgrading guzzlehttp/psr7 (1.8.3 => 2.1.0)
Change-Id: I3af605d909cffd625b278577887394cbe61a9c6e
Depends-On: I8e9c899462b23e94bc8ff7875670062f97b3f1c6
2021-11-15 16:57:25 +00:00
Reedy
b2a2e0bf45 Upgrading guzzlehttp/guzzle (7.2.0 => 7.4.0)
Change-Id: I192f0a3a58b00b6fcac35711ca3fb4b1b23378e3
Depends-On: Icbfe05e17b2e5d31da9de3f61b14b6732c56a32f
2021-11-11 22:47:28 +00:00
Timo Tijhof
f913f4d29c Update wikimedia/minify to 2.2.5
Changes since 2.2.4:

* Fix minify CLI to work from within vendor directory.
* Remove true/false !0/!1 micro optimisation. (T237042)

Depends-On: Id2f2061ac5c7389840b73ad138a91df73a40877f
Change-Id: I1f437781dd8f0cea516693a6e15fe3f95a0aa2ad
2021-11-11 22:19:51 +00:00
Reedy
53ceaca6f9 Update doctrine/dbal versions
Change-Id: I9af2b53825afc7497af4a474c2940fd7dd841e72
2021-11-08 20:30:12 +00:00
Petr Pchelko
db5cb74486 Upgrade to Shellbox 3.0.0
Depends-On: Idfe35c788a84f04a760edb01c0bf48ddc8accb1f
Change-Id: Ib5ffeec5bb6b45ea7fb93aec8df4368231188b67
2021-11-05 08:31:26 -07:00
Volker E
2d25498471 Update OOUI to v0.42.1
Release notes:
 https://gerrit.wikimedia.org/g/oojs/ui/+/v0.42.1/History.md

Bug: T283812
Bug: T287329
Bug: T288928
Bug: T289043
Bug: T289043
Bug: T290792
Bug: T290975
Bug: T291142
Bug: T291284
Bug: T293274
Bug: T293635
Depends-On: I0918c0c866147e6a103ce8815b7a36d0463457b7
Change-Id: I717ff53e18e95c72ace1c46b6236cfecb5cd8217
2021-11-04 19:39:43 +00:00
Tim Starling
6273b5f932 Upgrade RemexHtml to 3.0.0
This is required by Parsoid 0.15.0-a6.

I don't need to increment the Parsoid version here since it is
not using semantic versioning. The caret will allow upgrades until the
Glorious Future of 1.0.0.

Depends-On: I72346a431f556555410f6af64bdb10140ea9bd8a
Change-Id: Idefebb725444d244252623533b8469214324f931
2021-10-27 16:29:18 +00:00
Alexander Vorwerk
bd13a42535 build: Update mediawiki-codesniffer from v37.0.0 to v38.0.0
Change-Id: Iff096d3789b8c261aa47fb41d6f450a3bda7ce6a
2021-10-22 22:43:16 +02:00
Reedy
7accea74ec Upgrading wikimedia/wrappedstring (v3.2.0 => v4.0.1)
Depends-On: Ic26f3a3be1061b77e0af7b8c4c2569f9d070d191
Change-Id: I5a9f97cac52e4e9af612c2130359b017fb7176c1
2021-10-12 23:30:27 +00:00
Reedy
2bcc75c9b4 Upgrading zordius/lightncandy (v1.2.5 => v1.2.6)
Depends-On: Ie300e47f0c1429784a9ee97d99b25e37ea83787a
Change-Id: Ic2829a2d1c6d4ba106b162416cedecd7066f2c34
2021-10-09 10:25:10 +00:00
Reedy
7735af1e27 Upgrading psr/log (1.1.3 => 1.1.4)
Change-Id: If11d0081355eb9caa157fb92389d92ac65b27d4e
Depends-On: I5c4006f5747075a92a78900606e196d33c6d9a8f
2021-10-08 21:51:56 +01:00
Reedy
000ae1d062 composer.json: Relax some constraints for some dev requirements
Change-Id: Ife7ddb98e3c1064a4e4e70f119549b2a1394e2d7
2021-10-08 21:51:21 +01:00
Reedy
659fd89408 Update pear/*
- Upgrading pear/mail_mime (1.10.9 => 1.10.11)
  - Upgrading pear/net_smtp (1.9.2 => 1.10.0)

Depends-On: Ib698ef15b6f97ea637aedcc6ef26860c8c4a2cd0
Change-Id: I287e148a9078866a55e5f04693406374d8cca976
2021-10-08 21:50:17 +01:00
libraryupgrader
2a64e209da build: Updating dependencies
composer:
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

npm:
* @wdio/mocha-framework: 7.4.6 → 7.13.2
  * https://npmjs.com/advisories/5197 (CVE-2021-3807)
* nth-check: 2.0.0 → 2.0.1
  * https://npmjs.com/advisories/5101 (CVE-2021-3803)
* ansi-regex: 5.0.0 → 5.0.1
  * https://npmjs.com/advisories/5197 (CVE-2021-3807)

Change-Id: I0b17591a4d230192d5c64b68252bb3024ddcedae
2021-10-04 06:38:39 +00:00
jenkins-bot
d88c00f283 Merge "Bump wikimedia/parsoid to v0.15.0-a1" 2021-09-27 22:15:32 +00:00
C. Scott Ananian
7e37641898 Bump wikimedia/parsoid to v0.15.0-a1
Depends-On: I98e9bde6adfe6954a98748cc646367992f25a190
Change-Id: I210c66c350de1d310480f65385ce67ded7129792
2021-09-27 21:41:20 +00:00
Kunal Mehta
041dadd69d Update wikimedia/shellbox to 2.1.0
Depends-On: Ie53f3d000d9d8ae1617b7bdeb454586e8302e240
Change-Id: I7d7285d6ee8b107bf77a68354bb3861d10174258
2021-09-24 17:08:17 -07:00
Reedy
452329b6c2 Update composer/semver from 3.5.4 to 3.5.5
Change-Id: I7bbc99303b07fe363094ddbe7624aabbc60dafb3
Depends-On: Iec357af3b6c9e1af9802f7fab7f189d06a55737a
2021-09-23 08:30:42 +01:00
Reedy
50bb8bfdfb Update composer/spdx-licenses from 1.5.4 to 1.5.5
Change-Id: Ia286cae043469ee2b213c5869d096d4cecab7f4f
2021-09-23 08:28:01 +01:00
Reedy
75706c4f22 Update doctrine/dbal for PHP >= 7.3 from 3.0.0 to 3.1.2
Change-Id: I5a4adf69dd5726bdb0586a1545712ef6dd8daea3
2021-09-22 23:13:18 +00:00
Reedy
ad49bffd76 Update doctrine/dbal for PHP < 7.3 from 2.10.4 to 2.13.3
Change-Id: Ic6c4f49c66d3f3990a15615cc5b085e5134df8d3
2021-09-22 23:13:05 +00:00
Alexander Vorwerk
b65df96646 build: Update wikimedia/purtle from 1.0.7 to 1.0.8
Depends-On: I608c1215b5209c25493c997beb21b58ecf20c7ca
Change-Id: Iaeeda4e17cb3b04feb813c3f7590f4cba1a5a7f6
2021-09-21 14:57:53 +00:00
C. Scott Ananian
78522aea4b Add symfony/polyfill-php80
Doing this before REL1_37 ensures that any PHP8.0-isms won't break
backports.

Bug: T290697
Change-Id: I945a08d219c3d30813ca2f778d097ebd8bb0f129
2021-09-13 22:15:27 -04:00
James D. Forrester
017366e2cf Update cssjanus/cssjanus from 2.0.0 to 2.1.0
Depends-On: Iac0b7702b001062495f1e08d055481d3c436161e
Change-Id: I259c341ad04fcb13921d0cf2433e0552a8870bad
2021-09-09 12:44:48 -07:00
Umherirrender
07b499fbcf build: Update mediawiki/mediawiki-phan-config to 0.11.0
Addition and remove of suppression needs to be done with the version
update.

Change-Id: I3288b3cefa744b507eadebb67b8ab08c86517c1c
2021-09-07 17:19:05 +02:00
James D. Forrester
31933c28ee Update wikimedia/wait-condition-loop from 2.0.1 to 2.0.2
Bug: T289176
Bug: T287972
Depends-On: I009fde18d039ede388a758021651961f0c0f13b0
Change-Id: I9bf513183672e83ded09647de79e36c407b1fa01
2021-08-24 16:21:10 +00:00
Kunal Mehta
c92485ebe2 Update wikimedia/shellbox to 2.0.0
Depends-On: I104309fcc7823a881c0cd005fad3aea7ab89f318
Change-Id: I10e2860f306483e43dd9d65783c8ff96f2eee169
2021-08-23 11:18:42 -07:00
Volker E
c3dc0a2d99 Update OOUI to v0.42.0
Release notes:
 https://gerrit.wikimedia.org/g/oojs/ui/+/v0.42.0/History.md

Bug: T201491
Bug: T269657
Bug: T277821
Bug: T277821
Bug: T277845
Bug: T277985
Bug: T278594
Bug: T279479
Bug: T280913
Bug: T282047
Bug: T283247
Bug: T283905
Bug: T285310
Bug: T285727
Depends-On: I78638ae140e999afa027ef86dd82beabc13ee0fc
Change-Id: Id0be3526bcafb549f2bac5c0026fb24e46745320
2021-08-18 23:56:04 -07:00
Fomafix
6157bdaef0 CSSJanus: Update from version 1.3.0 to version 2.0.0
This version fixes a flipping bug.

Bug: T288943
Depends-On: Ida34372a4e5acb3147d83c7a1d008850c8382e32
Change-Id: I0528443e4eae0338f5a37491352db03944c6bd4c
2021-08-16 18:39:41 +00:00
C. Scott Ananian
b1f53045d7 Bump wikimedia/remex-html to 2.3.2 and drop 2.3.1
This is a bug fix release of RemexHtml, required by the latest version
of Parsoid.

RemexHtml migrated to a new namespace in 2.3.2.  Since we don't
support aliases in our phan configuration in core, update all uses to
the new namespace to satisfy phan.

Depends-On: I30f01f4a2a5479bb82c9b952ffa68a478215828a
Depends-On: Iedf446635ee2112cfe637d8ebcf8092f0976bd17
Change-Id: I74fc929e4a66b28bfb1800ff0cd751c86e4a9f50
2021-08-08 18:07:29 -04:00
C. Scott Ananian
2fa79194ad Allow core to use remex-html 2.3.2
This is a bug fix release of RemexHtml, required by the latest version
of Parsoid.

RemexHtml migrated to a new namespace in 2.3.2 and uses aliases for
compatibility.  Once we upgrade mediawiki-vendor we can rename all
the uses in core and turn off aliases again.

Due to T287419, we need to suppress some phan issues because phan
ends up running against both remex 2.3.1 *and* 2.3.2 in different
CI jobs.  These suppressions are removed in the follow up
I74fc929e4a66b28bfb1800ff0cd751c86e4a9f50.

Change-Id: I42edd4fb8cd277ea20e331994fcbe56b52bf3f06
2021-08-08 17:55:15 -04:00
Reedy
67c2c25a14 Updating wikimedia/relpath (2.1.1 => 3.0.0)
Change-Id: I83339f7ab340bc20667955f3cf1592982f6844ee
Depends-On: Ia77ffc78b48d4158691b23b5e09cd7a187a0eb62
2021-08-03 18:20:27 +01:00
jenkins-bot
2322742b23 Merge "Update wikimedia/minify to 2.2.4" 2021-07-28 20:11:10 +00:00
Timo Tijhof
bb8fde085a Update wikimedia/minify to 2.2.4
Bug: T287526
Depends-On: Ib3807d41e05df228dec5388dc2dd65f60950024c
Change-Id: Iebd6ef11d90fad146d05f9c1f0a5af8e7f09684f
2021-07-28 15:47:20 +00:00
Reedy
74aa92ea5a composer.json: Promote and pin monolog/monolog to require from require-dev
wikimedia/shellbox requires monolog/monolog, making it required in MW

Change-Id: I1c1c72e29920509d0ec3726add4920409b824c8b
2021-07-28 16:34:02 +01:00
libraryupgrader
5357695270 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0
  The following sniffs now pass and were enabled:
  * Generic.ControlStructures.InlineControlStructure
  * MediaWiki.PHPUnit.AssertCount.NotUsed

npm:
* svgo: 2.3.0 → 2.3.1
  * https://npmjs.com/advisories/1754 (CVE-2021-33587)

Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
2021-07-22 03:36:05 +00:00
jenkins-bot
0dad077669 Merge "phpcs: Use cache flag" 2021-07-13 13:22:24 +00:00
jenkins-bot
e1449a9bd3 Merge "build: Upgrade php-parallel-lint from 1.2.0 to 1.3.0" 2021-07-12 12:08:36 +00:00
Gergő Tisza
cf76211359 Add wikimedia/normalized-exception library
Depends-On: I8c3a0431ed3a80bc39f0572ae773bb2782b1bdc8
Change-Id: I1f8ad6a0c5e7d4f68274b40473a6c3d2882c782b
2021-07-07 22:01:27 +02:00
Kosta Harlan
e5ea5937fa phpcs: Use cache flag
This will use a temporary cache directory for the files analyzed by
phpcs, so that subsequent runs are fast.

Bug: T209149
Change-Id: I15967d220c1dbf9f06551cf4a5d01af5ddb739b6
2021-07-06 13:26:55 +02:00
James D. Forrester
f7487b6cac build: Upgrade php-parallel-lint from 1.2.0 to 1.3.0
Change-Id: Ibdf7a8935c194b00139b7ff0a2f32c3b58f06e10
2021-06-29 11:10:36 +01:00
DannyS712
4b2bb69b99 Remove dependency on pimple external library
Dependency was added in T254053 so that we
could use a pimple ServiceLocator in
MediaWikiTestCaseTrait::createSimpleObjectFactory.
But, since the ServiceLocator being created is using
an empty container, its not actually used for anything,
and can easily be replaced with a mock that says
it has no services and throws if trying to retrieve any.

Per the PSR11 spec, the container interface should
throw an exception that implements
NotFoundExceptionInterface - use the
NoSuchServiceException from the Services library
that we use for MediaWikiServices

Change-Id: I721e7417036a8b0fa9084e9d13329262253ae0f6
2021-06-24 07:18:23 +00:00