Code in all production namespaces must not depend on namespaces of libraries listed as dev-dependencies in composer.json and must not depend on any class in the test namespace.
Currently we're checking for unwanted dependencies by uninstalling dev dependencies and then running PHPStan from a Container. Instead, we should add a deptrac configuration and CI task to each of our repos. You can take the configuration and Makefile in https://github.com/wmde/fundraising-payments as an example.
TODO: Make list of all repos that need this, add subtickets and estimations