Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent parameter doesn't work with traits #183

Closed
martinknor opened this issue Jul 13, 2017 · 1 comment
Closed

Persistent parameter doesn't work with traits #183

martinknor opened this issue Jul 13, 2017 · 1 comment
Milestone

Comments

@martinknor
Copy link

martinknor commented Jul 13, 2017

  • bug report? yes
  • version: 2.4.6

Description

When i have persistent parameter in trait, routes with this parameter don't work. Probably problem is here: \Nette\Application\UI\Presenter::argsToParams because reflection cannot load parameters from trait.

Steps To Reproduce

trait PresenterTrait
{
	/** @persistent */
	public $locale;
}

class DefaultPresenter extends  \Nette\Application\UI\Presenter
{
	use PresenterTrait;
}

class SecondPresenter extends  \Nette\Application\UI\Presenter
{
	use PresenterTrait;
}
@martinknor martinknor changed the title Persistent parameters doesn't work with traits Persistent parameter doesn't work with traits Jul 13, 2017
@dg
Copy link
Member

dg commented Aug 20, 2017

It is not bug report, it is feature request, because persistent parameters in traits works as expected, ie the same way as in this case

class DefaultPresenter extends  \Nette\Application\UI\Presenter
{
	/** @persistent */
	public $locale;
}

class SecondPresenter extends  \Nette\Application\UI\Presenter
{
	/** @persistent */
	public $locale;
}

@dg dg added this to the v3.0 milestone May 29, 2018
@dg dg closed this as completed in 5dc023d May 31, 2018
dg added a commit that referenced this issue May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants