Download the PHP package yii2-extensions/phpstan without Composer

On this page you can find all versions of the php package yii2-extensions/phpstan. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpstan

Yii Framework

PHPStan


PHPUnit PHPStan Security

Enhanced static analysis for Yii2 applications with PHPStan
Precise type inference, dynamic method resolution, and comprehensive property reflection

## Features ### Installation ### Quick start Create `config/phpstan.php` with an analysis-only description of your application: Create `phpstan.neon` in the project root, choosing paths that exist in your application: Run PHPStan: ### Type inference examples The snippets below assume an `app\models\Article` model with `id` and `title` property tags and a `published()` query scope. The [usage guide](docs/examples.md) describes the analysis configuration for the components, params and behaviors shown here. #### Active Record Yii supplies generic types for `findOne()`, `findAll()`, relations and the standard query methods. This extension adds row shapes from model `@property` tags and precise `getAttribute()` types: A custom query without generic PHPDoc, such as one generated by Gii, is bound to the model at the `find()` call site. Use `static` or `$this` scope return types to preserve that binding. Row shapes include inherited property tags; relation and read-only keys are optional and need guards such as `??`. See [query limitations](docs/examples.md#custom-active-query-classes) when a query is reached through a typed parameter or a widened relation getter. #### Application components `Yii::$app` uses `phpstan.application_type`, which defaults to `yii\web\Application`. Component classes come from the analysis configuration: Class names, class-key arrays, object instances and factories with a single class return type can provide precise types. An untyped factory yields `object`; adding an accurate return type makes the result specific. Core components configured without a class keep the application's annotated property type. The built-in `user: identityClass` mapping also supplies the configured identity class to `yii\web\User`'s generic parameter. Its `identity` property remains nullable. See [generic components](docs/configuration.md#generic-components) and the separate [console application configuration](docs/configuration.md#web-console-and-custom-applications). #### Application params Params values become an array shape, including nested arrays and keys containing dots or other punctuation: Scalars are widened to their types rather than retained as literal values. The same shape applies to inherited module params, including `$this->module->params` in a controller. With no configured params, the type stays `array`. #### Behaviors The analysis-only `behaviors` map exposes members from attached behavior classes. In the example, `TaggedComponent` is mapped to `TagBehavior`; the application must also attach that behavior at runtime: Properties and methods are resolved from the behavior's native members and PHPDoc. See [behavior configuration](docs/configuration.md#behaviors). #### Dependency injection Container service definitions and aliases are resolved by their IDs: The example config maps `view.alias` to `view.real` and gives `sharedView` a typed factory. An unresolved definition keeps the result as `object`. Container factories, invocable objects and aliases have distinct rules; see [definition forms](docs/configuration.md#definition-forms). #### Header collection A non-null default removes `null` from the return type. The `$first` argument selects a single value or an array. #### Logger messages Logger and target message buffers have tuple types without local stubs or PHPDoc overrides: Payload types follow the installed Yii version. Filtering preserves the input key and tuple types while allowing an empty result. See the [logger examples](docs/examples.md#headers-and-logger-messages). #### Service locator A service locator resolves configured component IDs, while container-only IDs belong to the container: Passing `false` or a non-constant boolean as `$throwException` makes a resolved component nullable. An `object` fallback does not guarantee a successful runtime lookup: unknown component IDs can throw. Use `Yii::$container->get('view.alias')` for the configured container alias. ## Documentation Practical guides and complete examples for Yii type inference and application analysis. - ๐Ÿ“š [Installation Guide](docs/installation.md) - โš™๏ธ [Configuration Guide](docs/configuration.md) - ๐Ÿ’ก [Usage Examples](docs/examples.md) - ๐Ÿ”„ [Upgrade Guide](UPGRADE.md) and [Migration Guide](docs/migration.md) - ๐Ÿงช [Testing Guide](docs/testing.md) The guides and the [API reference](https://yii2-framework.github.io/docs/extensions/phpstan/reference/) generated from the PHPDoc in `src/` are published at . ## AI assistance AI agents: read the [documentation index](https://yii2-framework.github.io/docs/llms.txt) and fetch the Markdown version of a page by appending `index.md` to its URL. The [AI agents guide](https://yii2-framework.github.io/docs/project/ai-agents/) covers skill installation, client setup and verification. - ๐Ÿค– [`yii2-phpstan-analysis` skill](docs/agents.md): Static analysis. - ๐Ÿงญ [`yii2-framework` skill](https://yii2-framework.github.io/docs/guide/skills/yii2-framework/): Yii 22.0 application conventions. The hosted documentation covers Yii 22.0. If it does not match the installed revision or is unavailable, use the [repository guides](#documentation), the [skill source](skills/yii2-phpstan-analysis/SKILL.md), the source PHPDoc and the [changelog](CHANGELOG.md). ## Package information [![PHP](https://img.shields.io/badge/%3E%3D8.3-777BB4.svg?style=for-the-badge&logo=php&logoColor=white)](https://www.php.net/releases/8.3/en.php) [![Yii 2.0.55+](https://img.shields.io/badge/%3E%3D2.0.55-0073AA.svg?style=for-the-badge&logo=yii&logoColor=white)](https://github.com/yiisoft/yii2/releases/tag/2.0.55) [![Yii 22.0.x](https://img.shields.io/badge/22.0.x-0073AA.svg?style=for-the-badge&logo=yii&logoColor=white)](https://github.com/yiisoft/yii2/tree/22.0) [![Latest Stable Version](https://img.shields.io/packagist/v/yii2-extensions/phpstan.svg?style=for-the-badge&logo=packagist&logoColor=white&label=Stable)](https://packagist.org/packages/yii2-extensions/phpstan) [![Total Downloads](https://img.shields.io/packagist/dt/yii2-extensions/phpstan.svg?style=for-the-badge&logo=composer&logoColor=white&label=Downloads)](https://packagist.org/packages/yii2-extensions/phpstan) ## Project status [![Codecov](https://img.shields.io/codecov/c/github/yii2-extensions/phpstan.svg?style=for-the-badge&logo=codecov&logoColor=white&label=Coverage)](https://codecov.io/github/yii2-extensions/phpstan) [![PHPStan Level Max](https://img.shields.io/badge/PHPStan-Level%20Max-4F5D95.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/yii2-extensions/phpstan/actions/workflows/static.yml) [![Quality](https://img.shields.io/github/actions/workflow/status/yii2-extensions/phpstan/quality.yml?style=for-the-badge&label=Quality&logo=github)](https://github.com/yii2-extensions/phpstan/actions/workflows/quality.yml) [![StyleCI](https://img.shields.io/badge/StyleCI-Passed-44CC11.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.styleci.io/repos/701347895?branch=main) ## Our social networks [![Follow on X](https://img.shields.io/badge/-Follow%20on%20X-1DA1F2.svg?style=for-the-badge&logo=x&logoColor=white&labelColor=000000)](https://x.com/Terabytesoftw) [![Follow on Facebook](https://img.shields.io/badge/-Follow%20on%20Facebook-1877F2.svg?style=for-the-badge&logo=facebook&logoColor=white&labelColor=000000)](https://www.facebook.com/wilmer.arambula.9) [![Join our Subreddit](https://img.shields.io/badge/-Join%20our%20Subreddit-FF4500.svg?style=for-the-badge&logo=reddit&logoColor=white&labelColor=000000)](https://www.reddit.com/r/Yii2/) [![Join on Telegram](https://img.shields.io/badge/-Join%20on%20Telegram-26A5E4.svg?style=for-the-badge&logo=telegram&logoColor=white&labelColor=000000)](https://t.me/yii_framework_in_english) ## Built with AI [![Built with Claude Code](https://img.shields.io/badge/Built%20with-Claude%20Code-D97757.svg?style=for-the-badge&logo=claude&logoColor=white)](https://claude.com/claude-code) [![Built with Codex](https://img.shields.io/badge/Built%20with-Codex-10A37F.svg?style=for-the-badge&logo=openaigym&logoColor=white)](https://openai.com/codex) [![Reviewed by CodeRabbit](https://img.shields.io/badge/Reviewed%20by-CodeRabbit-FF570A.svg?style=for-the-badge&logo=coderabbit&logoColor=white)](https://www.coderabbit.ai) ## License [![License](https://img.shields.io/badge/License-BSD--3--Clause-brightgreen.svg?style=for-the-badge&logo=opensourceinitiative&logoColor=white&labelColor=555555)](LICENSE)

All versions of phpstan with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
nikic/php-parser Version ^4.1|^5.4
phpstan/phpstan Version ^2.3
yiisoft/yii2 Version ~2.0.55 || ^22.0@dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yii2-extensions/phpstan contains the following files

Loading the files please wait ...