As some JavaScript exercises have package.json, why don’t we have composer.json for the PHP exercises too? This will equally make it easy for people to run unit tests locally too, without downloading the PHPUnit.phar or install PHPUnit with composer globally.
I could help create compose.json files for the exercises, when we agree on the naming convention etc.
Even I am very much in favour of composer in professional environments, here we would shift the problem from “downloading PHPUnit once” to “downloading composer once + executing additional commands per exercise + additional disk space usage per exercise”.
Also much of the information in each exercises composer.json needs to be maintained (at least kept in sync) when PHP versions change or names / descriptions are adjusted. There is tooling to take care of the tracks configuration files when upstream changes need to be applied to the track files, but composer.json would be unique to this track and not adjusted automatically.
And as a last point, composer.json could be used only by those using a CLI to learn. In the online environment an exercises composer.json is useless.
Just for clarification: This is my opinion and I’m no track maintainer.
I can agree that composer is the de facto standard for package management in php applications, however as we have no libraries other than phpunit, we either ask people to install composer or ask people to download phpunit.
From a maintenance perspective, adding a composer.json for every single exercise adds a burden to maintain over time which I’m not keen to add to my plate at the moment.
I think this could make sense if there was an existing maintainer willing to do it or if our statistics showed that most exercises submitted were being submitted through the CLI rather than the web.
I understand, that I can mean more maintenance. A reason for not doing it. I can do it once, but it will need regular maintenance, which I cannot take on.