Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve TODO: Start $i by looking at all files, otherwise only one generation per hours causes correct order #32

Open
SOHELAHMED7 opened this issue Aug 28, 2024 · 0 comments
Assignees

Comments

@SOHELAHMED7
Copy link
Member

SOHELAHMED7 commented Aug 28, 2024

Unable to figure out properly what this TODO is trying to convey

File: src/lib/generators/MigrationsGenerator.php::generate()

image

Does it try to convey that do while loop should be replaced by for loop as:

            for ($i = 0; $i < PHP_INT_MAX; $i++) {
                $date = YII_ENV_TEST ? '200000_00' : '';
                $className = $migration->makeClassNameByTime($i, $migrationNamespace, $date);
                if (!file_exists(Yii::getAlias("$migrationPath/$className.php"))) {
                    break;
                }
            }

@cebe any thoughts?


Part of #10

and

Part of cebe#180

@SOHELAHMED7 SOHELAHMED7 self-assigned this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant