diff --git a/docs/book/config.md b/docs/book/config.md index c32948d6..b6568bc7 100644 --- a/docs/book/config.md +++ b/docs/book/config.md @@ -22,7 +22,7 @@ Option | Data Type | Description `cookie_httponly` | `boolean` | Marks the cookie as accessible only through the HTTP protocol. `cookie_lifetime` | `integer` | Specifies the lifetime of the cookie in seconds which is sent to the browser. `cookie_path` | `string` | Specifies path to set in the session cookie. -`cookie_samesite` | `string` | Specifies whether cookies should be sent along with cross-site requests. +`cookie_samesite` | `string` | Specifies whether cookies should be sent along with cross-site requests. (Since 2.11.0) `cookie_secure` | `boolean` | Specifies whether cookies should only be sent over secure connections. `entropy_length` | `integer` | Specifies the number of bytes which will be read from the file specified in entropy_file. Removed in PHP 7.1.0. `entropy_file` | `string` | Defines a path to an external resource (file) which will be used as an additional entropy. Removed in PHP 7.1.0. diff --git a/src/Config/SameSiteCookieCapableInterface.php b/src/Config/SameSiteCookieCapableInterface.php index 60e8c794..2f5af695 100644 --- a/src/Config/SameSiteCookieCapableInterface.php +++ b/src/Config/SameSiteCookieCapableInterface.php @@ -1,15 +1,15 @@ [ - 'config_class' => TestConfig::class, + 'config_class' => TestConfig::class, 'cookie_samesite' => 'Lax', ], ] ); $this->expectException(ServiceNotCreatedException::class); - $this->expectExceptionMessage('Invalid configuration class "LaminasTest\Session\TestAsset\TestConfig". When configuration option "cookie_samesite" is used, the configuration class must implement Laminas\Session\Config\SameSiteCookieCapableInterface'); + $this->expectExceptionMessage('"cookie_samesite"'); $this->services->get(ConfigInterface::class); } } diff --git a/test/TestAsset/TestConfig.php b/test/TestAsset/TestConfig.php index 55b73835..82de07cc 100644 --- a/test/TestAsset/TestConfig.php +++ b/test/TestAsset/TestConfig.php @@ -1,134 +1,168 @@