Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make fields method optional #298

Merged
merged 2 commits into from
Jan 18, 2025
Merged

Conversation

pkosciak
Copy link
Contributor

This commit addresses the proposal mentioned in issue #297 to make the fields method optional in the definitions of blocks, options, etc.

src/Builder.php Outdated
@@ -99,7 +99,7 @@ public function addPartial(string $partial): self
}

if (! is_a($partial, FieldsBuilder::class)) {
throw new InvalidArgumentException('The partial must return an instance of Builder.');
return $this;
Copy link
Owner

Choose a reason for hiding this comment

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

Is there an instance where you'd be using partials when not using the fields builder?

🔥 Remove unnecessary `Field` contract
🎨 Tidy up code
@Log1x Log1x merged commit 2ec29a7 into Log1x:master Jan 18, 2025
2 checks passed
Log1x added a commit that referenced this pull request Jan 18, 2025
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