Skip to content

Document #[StrictStubs] in the PHPUnit bridge - #189

Merged
rasuvaeff merged 2 commits into
masterfrom
docs/phpunit-strict-stubs
Nov 21, 2026
Merged

rasuvaeff merged 2 commits into
masterfrom
docs/phpunit-strict-stubs

Conversation

@rasuvaeff

@rasuvaeff rasuvaeff commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

understudy-phpunit 1.1.0 (rasuvaeff/understudy-phpunit#47) reads #[StrictStubs].

  • guide/expectations/strict-stubs: which bridge versions read the attribute, instead of "a bridge release is needed"
  • adapters/phpunit: the attribute next to understudyStrictStubs(), with precedence
  • docs workspace: understudy-phpunit ^1.1, lock + make docs-api regenerated (trait docblock)

Docs only, no release.

Summary by Sourcery

Document PHPUnit support for configuring strict stubs with the #[StrictStubs] attribute.

Enhancements:

  • Document PHPUnit bridge support for the #[StrictStubs] attribute, including its precedence over project-wide defaults and the required bridge version.

Build:

  • Update the documentation API workspace to use understudy-phpunit 1.1 and regenerate its lockfile and API snapshots.

Documentation:

  • Clarify strict-stub configuration and precedence in the PHPUnit adapter, strict-stubs guide, and generated API documentation.

The strict-stubs guide no longer says a bridge release is still needed, the
PHPUnit adapter page shows the attribute beside understudyStrictStubs(), and
the docs workspace moves to understudy-phpunit 1.1.0 with the API pages
regenerated.
@sourcery-ai

sourcery-ai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Sorry @rasuvaeff, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 9 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 062ceeb1-2665-40bf-b259-d9aed28ab97b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sourcery-ai

sourcery-ai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Raise the documentation API workspace’s PHPUnit bridge dependency to ^1.1 so the generated reference can use the release that reads #[StrictStubs].

  • docs/.api-workspace/composer.json L9

Documentation

Explain which bridge versions read #[StrictStubs] and document its precedence and use in the PHPUnit adapter.

  • docs/src/adapters/phpunit.md L80-92
  • docs/src/guide/expectations/strict-stubs.md L73-74

Lock files and vendored code

Regenerate the API reference and workspace artifacts for the updated dependency, including the PHPUnit integration trait documentation.

  • docs/.api-workspace/composer.lock L3596-3605 (+5 small edits)
  • docs/scripts/api-snapshot.json L5-18556 (106 small edits)
  • docs/src/api/classes/Arg.md L12
  • docs/src/api/classes/Captor.md L12
  • docs/src/api/classes/Exception/AmbiguousDefaultFactory.md L12
  • docs/src/api/classes/Exception/BypassUnavailable.md L12
  • docs/src/api/classes/Exception/CannotWire.md L12
  • docs/src/api/classes/Exception/ConflictingExpectation.md L12
  • docs/src/api/classes/Exception/ContextOwnershipViolation.md L12
  • docs/src/api/classes/Exception/ForgottenDouble.md L12
  • docs/src/api/classes/Exception/ForwardingTargetMismatch.md L12
  • docs/src/api/classes/Exception/InvalidCallSpecification.md L12
  • docs/src/api/classes/Exception/InvalidDefaultValue.md L12
  • docs/src/api/classes/Exception/InvalidSpecificationArgument.md L12
  • docs/src/api/classes/Exception/MatcherLeaked.md L12
  • docs/src/api/classes/Exception/NeverMethodCalled.md L12
  • docs/src/api/classes/Exception/NoDefaultValue.md L12
  • docs/src/api/classes/Exception/NothingCaptured.md L12
  • docs/src/api/classes/Exception/OriginalCallUnavailable.md L12
  • docs/src/api/classes/Exception/OriginalReturnTypeViolation.md L12
  • docs/src/api/classes/Exception/OutcomeUnavailable.md L12
  • docs/src/api/classes/Exception/StrictModeViolation.md L12
  • docs/src/api/classes/Exception/UnderstudyError.md L12
  • docs/src/api/classes/Exception/UnsupportedTarget.md L12
  • docs/src/api/classes/Exception/VerificationFailed.md L12
  • docs/src/api/classes/ExpectBuilder.md L12
  • docs/src/api/classes/FailureKind.md L12
  • docs/src/api/classes/Invocation.md L12
  • docs/src/api/classes/PhpUnit/UnderstudyPHPUnitIntegration.md L12, L55-58
  • docs/src/api/classes/StrictStubs.md L12
  • docs/src/api/classes/Understudy.md L12
  • docs/src/api/classes/VerificationFailure.md L12
  • docs/src/api/classes/WhenBuilder.md L12

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@rasuvaeff
rasuvaeff merged commit 8c07e0a into master Nov 21, 2026
27 checks passed
@rasuvaeff
rasuvaeff deleted the docs/phpunit-strict-stubs branch November 21, 2026 11:13
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.

1 participant