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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pkosciak
Copy link

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
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