Skip to content

Please increase typephp-ignore window or make it user-configurable #82

Closed

Description

@klunejko

Hello,

Just ran into an issue where typephp-ignore wasn't honored, as the tag was 11 frames above the failing check. For now, we've worked around it by extending the class and tagging the overridden method and using that one for tests:

final class IgnoringMoneyAmountSerializer extends MoneyAmountSerializer
{
    /**
     * @typephp-ignore 'not_a_number' deliberately violates from()'s numeric-string @param.
     */
    public function denormalize(
        mixed $data,
        string $type,
        ?string $format = null,
        array $context = [],
    ): mixed {
        return parent::denormalize($data, $type, $format, $context);
    }
}

But would be great if the frame window could instead be changed by the user.

Activity

  1. rcalicdan commented on Sep 20, 2026

    @rcalicdan
    Member

    @klunejko Yes yes, This is a great Idea .. I will increase the default limit from 7 to 25 but make it configurable as well..

  2. self-assigned this
    on Sep 20, 2026
  3. added
    enhancement
    on Sep 20, 2026
  4. rcalicdan commented on Sep 20, 2026

    @rcalicdan
    Member

    @klunejko Hello, I have included this enhancement suggestion to the current new release (v0.10.7). Also, I have also made it configurable see https://typephp-php.github.io/docs/getting-started/configuration.html#ignore-tag-stack-trace-resolution-ignore-trace-depth

    You can add 'ignore_trace_depth' => 25 to your config file to customize the ignore tag annotations trace depth ..

  5. klunejko commented on Sep 20, 2026

    @klunejko
    Author

    Awesome, much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions