Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function safeUp() |
||
21 | { |
||
22 | |||
23 | $projectConfig = Craft::$app->getProjectConfig(); |
||
24 | |||
25 | // Don't make the same config changes twice |
||
26 | $schemaVersion = $projectConfig->get('plugins.spoon.schemaVersion', true); |
||
27 | |||
28 | if (version_compare($schemaVersion, '3.4.0', '<')) { |
||
29 | // Run the rebuild and commit it to project.yaml |
||
30 | $projectConfig->muteEvents = true; |
||
31 | |||
32 | $projectConfig->set(BlockTypes::CONFIG_BLOCKTYPE_KEY, ProjectConfigHelper::rebuildProjectConfig()); |
||
33 | |||
34 | $projectConfig->muteEvents = false; |
||
35 | } |
||
47 |