I get this error when running vendor/bin/phpunit core:unit:
There was 1 error: 1) MediaWiki\ParamValidator\TypeDef\UserDefTest::testValidate with data set "T232672: U+200E at position 0 for name" ('Emma', 'Emma') Wikimedia\ParamValidator\ValidationException: Validation of `test` failed: baduser /Users/kostajh/src/mediawiki/w/includes/libs/ParamValidator/TypeDef.php:66 /Users/kostajh/src/mediawiki/w/includes/ParamValidator/TypeDef/UserDef.php:88 /Users/kostajh/src/mediawiki/w/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/TypeDefTestCase.php:89
It looks like the test case that fails was touched last in rMW9308ee9cf881: UserDef: no need to return full User objects (cc @DannyS712). This passes in CI, so I guess it is something specific to my macOS PHP 7.4 local setup?