itsgoingd / clockwork

Clockwork - php dev tools in your browser - server-side component
https://underground.works/clockwork
MIT License
5.7k stars 320 forks source link

Argument 6 passed to Symfony\Component\HttpFoundation\Cookie::__construct() must be of the type boolean, null given, called in vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkSupport.php on line 438 #673

Closed Smolinsky closed 9 months ago

Smolinsky commented 10 months ago

Hello, I have installed the package, and it's working fine. However, I'm facing an issue with accessing the admin panel of the project where Backpack is installed. The error points to the bool $secure = false type in the vendor/symfony/http-foundation/Cookie.php file, but in the Clockwork code, it uses new Cookie('x-clockwork', json_encode($clockworkBrowser), time() + 60, null, null, null, false, null). Perhaps, this could be related to an inconsistency in package versions? https://i.imgur.com/qrfBgy0.png

Version Laravel 5.6 PHP 7.2.21 http-foundation v3

itsgoingd commented 10 months ago

Hey, could you please post the error stack trace? Thanks.

Smolinsky commented 10 months ago

Hey, could you please post the error stack trace? Thanks.

https://i.imgur.com/qrfBgy0.png

https://i.imgur.com/P0Stvqd.png

https://i.imgur.com/SHHPl2C.png

Smolinsky commented 10 months ago

Hey, could you please post the error stack trace? Thanks.

https://i.imgur.com/hcDLrYW.png

Is this information sufficient?

Smolinsky commented 10 months ago

@itsgoingd Hi. Can you change in repo this lines 437-439 to change in secure null on (bool) null in the file ClockworkSupport.php to support old versions Laravel?

$response->cookie( new Cookie('x-clockwork', json_encode($clockworkBrowser), time() + 60, null, null, (bool)null, false) );

itsgoingd commented 9 months ago

Hey, thanks for the traces, we definitively want to keep supporting Laravel 5.6, I'll have a fix ready soon.

itsgoingd commented 9 months ago

Fixed in Clockwork 5.2.