Skip to content

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

Merged
taylorotwell merged 3 commits intolaravel:11.xfrom
trippo:patch-1
May 6, 2024
Merged

[11.x] Add int|float support to e method#51314
taylorotwell merged 3 commits intolaravel:11.xfrom
trippo:patch-1

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
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.

3 participants