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

Invalid @method annotation in DefaultTemplate #342

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

mildabre
Copy link
Contributor

No BC break

I propose remove @method annotation of two non-existing methods you can't even call magically. IDE makes false suggestion in presenter when used type annotation DefaultTemplate for magic property $template:

/**
 * @property DefaultTemplate $template
 */
final class MyPresenter extends BasePresenter
{
    public function actionDefault(): void
    {
        $isLinkCurrent = $this->template->isLinkCurrent(':Common:Sign:login');
    }
}

This code makes error:

Error
Call to undefined method Nette\Bridges\ApplicationLatte\DefaultTemplate::isLinkCurrent()

It looks like the annotations have no function at all.

dg and others added 21 commits September 10, 2024 12:09
- inteface Nette\Application\IRouter replaced by Nette\Routing\Router
…e() for persistent parameters. [Closes nette/nette#703][Closes nette/nette#703][Closes nette#69]" (possible BC break)

This reverts commit cda17f4.

See https://forum.nette.org/cs/35528-stejne-pojmenovany-parametr-akce-presenteru-a-persistentni-odlisne-chovani-v-nette-2-0-oproti-aktualnimu#p221742

BC break: Property must be nullable, ie: #[Persistent] public ?int $foo
…rs dynamically (BC break)

TODO: scanDir must be active
…ible to call these methods neither standard nor magical way
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

Successfully merging this pull request may close these issues.

3 participants