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

Php 8 with latest laravel #133

Open
kavvson opened this issue Jul 2, 2021 · 2 comments
Open

Php 8 with latest laravel #133

kavvson opened this issue Jul 2, 2021 · 2 comments

Comments

@kavvson
Copy link

kavvson commented Jul 2, 2021

php artisan opcache:status

TypeError

Illuminate\Http\Client\PendingRequest::withHeaders(): Argument #1 ($headers) must be of type array, null given, called in /var/www/prod/vendor/laravel/framework/src/Illuminate/Http/Client/Factory.php on line 390

at vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:311
307▕ *
308▕ * @param array $headers
309▕ * @return $this
310▕ */
➜ 311▕ public function withHeaders(array $headers)
312▕ {
313▕ return tap($this, function ($request) use ($headers) {
314▕ return $this->options = array_merge_recursive($this->options, [
315▕ 'headers' => $headers,

  +17 vendor frames

18 artisan:37
Illuminate\Foundation\Console\Kernel::handle()

@benjivm
Copy link

benjivm commented Jan 25, 2022

Also seeing this: PHP 8.1, Laravel 8.8.0

@Stunext
Copy link

Stunext commented Feb 18, 2022

I have seen that many have problems with the Http facade. You could try using the exclude array in the opcache.php file in the config folder, although I don't know if this array allows you to indicate the path to an entire folder to exclude. I should clarify that I have not had that problem in both laravel 8 and laravel 9.

In general, when the library has failed me, it is when I try to add it to an already advanced project. Sometimes I create a clean Laravel project and then I add little by little the code of the base project until I detect where the file that cannot be compiled is.

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

No branches or pull requests

3 participants