Now largely automated:
VARS=$(grep -o "'[A-Za-z0-9_]*'" includes/MainConfigNames.php | \
tr "\n" '|' | sed "s/|$/\n/;s/'//g")
sed -i -E "s/'($VARS)'/MainConfigNames::\1/g" \
$(grep -ERIl "'($VARS)'" includes/)
Then git add -p with lots of error-prone manual checking. Then
semi-manually add all the necessary "use" lines:
vim $(grep -L 'use MediaWiki\\MainConfigNames;' \
$(git diff --cached --name-only --diff-filter=M HEAD^))
I didn't bother fixing lines that were over 100 characters unless they
were over 120 and triggered phpcs.
Bug: T305805
Change-Id: I74e0ab511abecb276717ad4276a124760a268147
Making it run without limit can easily cause a read-only by creating a
massive transaction choking the replication. It's fine if the values
stay there until the next couple of blocks.
Bug: T301742
Change-Id: I052735edbfaca8821bf6dcbf62737890d3855822
If the wiki to which the blocker belongs does not match the wiki to
which the block belongs, things can go wrong.
Bug: T274817
Change-Id: Iab88ff2106932dffeb8b6da193e5a5e12f686cc3
Expose info about user blocks from Authority. This allows calling code
to provide more detailed information to the user about why they are
denied some action on the wiki.
Bug: T271494
Change-Id: Ia84e469888866d72752aad355292666c31e12bad
Replace all uses of AbstractBlock::getTarget with
Block ::getTargetName and ::getTargetUserIdentity.
Create AbstractBlockTest and two test cases for
AbstractBlock::getTarget and ::getTargetAndType.
It tests triggering of the deprecation warning.
Bug: T282247
Depends-On: I0543f363af66c57f5763b91320d87a69f23f9466
Change-Id: Iaeca824cac30172178de72f3cf7b7ae4cdd6f880
This used to be needed when we couldn't pass a cross-wiki
user target correctly. Now that UserIdentity is cross-wiki-aware,
we can.
Bug: T283642
Depends-On: I6f57357d3a73e753e018986e6af6245c29468875
Depends-On: Ie48ee3fcbf3fa7a285e80caf627be0b726b757c2
Change-Id: I3c21e55022c5fb316a390027f7c28211b29c3d62
This is an attempt to avoid confusion about which wiki database a given
Block belongs to.
Eventually, Block and DatabaseBlockStore should become fully cross-wiki
aware.
Change-Id: I93a8e953e2c7b21ea14b1119820cdaccea1060fc
In order to allow Authority to know about user blocks,
we need a narrow interface to represent such blocks.
This deprecates some methods on AbstractBlocks in favor
of new methods on the Block interface that avoid binding to
the User class.
Bug: T271494
Change-Id: I7bb950533970984a014de0434518fbbefb695131
DatabaseBlockStore is capable of inserting cross-wiki
DatabaseBlock, which works via passing non-local IDatabase.
Ideally, we'd want to make Block a WikiAwareEntity, have
cross-wiki DatabaseBlockStore, etc. But as a quick-fix for
a regression we can just fetch correct ActorNormalization
Bug: T281972
Change-Id: I796f54b7b7303b8c442d5b9ba1926b76d3805fb5
This is micro-optimization of closure code to avoid binding the closure
to $this where it is not needed.
Created by I25a17fb22b6b669e817317a0f45051ae9c608208
Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
These were never meant to be part of the public interface and should not
ever have been marked with @since. They're only useful for constructing
the respective objects, which no outside users should be doing.
Change-Id: I86e01272d46fc72af32172d8a12b9180971d4613
The new service replaces the following public DatabaseBlock methods:
* ::delete
* ::insert
* ::update
* ::purgeExpired
Bug: T221075
Change-Id: I5f95db14b1189fd62d2c2bd5dae2cab0a368f401