After checking buddypress docs, I noticed that they were using wp-env, which is massive for WP development with Docker, plus the complimentary scripts for PHPUnit testing with WP-Env running in the background.
First, trying to make my way through it, I noticed that both composer.json and package.json had dependencies issues.
For package.json, stylelint could not be in the latest version, only 14 or lower worked. And some other dependencies broke. So I've fixed all versions to make it happen
Same for composer.json, I simply upgraded to the latest phpcodesniffer-composer-installer compatible with the latest PHP 8+, and added PHPUnit 9 because I noticed that 10 and 11 were breaking tests. I will be opening an issue to sort this specifically in the future.
After this, for now, I've introduced two basic scripts similarly to the Buddypress implementation
One for WP-ENV
npm run wp-env start
Which runs the WP virtual environment via docker, and through .wp-env.json, we can define to bring the root, bbPress folder to it, install the plugin and ready to rumble.
And then another script for basic PHPUnit running.
npm run test-php
Probably more scripts should be added in the future, but this is just a proof of concept to have this up and running.
Furthermore, I've added the necessary tweaks in the repo to start passing test with this script command, removing all deprecation warnings for PHP 8.2.
For now, I think this is ideal to have a good and more modern dev environment.