CookieConstructorDefaultsRector

Update the Cookie constructor default values changed in Symfony 4.2: $secure "false" to "null" and $sameSite "null" to "lax"

 use Symfony\Component\HttpFoundation\Cookie;

-$cookie = new Cookie('name', 'value', 0, '/', null, false, true, false, null);
+$cookie = new Cookie('name', 'value', 0, '/', null, null, true, false, 'lax');

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Symfony\HttpFoundation\Rector\New_\CookieConstructorDefaultsRector;

return RectorConfig::configure()
    ->withRules([
        CookieConstructorDefaultsRector::class,
    ]);
PACKAGE:  symfony/http-foundation >=4.2

Other rules in the symfony/http-foundation set