Skip to content

Rewrite it in PHP #75

@homersimpsons

Description

@homersimpsons

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions