From 91ae3750133c75d085f69327d50534bf3a69ce84 Mon Sep 17 00:00:00 2001 From: sosuke-ito Date: Tue, 25 Oct 2016 17:35:02 +0900 Subject: [PATCH] accept dashed-string in DSN in phinx.php --- bin/files/phinx.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/files/phinx.php b/bin/files/phinx.php index 1d5f00d..85be062 100644 --- a/bin/files/phinx.php +++ b/bin/files/phinx.php @@ -9,9 +9,9 @@ preg_match("/(.*?):(.*)/", $_ENV['DB_DSN'], $parts); $type = $parts[1]; -preg_match("/host=(\w+)/", $_ENV['DB_DSN'], $parts); +preg_match("/host=([^;]+)/", $_ENV['DB_DSN'], $parts); $host = $parts[1]; -preg_match("/dbname=(\w+)/", $_ENV['DB_DSN'], $parts); +preg_match("/dbname=([^;]+)/", $_ENV['DB_DSN'], $parts); $dbName = $parts[1]; $default = [