laravel-opcache icon indicating copy to clipboard operation
laravel-opcache copied to clipboard

Php 8 with latest laravel

Open kavvson opened this issue 4 years ago • 2 comments

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()

kavvson avatar Jul 02 '21 14:07 kavvson

Also seeing this: PHP 8.1, Laravel 8.8.0

benjivm avatar Jan 25 '22 02:01 benjivm

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.

Stunext avatar Feb 18 '22 19:02 Stunext