orchidsoftware / platform

Orchid is a @laravel package that allows for rapid application development of back-office applications, admin/user panels, and dashboards.
https://orchid.software
MIT License
4.26k stars 631 forks source link

Enforce non null @section values to prevent dangling output buffers #2764

Closed DocLM closed 6 months ago

DocLM commented 6 months ago

Fixes #2763

Calling @section with a null value trigger a bug that does not close an output buffer, causing PHPUnit to mark tests that use this view without name or description defined to be marked as risky.

Proposed Changes

Changes introduced by d9700e9753ba09c20e3e4e0b22305960f8801d04 removed the e function call that fallback to empty string when called with null. Using a string cast force null values to be empty string.

More references: https://laracasts.com/discuss/channels/testing/test-code-or-tested-code-did-not-only-close-its-own-output-buffers-actingas