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

Custom Migration Template (create.php.template) Path/Name? #420

Open
broberts-dev opened this issue Dec 19, 2019 · 2 comments
Open

Custom Migration Template (create.php.template) Path/Name? #420

broberts-dev opened this issue Dec 19, 2019 · 2 comments

Comments

@broberts-dev
Copy link

After reviewing the CakePHP migration plugin source, it appears, unlike when using Phinx directly, it's not possible without modifying the migrations plug-in source, which defeats the purpose of using Composer, to specify a custom migration template file (i.e. create.php.template) path/name.

The template path appears effectively hard-coded in ConfigurationTrait.php (cakephp\migrations\src\ConfigurationTrait.php).

Am I missing something or is there a means of doing this through app configuration?

@dereuromark
Copy link
Member

You mean

$templatePath = __DIR__ . DS . 'Template' . DS;

?
I agree that having a templatePath() wrapper that also allows a configured alternative would make sense.
Do you want to make a PR here?

@broberts-dev
Copy link
Author

Yes, I'll work on a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants