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

Use new hasActualContent method on slots #11410

Merged
merged 3 commits into from Feb 23, 2024
Merged

Use new hasActualContent method on slots #11410

merged 3 commits into from Feb 23, 2024

Conversation

comes
Copy link
Contributor

@comes comes commented Feb 14, 2024

Description

Since Laravel will shortly become a new method for slots hasActualContent() (see laravel/framework#49966), I think it might be a good idea to use the framework instead of filaments own regex.

This PR will update to the new function.

@comes comes marked this pull request as ready for review February 14, 2024 13:55
Copy link
Member

@zepfietje zepfietje left a comment

Choose a reason for hiding this comment

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

Thanks, @comes!

Could you use the actual method in the Blade components instead of our helper?
Also mark the helper as deprecated please.

Probably we also need to bump the minimum required Laravel version because your method was only introduced recently?

@zepfietje zepfietje added this to the v3 milestone Feb 17, 2024
@zepfietje zepfietje added chore enhancement New feature or request and removed chore labels Feb 17, 2024
@danharrin
Copy link
Member

@zepfietje our helper allows Htmlable (HtmlStrings and View objects etc) whereas Laravel's is only available on component slots, so I have refactored it to use the new method and keep our helper

@danharrin danharrin merged commit 32e072c into filamentphp:3.x Feb 23, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants