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

topthink/think-migration/phinx/src/Phinx/Util/Util.php:109 #43

Open
cffycls opened this issue Jun 3, 2020 · 1 comment
Open

topthink/think-migration/phinx/src/Phinx/Util/Util.php:109 #43

cffycls opened this issue Jun 3, 2020 · 1 comment

Comments

@cffycls
Copy link

cffycls commented Jun 3, 2020

$fileName = static::getCurrentTimestamp() . '' . strtolower(implode($arr, '')) . '.php';
??
implode(): Passing glue string after array is deprecated. Swap the parameters
--> implode( '_', $arr )

@jenqz
Copy link

jenqz commented Nov 5, 2020

me too, my php version is 7.4, please fix it ASAP.
the newest method in Util.php of Phinx project has been changed like below:

public static function mapClassNameToFileName($className)
    {
        $snake = function ($matches) {
            return '_' . strtolower($matches[0]);
        };
        $fileName = preg_replace_callback('/\d+|[A-Z]/', $snake, $className);
        $fileName = static::getCurrentTimestamp() . "$fileName.php";

        return $fileName;
    }

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

2 participants