clockwork icon indicating copy to clipboard operation
clockwork copied to clipboard

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

Open Smolinsky opened this issue 1 year ago • 5 comments

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

Smolinsky avatar Jan 24 '24 10:01 Smolinsky

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

itsgoingd avatar Jan 24 '24 10:01 itsgoingd

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 avatar Jan 24 '24 10:01 Smolinsky

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

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

Is this information sufficient?

Smolinsky avatar Jan 24 '24 12:01 Smolinsky

@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) );

Smolinsky avatar Jan 29 '24 17:01 Smolinsky

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

itsgoingd avatar Feb 01 '24 21:02 itsgoingd

Fixed in Clockwork 5.2.

itsgoingd avatar Feb 21 '24 20:02 itsgoingd