{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/23196","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/23196/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/23196/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/23196/events","html_url":"https://github.com/laravel/framework/issues/23196","id":297887784,"number":23196,"title":"Cookie Factory and Cookie Jar have different PHPDoc on $secure parameter","user":{"login":"dizco","id":7740408,"avatar_url":"https://avatars3.githubusercontent.com/u/7740408?v=4","gravatar_id":"","url":"https://api.github.com/users/dizco","html_url":"https://github.com/dizco","followers_url":"https://api.github.com/users/dizco/followers","following_url":"https://api.github.com/users/dizco/following{/other_user}","gists_url":"https://api.github.com/users/dizco/gists{/gist_id}","starred_url":"https://api.github.com/users/dizco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dizco/subscriptions","organizations_url":"https://api.github.com/users/dizco/orgs","repos_url":"https://api.github.com/users/dizco/repos","events_url":"https://api.github.com/users/dizco/events{/privacy}","received_events_url":"https://api.github.com/users/dizco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-16T19:03:01Z","updated_at":"2018-02-20T06:18:09Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nPlease use this issue tracker only for reporting Laravel bugs.\r\n\r\nIf you need support, please use the forums:\r\n\r\n- https://laracasts.com/discuss \r\n- https://laravel.io/forum\r\n\r\nAlternatively, you may use Slack (https://larachat.co/) or Stack Overflow (http://stackoverflow.com/questions/tagged/laravel).\r\n\r\nIf you would like to propose new Laravel features, please make a pull request, or open an issue at https://github.com/laravel/internals/issues.\r\n-->\r\n\r\n- Laravel Version: 5.6.3\r\n- PHP Version: 7.2.1\r\n- Database Driver & Version: mysql\r\n\r\n### Description:\r\n\r\nI think the [Cookie Factory](https://github.com/laravel/framework/blob/5.6/src/Illuminate/Contracts/Cookie/Factory.php) is not up to date with the [Cookie Jar](https://github.com/laravel/framework/blob/5.6/src/Illuminate/Cookie/CookieJar.php).\r\n\r\nEssentially, it is the `$secure` parameter that should also accept `null`.\r\n\r\nCookie Jar : \r\n\r\n```\r\n/**\r\n     * Create a new cookie instance.\r\n     *\r\n     * @param  string       $name\r\n     * @param  string       $value\r\n     * @param  int          $minutes\r\n     * @param  string       $path\r\n     * @param  string       $domain\r\n     * @param  bool|null    $secure\r\n     * @param  bool         $httpOnly\r\n     * @param  bool         $raw\r\n     * @param  string|null  $sameSite\r\n     * @return \\Symfony\\Component\\HttpFoundation\\Cookie\r\n     */\r\n```\r\n\r\nCookie Factory : \r\n\r\n```\r\n/**\r\n     * Create a new cookie instance.\r\n     *\r\n     * @param  string  $name\r\n     * @param  string  $value\r\n     * @param  int     $minutes\r\n     * @param  string  $path\r\n     * @param  string  $domain\r\n     * @param  bool    $secure\r\n     * @param  bool    $httpOnly\r\n     * @param  bool         $raw\r\n     * @param  string|null  $sameSite\r\n     * @return \\Symfony\\Component\\HttpFoundation\\Cookie\r\n     */\r\n```\r\n\r\n### Steps To Reproduce:\r\n\r\nI have a Lumen 5.6.3 installation where I have added Cookie support using this method : https://github.com/esbenp/lumen-api-oauth/issues/23#issuecomment-217417473\r\n\r\nIt worked on 5.5, but it breaks on 5.6 with \r\n\r\n`Type error: Argument 6 passed to Symfony\\Component\\HttpFoundation\\Cookie::__construct() must be of the type boolean, null given, called in C:\\xampp\\htdocs\\customers\\MtBlanc\\ski-school-manager-backend\\vendor\\illuminate\\cookie\\CookieJar.php on line 69`\r\n\r\nHere is my code : \r\n\r\n```\r\n$cookie = Cookie::make(\r\n            \"cookie\", // Name\r\n            \"value\", // Value\r\n            10, // Max age\r\n            null, // Path\r\n            null, // Domain\r\n            null, // Secure <- If I put false here, no error occurs.\r\n            true // HttpOnly\r\n        );\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/366877428","html_url":"https://github.com/laravel/framework/issues/23196#issuecomment-366877428","issue_url":"https://api.github.com/repos/laravel/framework/issues/23196","id":366877428,"user":{"login":"laurencei","id":1210658,"avatar_url":"https://avatars1.githubusercontent.com/u/1210658?v=4","gravatar_id":"","url":"https://api.github.com/users/laurencei","html_url":"https://github.com/laurencei","followers_url":"https://api.github.com/users/laurencei/followers","following_url":"https://api.github.com/users/laurencei/following{/other_user}","gists_url":"https://api.github.com/users/laurencei/gists{/gist_id}","starred_url":"https://api.github.com/users/laurencei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurencei/subscriptions","organizations_url":"https://api.github.com/users/laurencei/orgs","repos_url":"https://api.github.com/users/laurencei/repos","events_url":"https://api.github.com/users/laurencei/events{/privacy}","received_events_url":"https://api.github.com/users/laurencei/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T06:18:09Z","updated_at":"2018-02-20T06:18:09Z","author_association":"MEMBER","body":"That sounds like a problem in Lumen perhaps? The PHPDocs wont make a difference to the code itself."}}
{"actor":{"display_login":"laurencei"}}