yiisoft/yii2-coding-standards

Migrations generate class not valid CaseCamel

githubjeka opened this issue · 4 comments

Оr add it to an exception in this expansion, or change the class name generation, but so convenient to underscore ^_^

P.S. And phpcs requires use namespace

@githubjeka please elaborate. It's not clear what you're doing and what's going wrong.

run php yii migrate/create init - get file

<?php

use yii\db\Schema;
use yii\db\Migration;

class m140724_122739_init extends Migration
{
    public function up()
    {

    }

    public function down()
    {
        echo "m140724_122739_init cannot be reverted.\n";

        return false;
    }
}

phpcs:

Class name "m140724_122739_init" is not in camel caps format

Each class must be in namespace

I see. Yeah, need to ignore migrations somehow.

Migrations could be ignored using --ignore. There's nothing to fix from our side.