Skip to content

Conversation

janedbal
Copy link
Contributor

@janedbal janedbal commented Jul 3, 2025

  • Update parametersSchema.neon to support 'identifiers' array field
  • Modify IgnoredErrorHelper to expand identifiers array into separate rules
  • Update IgnoredError::stringifyPattern() to display multiple identifiers
  • Add comprehensive tests for identifiers array functionality
  • Update IgnoreErrorsTest to reflect new configuration entries

Resolves phpstan/phpstan#13015

🤖 Generated with Claude Code

- Update parametersSchema.neon to support 'identifiers' array field
- Modify IgnoredErrorHelper to expand identifiers array into separate rules
- Update IgnoredError::stringifyPattern() to display multiple identifiers
- Add comprehensive tests for identifiers array functionality
- Update IgnoreErrorsTest to reflect new configuration entries

Resolves #13015

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@janedbal janedbal marked this pull request as ready for review July 3, 2025 09:46
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

- Replace assertEmpty() with assertNoErrors() for clearer test intent
- Replace assert() with assertInstanceOf() for proper PHPUnit assertions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@janedbal janedbal requested a review from ondrejmirtes July 21, 2025 11:19
@ondrejmirtes ondrejmirtes merged commit 2247f0c into phpstan:2.1.x Jul 21, 2025
414 of 419 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

Please also send update to https://phpstan.org/user-guide/ignoring-errors with a brief mention of identifiers.

Copy link
Contributor

@VincentLanglet VincentLanglet left a comment

Choose a reason for hiding this comment

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

There is some inconsistency

If both identifier and identifiers are used:

  • identifier is read in stringifyPattern
  • identifiers is read in IgnoredErrorHelper

Also maybe it shouldn't be allowed to have both identifier and identifiers ?
Or the behavior should be to merge both ?

@ondrejmirtes
Copy link
Member

I don't want to allow both in the same entry.

stringifyPattern should be fixed I think?

@VincentLanglet
Copy link
Contributor

stringifyPattern should be fixed I think?

I agree, I opened #4143

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.

Support multiple identifiers in ignoreErrors

4 participants