baserproject / bcaddonmigrator Goto Github PK
View Code? Open in Web Editor NEWbaserCMS Add-On Migrator
License: Other
baserCMS Add-On Migrator
License: Other
baserCMS 3 betaの動作検証で利用させていただいています。
テーマのマイグレーションを実行した際の問題です。
テーマ名がアッパーキャメルケースに沿っているテーマは正常にマイグレーションされますが、そうでないテーマはヘルパーファイルとビューファイルの中身の置換が動きませんでした。
public function migrateTheme($theme) {
$this->migrateThemeStructure($theme);
$newTheme = Inflector::camelize($theme);
$themePath = WWW_ROOT . 'theme' . DS . $newTheme;
$this->migrateHelper($themePath . DS . 'Helper');
$this->migrateView($themePath);
}
BcAddonMigrator3Componentの上記メソッドを見ると、
新しいテーマ名$newThemeは元のテーマ名$themeをアッパーキャメルケースに変換したものになっています。
しかし、元のテーマ名と新しいテーマ名が異なる場合(=元のテーマ名がアッパーキャメルケースではない場合)でも、テーマフォルダ自体はリネームされていないように見受けられます。
この結果、migrateHelperとmigrateViewの引数に存在しないディレクトリのパスが渡されてしまいます。
マイグレーション対象のテーマフォルダをアッパーキャメルケースにリネームするか、新しいテーマのパスを使わず元のテーマのパスを引数に渡すように変更する必要があるかと思いますが、いかがでしょうか?
また、CakePHP2系ではテーマ名もアッパーキャメルケースが標準だったと記憶しています。baserCMS 3からテーマ名はアッパーキャメルケースに統一することになるのでしょうか?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.