diff --git a/.travis.yml b/.travis.yml index 2818aa51..1fc5fb27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 # aliased to a recent hhvm version - hhvm diff --git a/CHANGELOG.md b/CHANGELOG.md index 19992eac..5c8d50f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 4.1.1 - 2019-01-08 +### Fixed +- Fixed "assign user group" permissions not being exported +- Fixed issue where global set sources weren't linked because they were cached + ## 4.1.0 - 2018-11-19 ### Added - Added more flexibility for getting a record's index diff --git a/composer.json b/composer.json index 08f78246..048bdddb 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "version": "4.1.0", + "version": "4.1.1", "name": "nerds-and-company/schematic", "description": "Craft setup and sync tool", "type": "craft-plugin", diff --git a/src/Behaviors/SourcesBehavior.php b/src/Behaviors/SourcesBehavior.php index c2d3a8d4..bc0b0c5d 100644 --- a/src/Behaviors/SourcesBehavior.php +++ b/src/Behaviors/SourcesBehavior.php @@ -122,6 +122,10 @@ public function getSource(string $fieldType, string $source = null, string $inde $service = Craft::$app->sections; $method = 'getSectionBy'; break; + case 'assignUserGroup': + $service = Craft::$app->userGroups; + $method = 'getGroupBy'; + break; case 'group': case 'editCategories': $service = Users::class == $fieldType ? Craft::$app->userGroups : Craft::$app->categories; diff --git a/src/DataTypes/GlobalSetDataType.php b/src/DataTypes/GlobalSetDataType.php index a1021d00..a426b08e 100644 --- a/src/DataTypes/GlobalSetDataType.php +++ b/src/DataTypes/GlobalSetDataType.php @@ -35,4 +35,18 @@ public function getRecords(): array { return Craft::$app->globals->getAllSets(); } + + /** + * Reset craft global sets cache using reflection. + */ + public function afterImport() + { + $obj = Craft::$app->globals; + $refObject = new \ReflectionObject($obj); + if ($refObject->hasProperty('_allGlobalSets')) { + $refProperty1 = $refObject->getProperty('_allGlobalSets'); + $refProperty1->setAccessible(true); + $refProperty1->setValue($obj, null); + } + } }