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

Coordination: Upgrade to PHP 8.1 - 8.3 and PHPUnit 10 #652

Open
15 of 19 tasks
mk-mxp opened this issue Mar 1, 2024 · 3 comments
Open
15 of 19 tasks

Coordination: Upgrade to PHP 8.1 - 8.3 and PHPUnit 10 #652

mk-mxp opened this issue Mar 1, 2024 · 3 comments

Comments

@mk-mxp
Copy link
Contributor

mk-mxp commented Mar 1, 2024

This is what I think must be done:

Post-upgrade to modernize further:

  • Merge Add State of Tic-Tac-Toe Exercise #651 (requires PHP >= 8.1)
  • PHPUnit attributes, not annotations (annotations are deprecated, but still available)
    • Update test generator to produce attributes not annotations
    • Convert tests from annotations to attributes. Use rector/rector for that
  • Revert performance workaround in "robot-name" exercise (requires PHPUnit >= 11)

In the whole process, try to avoid re-running the representer and not to trigger re-testing all community solutions. These are very costly to Exercism.

@tomasnorre
Copy link
Contributor

tomasnorre commented Mar 3, 2024

I can look into the first 3 and group them in one PR one of the next days.

The first 3 should be covered in #656
The PHP Test Runner PR exercism/php-test-runner#100

The php-representer I don't know enough about to take care of.
Update: I have looked a little into the PHP presenter, but as the tests even online, when looking into the logs are failing, it's hard to tell when the job is correctly done. So I would prefer someone with more knowledge about the presenter to handle this bit.

@tomasnorre
Copy link
Contributor

I don't know if it belongs in this to-do list, but still some exercises, probably older ones, have snake cases in the Stub files. I would prefer having them using camel case too, like the standard is today.

E.g. the https://github.com/exercism/php/blob/main/exercises/concept/lasagna/Lasagna.php

@mk-mxp
Copy link
Contributor Author

mk-mxp commented Mar 5, 2024

I haven't written documentation on this, yet: We use snake_case for functions, camelCase for methods and PascalCase for classes.

Edit: There is no "standard" defined for variable names, yet. And you may make this a separate issue, has nothing to do with PHP updates.

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

2 participants