Commit graph

7 commits

Author SHA1 Message Date
Umherirrender
a3a9cf99cb tests: Use namespaced class names in @covers annotations
Assist from 8c9cb701e56226cac43fee2fa24b0d0e586f1733

Change-Id: I47897c499028d9e24c00ad0bc6ba7fd8002d9bc1
2024-01-27 01:11:07 +01:00
Derick Alangi
4e468b49e0 title: Make TitleArrayFromResult via TitleFactory service
The TitleFactory should really be where TitleArrayFromResult should
live as it's a place where Title objects are created based on certain
specifications.

This patch tries to consolidate the creation of TitleArrayFromResult
via the TitleFactory services and in the future, we will consolidate
more of the logic and kill TitleArrayFromResult.

Follow up on: a99ec1b and e54665d.

Change-Id: I98215af3252d756de4435b77d1280dacda8e85dc
2024-01-23 14:07:07 +00:00
Derick Alangi
a99ec1b4fa
Title: Use TitleArrayFromResult instead of TitleArray
TitleArray is just a tiny little wrapper to TitleArrayFromResult,
so use the latter instead of the former. I have plans of killing
the former soon.

Change-Id: Ia06a6bb370ce313f38d3ec9a221ed7296aec0ee2
2023-10-03 11:18:53 +01:00
Timo Tijhof
04fd535d8d page: Clean up PageProps file header and improve docs
* Move potentially duplicate brief and ingroup from file doc
  to class doc.
  <https://gerrit.wikimedia.org/r/q/message:ingroup+owner:Krinkle>

* Ensure methods have an understable brief, separate from other text.
  <https://www.mediawiki.org/wiki/Manual:Coding_conventions/Documentation>

* Flesh out type hints and improve descriptions.

Change-Id: Icec95c82e063a499234106d31ce4a3989802f5ce
2023-09-24 21:07:09 +00:00
Amir Sarabadani
79172aed51 rdbms: Introduce ReplaceQueryBuilder
To replace IDatabase::replace()

Bug: T335377
Change-Id: I446f7a09cfc0ee37c2e016052d452751f7333e27
2023-09-08 11:37:26 +02:00
James D. Forrester
ad06527fb4 Reorg: Namespace the Title class
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
2023-03-02 08:46:53 -05:00
Amir Sarabadani
ca9ec658cb Reorg: Move PageProps to page/ and namespace it to MediaWiki\Page\
We should slowly migrate page/ to have proper namespace too but that'll
be pretty big.

Bug: T321882
Change-Id: I3e57be8aa8ac08971f190233196e84ea33023d4a
2022-12-09 13:17:40 +01:00
Renamed from tests/phpunit/includes/PagePropsTest.php (Browse further)