Skip to content

Fixes: typos - missing use statement | harmonisation | cleaning up#1015

Closed
resu-xuniL wants to merge 6 commits into
exercism:mainfrom
resu-xuniL:typos+missing-use
Closed

Fixes: typos - missing use statement | harmonisation | cleaning up#1015
resu-xuniL wants to merge 6 commits into
exercism:mainfrom
resu-xuniL:typos+missing-use

Conversation

@resu-xuniL

@resu-xuniL resu-xuniL commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
  • Fixed a typo in BookStoreTest.php
  • Fixed a missing use statement in word_countTest.php
  • Harmonise the order of the use statements
  • Removed useless comments on MarkdownTest.php and its example.php

[no important files changed]

Tell me if i shall drop one or more, or all of these!

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

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 mk-mxp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for scanning through the exercises and seeing these. I suggest using a PHPCS rule to ensure the order of use statements. We already have Slevomat rules at hand, so adding SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses is easy. In phpcs.xml, after the last rule add:

  <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />

and let vendor/bin/phpcbf auto-fix the order.

@mk-mxp

mk-mxp commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

By the way: Would you be interested in contributing more challenging stuff?

  • Mentoring of students is a challenge on its own. Exercism always needs people helping with mentoring...
  • The PHP track has a lot of concepts without exercises, for example. These concepts are not accessible for students. Adding exercises makes them part of the syllabus (learning path) - great student experience enhancement. We do not yet have a mermaid roadmap or overview like this of these, so this might be a challenge before converting exercises from other tracks for the concepts, too. I made a small one of the existing concept exercises in the past.
  • There is a need for an analyzer, a very advanced tool to automate mentoring feedback running after submission of the solved exercises (you may have seen it on other tracks). But that really is an advanced topic consuming a lot of energy / time.

@resu-xuniL

Copy link
Copy Markdown
Contributor Author

I'll check, but not quite sure I'll be experimentd enough to manage one of these challenges!

@mk-mxp

mk-mxp commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

and let vendor/bin/phpcbf auto-fix the order.

Looks like this turned everything around again. That's OK, same order in all exercises. I think tournament (was merged last) still needs fixing 😄

@resu-xuniL

Copy link
Copy Markdown
Contributor Author

yes Tournament is my problem now ^^

@resu-xuniL resu-xuniL force-pushed the typos+missing-use branch 2 times, most recently from cc8b71f to f891414 Compare July 11, 2026 13:13
@resu-xuniL

resu-xuniL commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

I do not understand the fail : Running tests for: tournament PHP Fatal error: Cannot use PHPUnit\Framework\Attributes\TestDox as TestDox because the name is already in use in /tmp/tournament.nFUSP2P7us/TournamentTest.php on line 7

Is it merging the 2 files and keping the line 7 where was the use?

@mk-mxp

mk-mxp commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

I think the + in your branch name kills GitHub. I cannot open the exercise folder: https://github.com/resu-xuniL/exercism_php/tree/typos%2Bmissing-use/exercises fails. Rename the branch and open a new Pull Request.

@mk-mxp mk-mxp closed this Jul 11, 2026
@mk-mxp

mk-mxp commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

If you are interested in more "plumbing" challenges:

  • We should update the track to support PHP 8.3 - 8.5 officially. That's tooling, documentation and some cross-repo coordination to do (this repo, test runner and representer must be in sync)
  • We still are not making progress with the test generator. We have a basic one for new exercises, but synchronisation is hand-made. Other tracks have template-based generators for re-producing the tests files when canonical data changes / is extended. We had some tries on that, but ran out of time / energy to make them happen

@resu-xuniL resu-xuniL deleted the typos+missing-use branch July 11, 2026 13:48
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

Successfully merging this pull request may close these issues.

2 participants