Skip to content

[11.x] Allow passing bool to facade Http@preventStrayRequests()#53992

Merged
taylorotwell merged 2 commits into
laravel:11.xfrom
cosmastech:patch-4
Dec 20, 2024
Merged

[11.x] Allow passing bool to facade Http@preventStrayRequests()#53992
taylorotwell merged 2 commits into
laravel:11.xfrom
cosmastech:patch-4

Conversation

@cosmastech
Copy link
Copy Markdown
Contributor

@cosmastech cosmastech commented Dec 20, 2024

The Http facade's preventStrayRequests() doesn't match the underlying the Http Factory definition.

I was wondering why my tests were failing when I wrote \Http::preventStrayRequests(false) and realized that when PHPStorm + Laravel Idea jumps into the definition, it's not jumping into the facade definition, but instead the underlying class.

The workaround for this is to call \Http::allowStrayRequests(), but I figured I'd offer this PR as tribute to the facade gods.

@cosmastech cosmastech changed the title [11.x] Allow passing bool to Http@preventStrayRequests() [11.x] Allow passing bool to facade Http@preventStrayRequests() Dec 20, 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.

2 participants