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

Fix compatibility with PHP 8.1 in base_show_field.html.twig #7622

Merged
merged 1 commit into from
Nov 26, 2021

Conversation

javer
Copy link
Contributor

@javer javer commented Nov 26, 2021

Subject

Fixes Twig\Error\RuntimeError: nl2br(): Passing null to parameter #1 ($string) of type string is deprecated during rendering nullable text field.

I am targeting 4.x branch, because the change is backwards compatible and just fixes a deprecation notice.

Changelog

### Fixed
- Fixed PHP 8.1 deprecation notice for nl2br usage in base_show_field.html.twig.

Fixes Twig\Error\RuntimeError: nl2br(): Passing null to parameter sonata-project#1 ($string) of type string is deprecated
@VincentLanglet VincentLanglet requested review from jordisala1991 and a team November 26, 2021 09:55
@VincentLanglet
Copy link
Member

VincentLanglet commented Nov 26, 2021

@jordisala1991 Seems like it's not caught by your PR testing 8.1

@jordisala1991
Copy link
Member

It is a deprecation, not an actual error. There are 2 deprecations on 8.1 detected by tests but not this one. Maybe we are not testing this one.

@core23 core23 added the patch label Nov 26, 2021
@franmomu franmomu merged commit 8173cdb into sonata-project:4.x Nov 26, 2021
@franmomu
Copy link
Member

thanks @javer!

@javer javer deleted the fix-php81-base-show-field branch November 26, 2021 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants