Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

fix(Extension): fix init cookie on response setup #19

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(Extension): fix init cookie on response setup
  • Loading branch information
David Štrop committed Apr 19, 2023
commit 594da3d177d32d495fcff4279b2bd7966433b520
10 changes: 5 additions & 5 deletions src/DI/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ protected function createApplication(ContainerBuilder $builder)
->setAutowired(NetteApplicationHandler::class)
->addSetup('$catchExceptions', [$this->config->catchExceptions])
->addSetup('$errorPresenter', [$this->config->errorPresenter])
->addSetup('$onResponse[] = ?', [
(string)(new Nette\PhpGenerator\Literal(
'function() { Nette\Http\Helpers::initCookie($this->getService(?), $this->getService(?));};',
[$this->prefix('response'), $this->prefix('request')]
))
->addSetup('$onResponse[]', [
new Nette\PhpGenerator\Literal(
'function(): void { Nette\Http\Helpers::initCookie($this->getService(?), $this->getService(?));}',
[$this->prefix('request'), $this->prefix('response')]
)
]);
}

Expand Down