Wikibase pins phpat/phpat: ^0.11.4 (0.11.10 installed). phpat 0.12.4 split the assertion builders into should(), shouldNot() and canOnly(), and deprecated the combined methods we use (canOnlyDependOn(), shouldNotDependOn()). See https://github.com/carlosas/phpat/releases/tag/0.12.4 and https://www.phpat.dev/documentation/assertions/
This came up in review on the T434433 chain (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/1325494). The suggested API doesn't exist in the version we pin, so it needs the upgrade first.
Scope:
- Bump phpat/phpat to ^0.12.4. The 0.12.0 BC breaks are fine for us: PHP >= 8.1, PHPStan >= 2.1 (we're on 2.2.8).
- Migrate the deprecated calls in the architecture tests: 16x canOnlyDependOn() and 4x shouldNotDependOn() across repo/domains/crud, repo/domains/reuse, repo/domains/search, repo/domains/statements and repo/tests/architecture/.
- WikibaseLexeme pins its own phpat and has its own ArchitectureTest, so it needs the same treatment (here or in a sibling task).