A one-off maintenance script usually gets written as a file and run with wp eval-file, which works until it needs to define a class or register a command…
Scripts in composer.json run with vendor/bin prepended to PATH, so the tools do not need a path prefix — which is why “test”: “phpunit” works and the same…
The two commands look like alternatives and do different things. exec runs a process inside a container that is already up; run starts a new container from the…