Testing is software development.
Software development is writing code. Testing makes sure the code actually works, so in a nutshell: Testing is software development :-)
Phan
see Phan
Other Static Analysis tools for PHP
PHPStan
PHPStan seems more polished (perhaps because it's commercial and has a 'pro' version that adds a GUI) whereas phan is the original PHP static analysis tool Rasmus Ledorf uses.
Adding a configuration file for your MediaWiki extension is straightforward and would look like this:
parameters:
level: 1
paths:
- src
- tests
scanDirectories:
- ../../includes
- ../../tests/phpunit
- ../../vendor
The paths are the directories of your code.
The scanDirectories are additional paths used to discover symbols, but not analyze for errors.
For more advanced usage, see the example of Professional Wiki's Maps extension which illustrates configuration file includes of a 'baseline'; error message suppression; and directory exclusions of problem code.