Configuration – section http – incorrect processing of string value

m.brecher
Generous Backer | 872
+
0
-

Hi,

I found bug in configuration in section http:

My configuration (nette/neon v3.3.3):

parameters:
    cookieBasePath: @Nette\Http\Request::getUrl()::getBasePath()

session:
	cookiePath: %cookieBasePath%   # this works OK

http:
	cookiePath: %cookieBasePath%   # this ends with exception

The above configuration ends with exception:

Nette\DI\InvalidConfigurationException
The item 'http › cookiePath' expects to be string, object Nette\DI\Definitions\Statement given.

a) testing the type of output value of the method:

gettype($this->getHttpRequest()->getUrl()->getBasePath())  // is string

b) using the parameter %cookieBasePath% in section session works but in section http not

My conclusion: probably is a bug in section http of the configuration

I hope this alert will be helpful.

Last edited by m.brecher (2023-01-07 16:55)

Marek Bartoš
Nette Blogger | 1275
+
0
-

Not a bug but missing feature. Also it was added in nette/http 3.2.0, just update your dependencies.

Last edited by Marek Bartoš (2023-01-07 17:27)

m.brecher
Generous Backer | 872
+
0
-

@MarekBartoš

Not a bug but missing feature.

Thanks for the comment, I found this in nette/http v3.1.6, I will update and post the result

edit

after updating to nette/http v3.2.1 it works excellently, next time I will always update to the next release before comment some troubles

Last edited by m.brecher (2023-01-07 17:52)