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

[8.x] Add stringable support for strip_tags() #39098

Merged
merged 6 commits into from
Oct 5, 2021
Merged

[8.x] Add stringable support for strip_tags() #39098

merged 6 commits into from
Oct 5, 2021

Conversation

intrepidws
Copy link
Contributor

This PR adds the ability to use the PHP method strip_tags() as part of a fluent string chain, like this:

Str::of('<strong>before<strong><br />after')->stripTags();

P.S. The prior PR had failing tests because it attempted to support passing an array to strip_tags, which is only supported in PHP 7.4 and greater. That has been removed.

@taylorotwell taylorotwell merged commit 9b85771 into laravel:8.x Oct 5, 2021
@GrahamCampbell GrahamCampbell changed the title Add stringable support for strip_tags() [8.x] Add stringable support for strip_tags() Oct 5, 2021
victorvilella pushed a commit to cdsistemas/framework that referenced this pull request Oct 12, 2021
* Update Stringable.php

* Update SupportStringableTest.php

* Update Stringable.php

* Update SupportStringableTest.php

* Update Stringable.php

* Update SupportStringableTest.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
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