Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite it in PHP #75

Closed
3 tasks
homersimpsons opened this issue Mar 25, 2023 · 1 comment
Closed
3 tasks

Rewrite it in PHP #75

homersimpsons opened this issue Mar 25, 2023 · 1 comment

Comments

@homersimpsons
Copy link

homersimpsons commented Mar 25, 2023

Currently the test runner is mostly written in node. We could write it in full PHP, this would have the following benefits:

  • lighter docker image: only php has to be embeded
  • easier contribution from PHP's track participant
  • in depth usage of phpunit, should ease the upgrade to the spec version 3 Upgrade to version 3 spec #9
  • improved testing

Current behavior

The current test runner does the following;

  1. runs PHPUnit (from cli)
  2. use jo to output error for a generic error
  3. uses a node program to convert the report to exercism's interface

Target behavior

The idea would be to use PHPUnit as a library instead of with the CLI:

  1. declare a symfony/console application
  2. (Customize the test runner to fit our use case, see below)
  3. generate the report in php directly

Test runner customization to do

  • Properly load tests (using .meta/config.json)
  • Listen to PHPUnit\Event\Test\Errored, PHPUnit\Event\Test\Failed and PHPUnit\Event\Test\Passed to register the status
  • Allow the addition of annotation on top of test to specify the task id

During this work we could also upgrade to PHP 8.2, in fact I did mentor 2 solutions where PHP 8.2 would have changed the outcome:

@github-actions
Copy link

Hello. Thanks for opening an issue on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this issue has been pre-approved, please link back to this issue on the forum thread and a maintainer or staff member will reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant