aboutsummaryrefslogtreecommitdiffstats
path: root/includes/jobqueue/JobFactory.php
Commit message (Collapse)AuthorAgeFilesLines
* Namespace all remaining files in includes/jobqueueJames D. Forrester2025-03-201-2/+0
| | | | | Bug: T353458 Change-Id: I95690a312e356c45dbeed607d32fb0e4626690cf
* Fix Phan suppressions related to Title::castFrom*() and friendsBartosz DziewoƄski2023-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | There is no way to express that Title::castFromPageIdentity(), Title::castFromPageReference() and Title::castFromLinkTarget() can only return null when the parameter is null. We need to add Phan suppressions or explicit types almost everywhere that these methods are used with parameters that are known to not be null. Instead, introduce new methods Title::newFromPageIdentity() and Title::newFromPageReference() (Title::newFromLinkTarget() already exists), without the null-coalescing behavior, and use them when the parameter is not null. This lets static analysis tools, and humans, easily understand where nulls can't appear. Do the same with the corresponding TitleFactory methods. Change the obvious uses of castFrom*() to newFrom*() (if there is a Phan suppression, a type check, or a method call on the result). Change-Id: Ida4da75953cf3bca372a40dc88022443109ca0cb
* Reorg: Namespace the Title classJames D. Forrester2023-03-021-1/+1
| | | | | | | | | | | | | | | | | | | This is moderately messy. Process was principally: * xargs rg --files-with-matches '^use Title;' | grep 'php$' | \ xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1' * rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \ xargs rg --files-with-matches 'Title\b' | \ xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1' * composer fix Then manual fix-ups for a few files that don't have any use statements. Bug: T166010 Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
* Add dependency injection for Job classesdaniel2023-01-191-0/+143
Introduces JobFactory Bug: T245900 Change-Id: I094cc9325e5eaf2717ae510ef988a72407195224