| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function safeUp() |
||
| 17 | { |
||
| 18 | // Don't make the same config changes twice |
||
| 19 | $projectConfig = Craft::$app->getProjectConfig(); |
||
| 20 | $schemaVersion = $projectConfig->get('plugins.seomatic.schemaVersion', true); |
||
| 21 | |||
| 22 | if (version_compare($schemaVersion, '3.0.10', '<')) { |
||
| 23 | foreach ($projectConfig->get('graphql.schemas') ?? [] as $schemaUid => $schemaComponents) { |
||
| 24 | if (isset($schemaComponents['scope'])) { |
||
| 25 | $scope = $schemaComponents['scope']; |
||
| 26 | $scope[] = 'seomatic.all:read'; |
||
| 27 | |||
| 28 | $projectConfig->set("graphql.schemas.$schemaUid.scope", $scope); |
||
| 29 | } |
||
| 43 |