exercism / php

Exercism exercises in PHP.
https://exercism.org/tracks/php
MIT License
139 stars 133 forks source link

Sync space age #724

Closed mk-mxp closed 1 month ago

mk-mxp commented 1 month ago

This will be the #48in24 exercise on 2024-06-04. Important files changed, but re-running tests on submitted student code not required.

Closes #713

github-actions[bot] commented 1 month ago

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

mk-mxp commented 1 month ago

About the "wrong planet test"

The whole exercise is centered around floating point numbers and very easy. Having exceptions seems odd to me, as we specify all planets as methods explicitly. There are more advanced exercises, where adding such a test makes more sense.

I think that test is for approaches using "planet name to data structure / method / function mapping in student land", where one should actually have such a test. With the complete interface and all methods pre-declared - why should anyone try to use __call() to implement everything dynamically? That would be the only way I see to make use of an exception for a wrong planet.