You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing dynamic return type for Nette\Http\Session::getSection() #77
Method Nette\Http\Session::getSection() has optional second parameter which can change class of returned object.
This extension does not support it and always returns Nette\Http\SessionSection class.
Activity
lukasojd commentedon Nov 19, 2021
+1
TomasVotruba commentedon Jan 29, 2022
Hi, could you provide PHP code examples of these 2 states? (I don't use Nette on this level)
I might try to add the extension then 👍
KacerCZ commentedon Feb 4, 2022
Here is the definition of method: https://github.com/nette/http/blob/04224e7fd25c70390419b463f4e2b26042ea5e2a/src/Http/Session.php#L314
In following examples
$sessionHandleris instance of\Nette\Http\Session.Example using default class for session section:
Variable
$sectioncontains instance of\Nette\Http\SessionSection.Example using diferent class for session section:
Variable
$sectioncontains instance ofMySection.lulco commentedon Apr 14, 2023
see https://github.com/phpstan/phpstan-nette/blob/1.1.x/stubs/ComponentModel/Container.stub
I think this is similar case and you can handle it with stub. I think something like this: