I would like to start a local PHP server each time before Build and terminate it immediately afterwards. Would would a proper way to do it? Is there any build-in capabilities to perform task before each Build synchronously?
Thank you in advance for help
I would suggest you take advantage of the Docker Runner feature. It would allow you to run builds in parallel making sure the servers will not interfere with each other and assure you to have a completely clean build environment.
The PHP server could be already installed and clean for you to use every time your docker instance is up.
Please check the link shared above and run some tests. Let me know what questions you might have after that.