Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[11.x] Add int|float support to e method #51314

Merged
merged 3 commits into from
May 6, 2024
Merged

Conversation

trippo
Copy link
Contributor

@trippo trippo commented May 6, 2024

Prevent int|float to string implicit casts on e(...) method helper.

Using bladestan extension of phpstan it throw errors about blade {{ }} statements if you print a number.

Blade example:

@php($number = 31)

{{ $number }}

Error example:

Parameter #1 $value of function e expects
         BackedEnum|Illuminate\Contracts\Support\DeferringDisplayableValue|Illuminate\Contracts\Support\Htmlable|string|null, int<0,max> given.

@trippo trippo changed the title Add int|float support to e method [11.x] Add int|float support to e method May 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants