Skip to content

run-tests: refactor worker globals into global WorkerContext value-object #16678

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

Closed
wants to merge 1 commit into from

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Nov 2, 2024

slowly reducing the number of global vars in run-tests.php to make it easier to reason about it.

if you like this direction, I would send more small PRs like that with the goal to reduce global variables.

proposed as suggested in #16675 (comment)

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

I don't object to this change, but it likely only makes sense as part of a larger change. In that case, I would suggest consulting the list on whether large refactorings are something we want to do for this file. The file is already big and convoluted. Making more changes can easily make it worse if we're not careful.

/**
* @var int|null number of workers to use, null for non-parallel testing.
*/
public $workers;
Copy link
Member

Choose a reason for hiding this comment

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

Please use native property types.

@staabm
Copy link
Contributor Author

staabm commented Nov 4, 2024

thanks for taking a look.

I don't object to this change, but it likely only makes sense as part of a larger change.

I totally agree. I was doing this change as small as possible to not waste time and get the conversation started.
I hoped for multiple small PRs to de-global run-tests.php

In that case, I would suggest consulting the list on whether large refactorings are something we want to do for this file.

please take this as a constructive comment:

hopefully some day the php-project is able to get a more modern mean of communication.
I think php is loosing lots of contributors/contributions as soon as it requires people to connect with the list.

It would be way easier, when the php-project would use what the major part of the php community is using - whatever github.com provides.

I know this was discussed elsewhere and we don't need to argument about it here.

The file is already big and convoluted. Making more changes can easily make it worse if we're not careful.

Totally agree.

@staabm staabm closed this Nov 4, 2024
@iluuu1994
Copy link
Member

iluuu1994 commented Nov 4, 2024

It would be way easier, when the php-project would use what the major part of the php community is using - whatever github.com provides.

@Crell, @pronskiy and I were looking into this a while ago, but unfortunately momentum has died down. I think GitHub is a bad medium for such discussions. Discourse is not perfect, but significantly better, so it might be a good option. We had two primary ideas:

  • Improving the RFC process itself, i.e. by making it less likely for much time to be invested in an idea that is doomed to fail.
  • Switch to a better medium, one that reduces noise, improves notifications, and is overall more enjoyable to use.

We have, for now, focused on the former. I don't think there's anything stopping us from working on these things in parallel either, so if that's something you're interested in, please let me know.

Also, please don't let the ML stop you from helping improve PHP! It's really not that bad. Essentially, you can send out an initial e-mail and read the general perception, and then we can decide how to proceed.

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