PHPackages                             webvimark/yii2-stubs-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webvimark/yii2-stubs-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webvimark/yii2-stubs-generator
==============================

Yii2 component stubs generator for Yii::$app

1.0.4(9y ago)03.4kMITPHP

Since May 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/webvimark/yii2-stubs-generator)[ Packagist](https://packagist.org/packages/webvimark/yii2-stubs-generator)[ RSS](/packages/webvimark-yii2-stubs-generator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (9)Used By (0)

Yii::$app stubs generator for Yii 2
===================================

[](#yiiapp-stubs-generator-for-yii-2)

Fork from awesome bazilio91/yii2-stubs-generator. All credits to bazilio91.

This extension provides no-more-butthurt components autocomplete generator command for Yii 2.

[![in action](https://camo.githubusercontent.com/1b6897a0973593fe6acdbd8c138fe2ce90dd7545af3931b55473b85c233a504e/68747470733a2f2f6d6f6e6f736e61702e636f6d2f66696c652f6f48556a425377376f494a4859414570514b73346d56564a4c664d4c724d2e706e67)](https://camo.githubusercontent.com/1b6897a0973593fe6acdbd8c138fe2ce90dd7545af3931b55473b85c233a504e/68747470733a2f2f6d6f6e6f736e61702e636f6d2f66696c652f6f48556a425377376f494a4859414570514b73346d56564a4c664d4c724d2e706e67)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require webvimark/yii2-stubs-generator --dev

```

or add

```
"webvimark/yii2-stubs-generator": "^1"
```

to the `require-dev` section of your `composer.json`.

Usage
-----

[](#usage)

To use this extension, simply add the following code in your application configuration (console.php):

```
'controllerMap' => [
    'stubs' => [
        'class' => 'webvimark\stubsgenerator\StubsController',

        // This configs will be always will be used in stub generation. It can be empty

//            'configs' => [
//                'console/config/main.php',
//                'common/config/main.php',
//                'frontend/config/main.php',
//            ],
    ],
],
```

```
# generate stubs with default configs
php yii stubs

# generate stubs for console application (plus default configs)
php yii stubs console/config/main.php

# to generate stubs for several apps
php yii stubs console/config/main.php common/config/main.php frontend/config/main.php (plus default configs)

```

File with stubs by default located in vendor directory.

Usage with PhpStorm
-------------------

[](#usage-with-phpstorm)

1. Install `File Watchers` JetBrains plugin
2. Open `File Watchers` plugin config and import [watcher.xml](watcher.xml)
3. Edit imported watcher for your needs
4. Add scope to limit trigger to config files: [![](https://camo.githubusercontent.com/64633b27b895d3d0ef922577f53ed9cf0117ba77c02b75131f91e625fd33243a/68747470733a2f2f6d6f6e6f736e61702e636f6d2f66696c652f3955644541735a55784f3658634f78494e676d31737563577875755975342e706e67)](https://camo.githubusercontent.com/64633b27b895d3d0ef922577f53ed9cf0117ba77c02b75131f91e625fd33243a/68747470733a2f2f6d6f6e6f736e61702e636f6d2f66696c652f3955644541735a55784f3658634f78494e676d31737563577875755975342e706e67)

#### PhpStorm "multiple definitions exist for class"

[](#phpstorm-multiple-definitions-exist-for-class)

To hide this message:

1. Find a duplicate class file (not created by this generator), for example: `vendor/yiisoft/yii/YiiBase.php`
2. Mark it as a plain text in file context menu.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 65% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~74 days

Total

8

Last Release

3503d ago

Major Versions

0.0.3 → 1.0.02015-12-12

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6502086?v=4)[webvimark](/maintainers/webvimark)[@webvimark](https://github.com/webvimark)

---

Top Contributors

[![bazilio91](https://avatars.githubusercontent.com/u/380542?v=4)](https://github.com/bazilio91 "bazilio91 (13 commits)")[![johny011409](https://avatars.githubusercontent.com/u/59572323?v=4)](https://github.com/johny011409 "johny011409 (4 commits)")[![githubjeka](https://avatars.githubusercontent.com/u/874234?v=4)](https://github.com/githubjeka "githubjeka (2 commits)")[![sheershoff](https://avatars.githubusercontent.com/u/1510318?v=4)](https://github.com/sheershoff "sheershoff (1 commits)")

---

Tags

autocompletephpstormstubsyii2

### Embed Badge

![Health badge](/badges/webvimark-yii2-stubs-generator/health.svg)

```
[![Health](https://phpackages.com/badges/webvimark-yii2-stubs-generator/health.svg)](https://phpackages.com/packages/webvimark-yii2-stubs-generator)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[jetbrains/phpstorm-stubs

PHP runtime &amp; extensions header files for PhpStorm

1.4k27.7M68](/packages/jetbrains-phpstorm-stubs)[bazilio/yii2-stubs-generator

Yii2 component stubs generator for Yii::$app

146720.4k1](/packages/bazilio-yii2-stubs-generator)[phalcon/ide-stubs

The most complete Phalcon Framework IDE stubs library which enables autocompletion in modern IDEs.

1623.1M121](/packages/phalcon-ide-stubs)[mis/yii2-ide-helper

Yii2 IDE Helper, generates correct PHPDocs for all components, to improve auto-completion.

1664.2k3](/packages/mis-yii2-ide-helper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
