PHPackages                             fangx/testing-migration-command - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. fangx/testing-migration-command

ActiveLibrary[Testing &amp; Quality](/categories/testing)

fangx/testing-migration-command
===============================

testing migration commands

v1.0.2(5y ago)06MITPHPPHP ^7.2.0

Since Sep 8Pushed 5y agoCompare

[ Source](https://github.com/fangx-packages/testing-migration-command)[ Packagist](https://packagist.org/packages/fangx/testing-migration-command)[ RSS](/packages/fangx-testing-migration-command/feed)WikiDiscussions master Synced 1w ago

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

Fangx's Packages
----------------

[](#fangxs-packages)

> Laravel 默认的迁移命令只能执行第一层目录下的迁移文件, 本扩展支持多层目录 应用场景是在进行单元测试的时候, 可以自动执行所有的迁移文件

### Install

[](#install)

Via Composer

```
composer require fangx/testing-migration-command --dev

```

### Usage

[](#usage)

在所有的 migrate 命令前加上 `testing-` 即可调用本扩展改写的 migrate 命令, 如:

```
php artisan testing-migrate
php artisan testing-migrate:rollback

```

在 tests/TestCase.php 中添加以下代码, 自动替换单测中的 migrate 相关命令

```
namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Str;

abstract class TestCase extends BaseTestCase
{
    // ...others

    public function artisan($command, $parameters = [])
    {
        if (Str::startsWith($command, ['migrate', 'migration'])) {
            $command = 'testing-' . $command;
        }

        return parent::artisan($command, $parameters);
    }
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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

3

Last Release

2078d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48e745eaab94e5e8f347aadc5b74046bb174895188f0507b1d46c0fa6cee6555?d=identicon)[nfangxu](/maintainers/nfangxu)

---

Top Contributors

[![nfangxu](https://avatars.githubusercontent.com/u/33243730?v=4)](https://github.com/nfangxu "nfangxu (4 commits)")[![iufangx](https://avatars.githubusercontent.com/u/66901635?v=4)](https://github.com/iufangx "iufangx (1 commits)")

---

Tags

phphyperf

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fangx-testing-migration-command/health.svg)

```
[![Health](https://phpackages.com/badges/fangx-testing-migration-command/health.svg)](https://phpackages.com/packages/fangx-testing-migration-command)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7012.8k](/packages/tehwave-laravel-achievements)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

1484.6k3](/packages/calebdw-larastan)

PHPackages © 2026

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