Skip to content

Commit f3d00d2

Browse files
author
altynbek
committed
Initial commit
0 parents  commit f3d00d2

File tree

7 files changed

+87
-0
lines changed

7 files changed

+87
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.idea
2+
vendor
3+
tests/_output/*
4+
composer.lock
5+
.sass-cache
6+
node_modules/
7+
.env

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TODO

composer.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "yii2-bridge/migrate-command",
3+
"description": "Run migrate for Bridge",
4+
"type": "yii2-extension",
5+
"keywords": [
6+
"yii2",
7+
"bridge",
8+
"migrate",
9+
"console",
10+
"command"
11+
],
12+
"license": "BSD-3-Clause",
13+
"authors": [
14+
{
15+
"name": "Altynbek Kazezov",
16+
"email": "altinbek__97@mail.ru",
17+
"role": "Developer"
18+
}
19+
],
20+
"autoload": {
21+
"psr-4": {
22+
"Bridge\\Migrate\\Modules": "src/",
23+
"Bridge\\Migrate\\Controllers": "src/controllers/"
24+
}
25+
},
26+
"minimum-stability": "stable",
27+
"require-dev": {
28+
"phpunit/phpunit": "^5.4"
29+
}
30+
}

phpunit.xml.dist

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<phpunit bootstrap="./tests/bootstrap.php"
3+
colors="true"
4+
convertErrorsToExceptions="true"
5+
convertNoticesToExceptions="true"
6+
convertWarningsToExceptions="true"
7+
stopOnFailure="false">
8+
<testsuites>
9+
<testsuite name="Test Suite">
10+
<directory>./tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
<logging>
14+
<log type="coverage-clover" target="build/logs/clover.xml"/>
15+
</logging>
16+
<filter>
17+
<whitelist processUncoveredFilesFromWhitelist="true">
18+
<directory suffix=".php">src</directory>
19+
</whitelist>
20+
</filter>
21+
</phpunit>

src/Module.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace Bridge\Migrate\Modules;
4+
5+
/**
6+
* Class Module
7+
* @package Bridge\Migrate\Modules
8+
*/
9+
class Module extends \yii\base\Module
10+
{
11+
public $controllerNamespace = 'Bridge\Migrate\Controllers';
12+
}

src/controllers/DefaultController.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Bridge\Migrate\Controllers;
4+
5+
use yii\console\Controller;
6+
use Yii;
7+
8+
class DefaultController extends Controller
9+
{
10+
public function actionIndex()
11+
{
12+
$result = shell_exec(Yii::getAlias('@app') . '/vendor/bin/bridge-install');
13+
echo $result;
14+
}
15+
}

tests/bootstrap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php

0 commit comments

Comments
 (0)