{"id":14965593,"url":"https://github.com/phpstan/phpstan-nette","last_synced_at":"2025-05-15T08:06:32.928Z","repository":{"id":3304765,"uuid":"49017259","full_name":"phpstan/phpstan-nette","owner":"phpstan","description":"Nette Framework class reflection extension for PHPStan \u0026 framework-specific rules","archived":false,"fork":false,"pushed_at":"2025-04-15T15:31:13.000Z","size":289,"stargazers_count":102,"open_issues_count":17,"forks_count":38,"subscribers_count":8,"default_branch":"2.0.x","last_synced_at":"2025-05-11T10:29:02.814Z","etag":null,"topics":["nette-framework","php","php7","phpstan","static-analysis","static-analyzer","static-code-analysis","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpstan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-01-04T19:08:52.000Z","updated_at":"2025-05-02T12:58:17.000Z","dependencies_parsed_at":"2024-01-13T07:21:29.916Z","dependency_job_id":"cc35d335-da46-48f6-9cd4-3e5e72af8931","html_url":"https://github.com/phpstan/phpstan-nette","commit_stats":{"total_commits":267,"total_committers":34,"mean_commits":7.852941176470588,"dds":0.3820224719101124,"last_synced_commit":"cacb6983bbdf44d5c3a7222e5ca74f61f8531806"},"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-nette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-nette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-nette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-nette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpstan","download_url":"https://codeload.github.com/phpstan/phpstan-nette/tar.gz/refs/heads/2.0.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301431,"owners_count":22047904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nette-framework","php","php7","phpstan","static-analysis","static-analyzer","static-code-analysis","testing"],"created_at":"2024-09-24T13:34:57.616Z","updated_at":"2025-05-15T08:06:32.899Z","avatar_url":"https://github.com/phpstan.png","language":"PHP","readme":"# Nette Framework extension for PHPStan\n\n[![Build](https://github.com/phpstan/phpstan-nette/workflows/Build/badge.svg)](https://github.com/phpstan/phpstan-nette/actions)\n[![Latest Stable Version](https://poser.pugx.org/phpstan/phpstan-nette/v/stable)](https://packagist.org/packages/phpstan/phpstan-nette)\n[![License](https://poser.pugx.org/phpstan/phpstan-nette/license)](https://packagist.org/packages/phpstan/phpstan-nette)\n\n* [PHPStan](https://phpstan.org/)\n* [Nette Framework](https://nette.org/)\n\nThis extension provides following features:\n\n* `Nette\\ComponentModel\\Container::getComponent()` knows type of the component because it reads the return type on `createComponent*` (this works best in presenters and controls)\n* `Nette\\DI\\Container::getByType` and `createInstance` return type based on first parameter (`Foo::class`).\n* `Nette\\Forms\\Container::getValues` return type based on `$asArray` parameter.\n* `Nette\\ComponentModel\\Component::lookup` return type based on `$throw` parameter.\n* `Nette\\Application\\UI\\Component::getPresenter` return type based on `$throw` parameter.\n* Dynamic methods of [Nette\\Utils\\Html](https://doc.nette.org/en/2.4/html-elements)\n* Magic [Nette\\Object and Nette\\SmartObject](https://doc.nette.org/en/2.4/php-language-enhancements) properties\n* Event listeners through the `on*` properties\n* Defines early terminating method calls for Presenter methods to prevent `Undefined variable` errors\n* Understand the exact array shape coming from `Nette\\Utils\\Strings::match()` and `Nette\\Utils\\Strings::matchAll()` based on pattern\n\nIt also contains these framework-specific rules (can be enabled separately):\n\n* Do not extend Nette\\Object, use Nette\\SmartObject trait instead\n* Rethrow exceptions that are always meant to be rethrown (like `AbortException`)\n\n\n## Installation\n\nTo use this extension, require it in [Composer](https://getcomposer.org/):\n\n```\ncomposer require --dev phpstan/phpstan-nette\n```\n\nIf you also install [phpstan/extension-installer](https://github.com/phpstan/extension-installer) then you're all set!\n\n\u003cdetails\u003e\n  \u003csummary\u003eManual installation\u003c/summary\u003e\n\nIf you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config:\n\n```\nincludes:\n    - vendor/phpstan/phpstan-nette/extension.neon\n```\n\nTo perform framework-specific checks, include also this file:\n\n```\n    - vendor/phpstan/phpstan-nette/rules.neon\n```\n\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpstan%2Fphpstan-nette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpstan%2Fphpstan-nette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpstan%2Fphpstan-nette/lists"}