PHPackages                             adipriyantobpn/yii2-composer-helper - 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. [CLI &amp; Console](/categories/cli)
4. /
5. adipriyantobpn/yii2-composer-helper

ActiveYii2-extension[CLI &amp; Console](/categories/cli)

adipriyantobpn/yii2-composer-helper
===================================

Composer helper for Yii2

0.1.1(8y ago)0221Apache-2.0PHP

Since Sep 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/adipriyantobpn/yii2-composer-helper)[ Packagist](https://packagist.org/packages/adipriyantobpn/yii2-composer-helper)[ Docs](https://packagist.org/packages/adipriyantobpn/yii2-composer-helper)[ RSS](/packages/adipriyantobpn-yii2-composer-helper/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

Composer Helper
===============

[](#composer-helper)

Composer helper for Yii2

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist adipriyantobpn/yii2-composer-helper "*"

```

or add

```
"adipriyantobpn/yii2-composer-helper": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, new `composer` console application can be ready to use in your command prompt :

```
$ ./yii composer -h

DESCRIPTION

SUB-COMMANDS

- composer/batch-export                   Batch export for all supported data,
- composer/export-all-available-packages  Export all available Composer packages, which are registered in packagist.org
- composer/export-installed-packages      Export all installed packages
- composer/export-root-packages           Export all packages which specified in the composer.json
- composer/require-packages               Install packages via Composer, export the packages list, and commit them using
                                          git
```

Documentation
-------------

[](#documentation)

Each CLI sub-command of `yii2-composer-helper` can be seen with -h, just like shown below.

### Export Root Packages

[](#export-root-packages)

```
$ ./yii composer/export-root-packages -h
```

```
DESCRIPTION

Export all packages which specified in the composer.json

USAGE

yii composer/export-root-packages [format] [file] [...options...]

- format: string (defaults to 'json')
  Format of the output: text or json

- file: string|null (defaults to '@common/runtime/composer-packages-root.json')
  File path for saving exported data, also support Yii2 path alias

OPTIONS

--appconfig: string
  custom application configuration file path.
  If not set, default application configuration is used.

--color: boolean, 0 or 1
  whether to enable ANSI color in the output.
  If not set, ANSI color will only be enabled for terminals that support it.

--debug, -d: boolean, 0 or 1 (defaults to 1)
  debug the system shell command executed by this console application

--help, -h: boolean, 0 or 1
  whether to display help information about current command.

--interactive: boolean, 0 or 1 (defaults to 1)
  whether to run the command interactively.

--verbose, -v: boolean, 0 or 1 (defaults to 1)
  increase the verbosity of messages, as in composer --verbose
```

### Export Installed Packages

[](#export-installed-packages)

```
$ ./yii composer/export-installed-packages -h
```

```
DESCRIPTION

Export all installed packages

USAGE

yii composer/export-installed-packages [asTree] [file] [format] [...options...]

- asTree: boolean, 0 or 1 (defaults to 0)
  List the dependencies as a tree

- file: string (defaults to '@common/runtime/composer-packages.txt')
  File path for saving exported data, also support Yii2 path alias

- format: string (defaults to 'text')
  Format of the output: text or json

OPTIONS

--appconfig: string
  custom application configuration file path.
  If not set, default application configuration is used.

--color: boolean, 0 or 1
  whether to enable ANSI color in the output.
  If not set, ANSI color will only be enabled for terminals that support it.

--debug, -d: boolean, 0 or 1 (defaults to 1)
  debug the system shell command executed by this console application

--help, -h: boolean, 0 or 1
  whether to display help information about current command.

--interactive: boolean, 0 or 1 (defaults to 1)
  whether to run the command interactively.

--verbose, -v: boolean, 0 or 1 (defaults to 1)
  increase the verbosity of messages, as in composer --verbose
```

### Export All Available Packages

[](#export-all-available-packages)

```
$ ./yii composer/export-all-available-packages -h
```

```
DESCRIPTION

Export all available Composer packages, which are registered in packagist.org

USAGE

yii composer/export-all-available-packages [file] [...options...]

- file: string (defaults to '@common/runtime/composer-packages-all-available.txt')
  File path for saving exported data, also support Yii2 path alias

OPTIONS

--appconfig: string
  custom application configuration file path.
  If not set, default application configuration is used.

--color: boolean, 0 or 1
  whether to enable ANSI color in the output.
  If not set, ANSI color will only be enabled for terminals that support it.

--debug, -d: boolean, 0 or 1 (defaults to 1)
  debug the system shell command executed by this console application

--help, -h: boolean, 0 or 1
  whether to display help information about current command.

--interactive: boolean, 0 or 1 (defaults to 1)
  whether to run the command interactively.

--verbose, -v: boolean, 0 or 1 (defaults to 1)
  increase the verbosity of messages, as in composer --verbose
```

### Batch Export

[](#batch-export)

```
$ ./yii composer/batch-export -h
```

```
DESCRIPTION

Batch export for all supported data,
including installed packages (as text & as tree) specified in the composer.json,
and all available packages from packagist.org

USAGE

yii composer/batch-export [installedPackageFilePath] [installedPackageAsTreeFilePath] [allAvailablePackageFilePath] [...options...]

- installedPackageFilePath: string (defaults to '@common/runtime/composer-packages.txt')
  $installedPackageFilePath

- installedPackageAsTreeFilePath: string (defaults to '@common/runtime/composer-packages-tree.txt')
  $installedPackageAsTreeFilePath

- allAvailablePackageFilePath: string (defaults to '@common/runtime/composer-packages-all-available.txt')
  $allAvailablePackageFilePath

OPTIONS

--appconfig: string
  custom application configuration file path.
  If not set, default application configuration is used.

--color: boolean, 0 or 1
  whether to enable ANSI color in the output.
  If not set, ANSI color will only be enabled for terminals that support it.

--debug, -d: boolean, 0 or 1 (defaults to 1)
  debug the system shell command executed by this console application

--help, -h: boolean, 0 or 1
  whether to display help information about current command.

--interactive: boolean, 0 or 1 (defaults to 1)
  whether to run the command interactively.

--verbose, -v: boolean, 0 or 1 (defaults to 1)
  increase the verbosity of messages, as in composer --verbose
```

### Install new package

[](#install-new-package)

```
$ ./yii composer/require-packages -h
```

```
DESCRIPTION

Install packages via Composer, export the packages list, and (optionally) commit them into version control using git

USAGE

yii composer/require-packages  [preferSource] [commit] [...options...]

- packageName (required): string
  Package name

- preferSource: boolean, 0 or 1 (defaults to 1)
  Whether installing the package sources, or just install the package distribution

- commit: boolean, 0 or 1 (defaults to 0)
  Whether commit the package list using git

OPTIONS

--appconfig: string
  custom application configuration file path.
  If not set, default application configuration is used.

--color: boolean, 0 or 1
  whether to enable ANSI color in the output.
  If not set, ANSI color will only be enabled for terminals that support it.

--debug, -d: boolean, 0 or 1 (defaults to 1)
  debug the system shell command executed by this console application

--help, -h: boolean, 0 or 1
  whether to display help information about current command.

--interactive: boolean, 0 or 1 (defaults to 1)
  whether to run the command interactively.

--verbose, -v: boolean, 0 or 1 (defaults to 1)
  increase the verbosity of messages, as in composer --verbose
```

###  Health Score

25

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3122d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/df02a2b20593a51990ee10193ad7eae3e4d2c02cf957593bfb8917160d7b1300?d=identicon)[adipriyantobpn](/maintainers/adipriyantobpn)

---

Top Contributors

[![adipriyantobpn](https://avatars.githubusercontent.com/u/4537439?v=4)](https://github.com/adipriyantobpn "adipriyantobpn (14 commits)")

---

Tags

composerconsolehelperyii2extension

### Embed Badge

![Health badge](/badges/adipriyantobpn-yii2-composer-helper/health.svg)

```
[![Health](https://phpackages.com/badges/adipriyantobpn-yii2-composer-helper/health.svg)](https://phpackages.com/packages/adipriyantobpn-yii2-composer-helper)
```

###  Alternatives

[toriphes/yii2-console-runner

Runs console command in yii web application

29235.7k](/packages/toriphes-yii2-console-runner)[vova07/yii2-console-runner-extension

An extension for running console commands on background in Yii framework.

88199.5k2](/packages/vova07-yii2-console-runner-extension)[fedemotta/yii2-cronjob

Yii2 extension to help in the creation of automated console scripts

2233.3k](/packages/fedemotta-yii2-cronjob)

PHPackages © 2026

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