aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/unit
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Remove inline @var docs that aren't neededthiemowmde2024-11-052-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Not needed (any more) because the code already contains enough @return docs and such. Change-Id: If461fa035d2c646878540565b3087a74c6628552
* | | | objectcache: Introduce dataRedundancy to SqlBagOStuffAmir Sarabadani2025-03-111-10/+20
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This forces SqlBagOStuff to instead of sharding keys, write to n out of m servers instead. It also reads from those servers as well and in case of incosistency, picks the value with the highest exptime. This is mostly for mainstash and allows us to provide stronger consistency guarantees while allowing for a section to be depooled and put to maintenance. It basically implements the logic already used by NoSQL database systems such as Cassandra (There are two types to solve conflict, quorum or timestamp, Cassandra is using quorum while we are using timestamp). There will be some edge cases that it might still pick the wrong value: - if TTL is set to INDEF - if the TTL gets shortened for various reasons. - If we go with two clusters, value is set, one gets depooled, a new value is set, the depooled one gets pooled and the other depooled and then read happens. But all of these are extremely rare edge cases and we should be fine. This also means if data redundancy is set, locking means all sections will be locked and removal means all sections must allow the unblock. Otherwise, the lock will be kept. Bug: T383327 Change-Id: I80da12396858ee4fc58ae257f6c154b3050df696
* | | language: Add test coverage for inLanguage() validationTimo Tijhof2025-03-111-1/+2
| | | | | | | | | | | | | | | | | | Follows-up Ia9ddb1b83a6f20d3f7ce. Change-Id: I685699d905c94e3b5af99a73dd3ba1d8def2d779
* | | DeletePage: emit PageDeletedEventdaniel2025-03-101-1/+17
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - We want to replace the PageDeletionComplete hook with an event - We want to validate our design for the hierarchical event type system and the modeling of page events. What: - Introduce PageDeletedEvent - Make DeletePage emit PageDeletedEvent - Move update triggers from DeletePage into ingress objects: - search index - message cache - module cache Bug: T379932 Change-Id: I01490fbaf33118eba109aa91908783117ba5aa20
* | user: Add filtered versions of CentralIdLookup::lookupUserNamesTim Starling2025-03-061-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a batch version of CentralIdLookup::isOwned(), to support the linked bug. * Add test. * Fix error in LocalIdLookupTest::provideIsAttachedShared() which failed to provide the shared case due to an incorrect loop bound. This test has been non-functional since it was introduced in 2015. * Fix error in LocalIdLookupTest::newLookup() which failed to override the config. Bug: T386584 Depends-On: Ie63ed1f14c9ba4f9cefcceef05d5585a6676f111 Depends-On: I83716f7930bd0d2de4761cc5b04d9d3ff4172da2 Change-Id: I99dd733547f46e635c2f363166ce111e76e06a5e
* | Use namespaced Title classUmherirrender2025-03-021-1/+1
| | | | | | | | Change-Id: Ic5f178b202574b937169a47faf1566bd62bf6ad3
* | Merge "rdbms: Don't forward DB connection handle to transaction callbacks"jenkins-bot2025-02-262-10/+8
|\ \
| * | rdbms: Don't forward DB connection handle to transaction callbacksMáté Szabó2025-02-122-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - When a transaction lifecycle callback such as onTransactionPreCommitOrIdle() is invoked by rdbms, rdbms passes in the DB connection handle the callback was scheduled on. - However, the DB connection handle may have since been reset to a different DB domain on the same physical cluster due to connection reuse. - We could implement bookkeeping to keep track of the expected DB domain for each pending callback and ensure the passed-in DB handle matches that before invoking the callback, but nobody seems to be making use of the passed-in DB handle except for two call sites in core. - As such, it seems more prudent to remove this functionality. What: - Stop passing the DB connection handle to rdbms transaction lifecycle callbacks. Bug: T386190 Change-Id: I9125bfb8b5e2cac4aab3525ffd229ea49beccc17
* | | Merge "DomainEvents: remove the concept of invocation modes"jenkins-bot2025-02-262-26/+12
|\ \ \
| * | | DomainEvents: remove the concept of invocation modesdaniel2025-02-262-26/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - We only want to support a single invocation mode for now. What: - Remove handling of invocation modes from EventSubscriberBase and EventDispatchEngine. Bug: T387012 Change-Id: Ie1df95f50cdb763fceda5751d6defa665fd114ff
* | | | Merge "output: Use associative arrays to store modules"jenkins-bot2025-02-251-0/+145
|\ \ \ \
| * | | | output: Use associative arrays to store modulesMáté Szabó2025-02-201-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - OutputPage::addModules() and OutputPage::addModuleStyles() currently store added module names in two lists, mModules and mModuleStyles. - The contents of these lists then get passed to array_unique() when OutputPage::getModules() is invoked, to filter out any duplicate module names. - In I4f70ff15becbc4991c4f1b0307a14d5354c79dc1, we would like to modify UserLinkRenderer::userLink() to automatically add the requisite ResourceLoader modules to the output, instead of every page where userLink() is called needing to do so manually. This can cause these modules to be added thousands of times when a large list with many user links is rendered, e.g. on RecentChanges. - Running `php maintenance/run.php benchmarks/benchmarkEval output.php`, where output.php holds: ``` $out = ( new RequestContext() )->getOutput(); for ( $j = 1; $j <= 2000; $j++ ) { $out->addModules( 'ext.foo' ); } $out->getModules(); ``` takes about 4-5ms on my system. - Turning the properties into associative arrays and getting rid of the array_unique() call drops this to < 0.2ms. - These properties are exposed via public property accessors that have been deprecated since MW 1.38 and have no usages in codesearch.[1] Since we're changing how the properties work, this is a good time to remove the deprecated public property accessors. What: - Use associative arrays to store module names in OutputPage. - Document that addModules() and addModuleStyles() take a string|string[] rather than a string or an arbitrary array. - Add unit tests for the behavior. - Drop the deprecated public property accessors for mModules and mModuleStyles. [1] https://codesearch.wmcloud.org/search/?q=mModule%5BSs%5D Bug: T358469 Change-Id: I86c557a4ce7207359d100538c0d4b1ffa75fcbf9
* | | | | Merge "LinkBatch: Introduce addUser() helper"jenkins-bot2025-02-252-0/+4
|\| | | |
| * | | | LinkBatch: Introduce addUser() helperMáté Szabó2025-02-202-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - After I4f70ff15becbc4991c4f1b0307a14d5354c79dc1, it will become necessary to prefetch the expiration status of temporary accounts when rendering user links via UserLinkRenderer for a large list of users. - We would ideally like to accomplish this without requiring every user of UserLinkRenderer to take a direct dependency on TempUserDetailsLookup, which exposes this functionality. - Since most users of UserLinkRenderer / Linker::userLink() already use LinkBatch to prefetch page existence for the user and user talk pages that UserLinkRenderer will link to, encapsulating the TempUserDetailsLookup interaction within LinkBatch seems like a decent middle ground. What: - Add LinkBatch::addUser(), which takes a UserIdentity and adds its user and user talk pages to the batch while also triggering a batch lookup of expiration status for users added this way when execute() is called. Bug: T358469 Change-Id: Ic837961296cc4bf166dde79c7f073cc50ce925da
* | | | | Merge "Code cleanup in UserArray & UserArrayFromResult"jenkins-bot2025-02-241-40/+16
|\ \ \ \ \
| * | | | | Code cleanup in UserArray & UserArrayFromResultthiemowmde2025-02-241-40/+16
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just a few modernizations, utilizing more recent PHP features. Notable: * Much more strict language-level types. E.g. it's not allowed to call newFromNames with a single string any more. (Was never allowed and doesn't make any sense anyway.) * Drop unnecessary @covers tags in the test for the reasons explained in I2678992. Motivated by I15d9134. Depends-On: Ia88a8e724bb35781286528fa6403b2fe8ee3cfab Change-Id: Id90b6838429eca4bd662546e89fb1a91a8ae7c4f
* | | | | Merge "user: Introduce TempUserDetailsLookup service"jenkins-bot2025-02-211-0/+162
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | user: Introduce TempUserDetailsLookup serviceMáté Szabó2025-02-201-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - The TSP team would like to adjust the rendering of user links associated with temporary accounts, depending on whether the temporary account is expired. - This requires a mechanism to efficiently retrieve the expiration status of temporary accounts, even when rendering large lists with many user links, e.g. Special:RecentChanges or page histories. What: - Introduce the TempUserDetailsLookup class and service that holds the expiration status of temporary accounts in an in-memory LRU cache. This uses the new UserRegistrationLookup::getFirstRegistrationBatch API. - Provide a preloadExpirationStatus() method, similar to GenderCache or LinkBatch, that allows callers to prefetch expiration status for a batch of users. A followup patchset will add these to pagers as needed. Bug: T358469 Change-Id: I98ec17046c0863878eba3768d83f083bc2753e6f
* | | | | Merge "editpage: Make BrokenRedirectConstraint provide its own error message"jenkins-bot2025-02-211-2/+4
|\ \ \ \ \
| * | | | | editpage: Make BrokenRedirectConstraint provide its own error messageSomeRandomDeveloper2025-02-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate the error message in the getLegacyStatus function in the constraint class instead of EditPage. The submit button label has to be passed to the edit constraint since the logic for determining it it resides in EditPage. Bug: T384399 Change-Id: Id2a9ab57198dfa4df07f91b067944e9f9fefb81a
* | | | | | Split MessageParser out of MessageCacheTim Starling2025-02-212-2/+4
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MessageCache has enough to do without also being a parser. Split a MessageParser class out of MessageCache and make it a service. * MessageCache::parseWithPostprocessing() becomes MessageParser::parse() because every caller wants postprocessing so it makes sense to use the shorter name for this. * MessageCache::parse() becomes MessageParser ::parseWithoutPostprocessing(). I changed the return type from ParserOutput|string to ParserOutput, which is a followup to I8a1fa84e650d920d07d74722d8059d5afeedec6b. Narrowing the return type does not break b/c so it is possible to make this change for both variants. * In the new methods, a null title is always a convenience alias for a placeholder title (Special:Badtitle). This reflects the convention in Parser::setPage(). The old MessageCache::parse() retains its b/c fallback to $wgTitle. MessageCache::transform() had the potential to fall back to the title used in the previous call, a fragile mechanism which I removed without deprecation. * For consistency, allow a string language in all new methods. * In EmailNotification, clean up an early attempt at global state avoidance. Change-Id: I05ab21508d5f8394189fd41ac6a2254ac0e0d785
* | | | | Merge "phpunit: Add tests for MediaWikiPropagator"jenkins-bot2025-02-201-0/+44
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | phpunit: Add tests for MediaWikiPropagatorMáté Szabó2025-02-191-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - MediaWikiPropagator is currently untested. What: - Add unit tests for this class. Change-Id: I8278b3f49bdd838be6fba9264d666f3d3ba3423d
* | | | | Merge "notifications: switch no handler present exception to a warning"jenkins-bot2025-02-191-3/+4
|\ \ \ \ \
| * | | | | notifications: switch no handler present exception to a warningPiotr Miazga2025-02-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are no handlers system shouldn't fail with an exception. Bug: T383992 Change-Id: Ia33524af2574d10375f2cb0586bbdabd9d0adb48
* | | | | | user: Implement batch user registration lookupsMáté Szabó2025-02-192-5/+215
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - The TSP team would like to change the way expired temporary account user links are displayed, which requires an efficient way to fetch their registration timestamps. - On WMF wikis, which use CentralAuth, this requires fetching the first (i.e. global) registration timestamp of the account, rather than the naïve approach of using the registration timestamp from the local user table. - MediaWiki provides the UserRegistrationLookup facade to transparently fetch the earliest registration timestamp for a single user, but offers no batch interface to do the same. - Since user links are often rendered in large pagers, a batch interface is needed. What: - Add IUserRegistrationProvider::fetchRegistrationBatch(), which takes an iterable of UserIdentities and returns a map of their registration timestamps (or null if not available), keyed by user ID. Although this interface is marked as stable to implement, its sole non-core implementor according to codesearch is CentralAuth. - Add UserRegistrationLookup::getFirstRegistrationBatch(), which delegates to fetchRegistrationBatch() on configured registration providers and returns the earliest registration timestamp for each user in the batch. - To avoid potential interface incompatibility in WMF production, this depends on CentralAuth implementing the new IUserRegistrationProvider method first. Bug: T358469 Depends-On: Ibe28163e962161567d486607e36d999a36a1e604 Change-Id: I1f6af2693a8f0c5c854b8a6b04edd1eb21934007
* | | | | block: Add a BlockTarget class hierarchyTim Starling2025-02-197-22/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main change: * Add a class hierarchy representing block targets, representing a target and type. * Add BlockTargetFactory, replacing BlockUtils. * Add CrossWikiBlockTargetFactory, replacing BlockUtilsFactory. * Construct a BlockTarget object early in the request flow and pass it down through the layers, instead of having every layer interpret UserIdentity|string target specifications. Also: * Remove Block::TYPE_ID. Nothing uses it in code search, so there's no point in porting it to the new system. * Stop using the type constants as specificity scores. Add BlockTarget::getSpecificity(). * Add DatabaseBlockStore::newUnsaved() to replace direct construction of DatabaseBlock in insertBlock() callers. There are many such callers in tests. This is part of the effort to remove the service container usage in DatabaseBlock::__construct(). * Make DatabaseBlock::getRangeStart() and getRangeEnd() return null if the block is not a range, since that is convenient for their only caller following the resolution of T51504. * Add DatabaseBlock::getIpHex() which similarly maps to a DB field in the new schema. * In ApiBlock and ApiUnblock, have ParamValidator provide UserIdentity objects instead of converting to a string and back to a UserIdentity again. Bug: T382106 Change-Id: I2ce1a82f3fbb3cf18aa2d17986d46dbdcc70c761
* | | | | Merge "block: Fix vague target requirements in BlockPermissionChecker"jenkins-bot2025-02-181-19/+17
|\ \ \ \ \
| * | | | | block: Fix vague target requirements in BlockPermissionCheckerTim Starling2025-02-131-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The doc comment of newBlockPermissionChecker() describes the $target parameter as being optional. The returned object does not need or use a target when checkBasePermissions() or checkEmailPermissions() are called. But failing to pass a target when calling checkBlockPermissions() is incorrect. This was the subject of the linked bug. If an admin is performing a block, self-unblock permissions need to be checked, this is not optional. This could be enforced at runtime, but it seems safer and simpler to enforce it statically. So, move $target from being a constructor parameter to being a formal parameter of checkBlockPermissions(). This formal parameter will be statically required after a deprecation period. Deprecate newBlockPermissionChecker() and introduce newChecker(), using a name with a slightly less than conventional verbosity to allow us to change the parameter order. There is no $target parameter to newChecker(). Backwards compatibility is supported by adding an internal mutator method setTarget(). This can easily be removed after the deprecation period is over. In Special:Block, checkBlockPermissions() was called with $target=null on form entry, meaning that the user could unblock themselves if the target was specified in the URL, but could not unblock themselves by searching with the form. This seems inconsistent. So allow blocked admins to see the search form, but show an error when they try to block or unblock someone other than themselves. Bug: T384716 Change-Id: I8c26cdcc9b87b74bc458fe731cf7f170a2607150
* | | | | | Merge "Hooks: Remove FauxGlobalHooksArray"jenkins-bot2025-02-181-59/+0
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Hooks: Remove FauxGlobalHooksArraydaniel2025-02-181-59/+0
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - $wgHooks should work like a regular configuration variable which cannot be modified after bootstrap. - FauxGlobalHooksArray was in place to trigger deprecation warnings for write access to $wgHooks since 1.40. What: - Remove FauxGlobalHooksArray and supporting code Bug: T331602 Change-Id: I8d881857850a906b893cf3066dcfbe277f9b0b14
* | | | | Merge "Add a built-in way to send notifications"jenkins-bot2025-02-181-0/+103
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add a built-in way to send notificationsBartosz Dziewoński2025-02-121-0/+103
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a provider pattern for sending notifications (T383992). There is no base notifications handler in core; they can only be provided by extensions. A handler in the Echo extension, compatible with the existing Echo notifications system, will be implemented in T383993. Co-Authored-By: Piotr Miazga <pmiazga@wikimedia.org> Bug: T383992 Change-Id: I16b309935c3d29c3cde4459b5e36abce063a8534
* | | | Merge "phpunit: drop unused data provider in ExtensionProcessorTest"jenkins-bot2025-02-161-52/+0
|\ \ \ \
| * | | | phpunit: drop unused data provider in ExtensionProcessorTestDaimona Eaytoy2025-02-131-52/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added in I7074b65d07c5c7d and unused ever since. It was used until patch set 6, then ExtensionProcessor was refactored to support batching in PS7 and the tested method, `setToGlobal`, was removed together with its test but not this data provider. Change-Id: I31a07ec8ea320cd5dc946f881f380f603632619a
* | | | PermissionManager: Differentiate between cascading protection of file ↵Dylan F2025-02-141-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | content and file pages This patch reworks RestrictionStore::getCascadeProtectionSourcesInternal to return a third and fourth array: * One for cascading restrictions originating from templatelinks * Another for those originating from imagelinks They are used in PermissionManager::checkCascadingSourcesRestrictions to differentiate cascading protection of file content and file page, but could also be used in the future by action=info and other callers. Bug: T24521 Bug: T62109 Bug: T140010 Change-Id: Ia5863f418538106f4fd657c672298ff6ac835805
* | | | Merge "user: Use TS_MW to compare timestamps in UserRegistrationProvider"jenkins-bot2025-02-131-0/+49
|\ \ \ \
| * | | | user: Use TS_MW to compare timestamps in UserRegistrationProviderUmherirrender2025-02-131-0/+49
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is valid to use TS_MW for chronological compare as the timestamp stored in a string is ordered from the most significant datetime information (year) to the lowest (seconds). It is not needed to convert to unix. It would not be valid to use TS_MW format to calculate time differents. This is how it is used in the database schema from mediawiki as well. Also replace array + min() with variable + if. Change-Id: Id41e660f3952876e20ac4e88502d7e2757299573
* | | | Merge "tests: Replace use of deprecated PermissionStatus methods"jenkins-bot2025-02-131-34/+44
|\ \ \ \ | |_|/ / |/| | |
| * | | tests: Replace use of deprecated PermissionStatus methodsBartosz Dziewoński2025-02-121-34/+44
| |/ / | | | | | | | | | Change-Id: I23ce3b4d26bbe58257b449993a54c45093007a3e
* / / logging: Use LinkTarget in LogFormatter::getPreloadTitles overridesUmherirrender2025-02-131-5/+5
|/ / | | | | | | | | | | | | Also avoid null as array item, as that is not allowed according to the return type Change-Id: I4083c55a69d6186448a13f35f18d96bfe9ffd23c
* | Merge "Fix some local test failures"jenkins-bot2025-02-102-15/+0
|\ \
| * | Fix some local test failuresTim Starling2025-02-102-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Many tests failed if $wgAutoCreateTempUser['enabled'] was not set. This is set in DevelopmentSettings.php. Set it in TestSetup.php. * The Asia/Calcutta timezone, described as deprecated, is missing from my system. Remove the test case. * Three stub object tests called error_reporting(-1) on setUp() and restored it on tearDown(), but our check for preserved error level now runs as a postCondition hook, before tearDown(). This worked anyway for most people because DevelopmentSettings.php also has error_reporting(-1). Remove the error_reporting(-1) calls from the tests since it's not actually needed to pass -- we intercept deprecation calls at the application level. I confirmed that this fix works with php -d error_reporting=0. Change-Id: Ia43ce26345a0a8432c41b46907de2dfbffa00670
* | | Skin: Support responsive footer iconsJon Robson2025-02-082-1/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows footer icons to declare different images at different media queries via the picture element e.g. $wgFooterIcons['poweredby']['mediawiki']['sources'] = [ [ "media" => "(max-width: 720px)", "srcset" => "https://en.wikipedia.org/static/images/mobile/mediawiki.png", ]; Bug: T384619 Change-Id: Ib325690906bc7fd9c0668cf2f77f0690d826d98e
* | | Merge "REST: include ETag in 304 responses"jenkins-bot2025-02-071-3/+20
|\ \ \ | |/ / |/| |
| * | REST: include ETag in 304 responsesdaniel2025-02-051-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: RFC9110 requires 304 "not modified" responses to contain the "date" and "etag" headers. Failing to include them caused etags to be missing from responses that were returned from cache after checking the backend using if-modified-since. What: - Make Handler::checkPreconditions() call applyConditionalResponseHeaders() to add the conditional headers if the precondition check fails. Bug: T357603 Change-Id: Ic2e288c971774a561395b3df04bab7256ca62014
* | | Merge "DomainEventDispatcher: guarantee async dispatch"jenkins-bot2025-02-052-40/+21
|\ \ \
| * | | DomainEventDispatcher: guarantee async dispatchdaniel2025-02-042-40/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - Callers of the dispatch() method should be able to be sure that event listeners cannot interfere with the current transaction. What: - remove support for the "before commit" invocation mode Bug: T379775 Change-Id: I04ae5281228e71e82a1fe514d2d7a5e53b510cc8
* | | | Merge "Stats: add UnitTestingHelper"jenkins-bot2025-02-051-0/+123
|\ \ \ \
| * | | | Stats: add UnitTestingHelperCole White2025-01-301-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: T368740 Change-Id: I1b9435dcdacd952b2bc703b3d5f7083406ebbed6