Skip to content

Conversation

@StanBarrows
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 30, 2025 06:43
@StanBarrows StanBarrows merged commit e7eac22 into main Oct 30, 2025
13 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes the text parameter required in the CreateAPostInAGivenStream request class by removing its nullable type and default value. This reflects that text content is mandatory when creating a post in Beekeeper streams.

Key Changes

  • Changed $text parameter from optional (?string $text = null) to required (string $text)
Comments suppressed due to low confidence (1)

src/Requests/CreateAPostInAGivenStream.php:64

  • Since text is now a required parameter and can never be null, the filled() check on line 62 is redundant. The text will always be included in the request body. Consider simplifying this to always add the text field, or add a check for empty strings if that's a valid use case.
        if (filled($this->text)) {
            $body = Arr::add(array: $body, key: 'text', value: $this->text);
        }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

public function __construct(
protected readonly string $streamId,
protected readonly ?string $text = null,
protected readonly string $text,
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

Making the text parameter required is a breaking API change. Consumers who previously instantiated this class without the text parameter or explicitly passed null will experience runtime errors. Consider documenting this breaking change in the release notes or changelog.

Suggested change
protected readonly string $text,
protected readonly ?string $text = null,

Copilot uses AI. Check for mistakes.
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