Allow overriding migration template #67

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Diff settings

Always

Just for now

@@ -38,7 +38,7 @@
class GenerateCommand extends AbstractCommand
{
- private static $_template =
+ protected static $_template =
'<?php
namespace <namespace>;
@@ -109,7 +109,7 @@ protected function generateMigration(Configuration $configuration, InputInterfac
$up ? " " . implode("\n ", explode("\n", $up)) : null,
$down ? " " . implode("\n ", explode("\n", $down)) : null
);
- $code = str_replace($placeHolders, $replacements, self::$_template);
+ $code = str_replace($placeHolders, $replacements, static::$_template);
$dir = $configuration->getMigrationsDirectory();
$dir = $dir ? $dir : getcwd();
$dir = rtrim($dir, '/');