Skip to content

Ensure that all entries in test arrays have explicit keys#7386

Merged
muglug merged 4 commits intomasterfrom
muglug-rewrite-tests
Jan 13, 2022
Merged

Ensure that all entries in test arrays have explicit keys#7386
muglug merged 4 commits intomasterfrom
muglug-rewrite-tests

Conversation

@muglug
Copy link
Copy Markdown
Collaborator

@muglug muglug commented Jan 13, 2022

This PR serves two purposes:

  • array keys in tests add a bit of extra clarity to what things are for
  • these arrays can be trivially exported for use in other projects

Obviously the second point doesn't benefit Psalm in any way, and if you feel the code change is an annoyance feel free to disregard this.

@muglug muglug added the release:internal The PR will be included in 'Internal changes' section of the release notes label Jan 13, 2022
@muglug muglug requested review from orklah and weirdan January 13, 2022 16:39
Comment thread tests/AnnotationTest.php
[
'assertions' => [],
'ignored_issues' => [
'InvalidDocblock' => Config::REPORT_INFO,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What does having a report option does here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

From what I recall it was an edge-case where this slight suppression was necessary to trigger a bug

'error_levels' => [],
'strict_mode' => true,
],
'concatenationWithNumberInStrictMode' => [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This test was dropped?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, it was moved up into a custom section to remove the strict_mode argument from the trait signature

@muglug muglug merged commit f439d65 into master Jan 13, 2022
@muglug muglug deleted the muglug-rewrite-tests branch January 13, 2022 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:internal The PR will be included in 'Internal changes' section of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants