exercism / php

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

Sync Acronym #769

Closed fejan-malek closed 1 week ago

fejan-malek commented 3 weeks ago

https://github.com/exercism/php/issues/745

Below Changes done in this pull request

github-actions[bot] commented 3 weeks 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!

fejan-malek commented 2 weeks ago

@mk-mxp Should I update the example code here?

Please review thanks!

mk-mxp commented 2 weeks ago

Please review thanks!

I hope to find time today. I'm busy with working for my living...

fejan-malek commented 2 weeks ago

@mk-mxp

testUnderscoreEmphasis Is working correctly?

Should I also add in not included in test.toml? If yes then what is the reason because it running with the existing solution?

mk-mxp commented 2 weeks ago

No underscores, please. Reasons:

The example.php is an internal solution, showing that

It is not enough, that example.php can handle the new tests. We need to look at the community solutions for very common solutions.

There are currently about 350 different community solutions (see https://exercism.org/tracks/php/build > "Practice Exercises" > 106 active exercises > Acronym). These are shown partially on the exercise community solutions page (see https://exercism.org/tracks/php/exercises/acronym/solutions when you have solved the exercise / are not logged in). Many of them use preg_*() functions and rely on the word boundary detection (\w and others) of PCRE. An underscore is not seen as a word boundary by PCRE, so these solutions fail.