From 993902ef69b942ab66a64da8b4512873826df10a Mon Sep 17 00:00:00 2001 From: Louis Charette Date: Tue, 16 Jan 2018 20:42:26 -0500 Subject: [PATCH 1/3] Support for UF 4.2 / FormGenerator 3.0.0-beta --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3a8394b..8dc6381 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "require": { "php": ">=5.6", - "lcharette/uf_formgenerator": "^2.1.0" + "lcharette/uf_formgenerator": "^3.0.0-beta" }, "autoload": { "psr-4": { From 4ce3a83500d0d26dd799de5e06e98ca6b614244f Mon Sep 17 00:00:00 2001 From: Louis Charette Date: Tue, 6 Mar 2018 22:24:49 -0500 Subject: [PATCH 2/3] Updated README --- README.md | 12 +++++------- src/Util/UserProfileHelper.php | 2 ++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e9f362d..301b7f1 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ # Custom User Profile Field Sprinkle for [UserFrosting 4](https://www.userfrosting.com) -This Sprinkle makes it easy to add any custom fields to the user or group model. Simply create a new schema in you own sprinkle and you're done. Your new profile fields will be automcatically integrated in the default UserFrosting interface. +[![UserFrosting Version](https://img.shields.io/badge/UserFrosting->=%204.2-brightgreen.svg)](https://github.com/userfrosting/UserFrosting) [![Donate](https://img.shields.io/badge/Donate-Buy%20Me%20a%20Coffee-brightgreen.svg)](https://ko-fi.com/A7052ICP) -> This version only works with UserFrosting 4.1.x ! +This Sprinkle makes it easy to add any custom fields to the user or group model. Simply create a new schema in you own sprinkle and you're done. Your new profile fields will be automatically integrated in the default UserFrosting interface. # Help and Contributing -If you need help using this sprinkle or found any bug, feels free to open an issue or submit a pull request. You can also find me on the [UserFrosting Chat](https://chat.userfrosting.com/) most of the time for direct support. - -Buy Me a Coffee at ko-fi.com +If you need help using this sprinkle or found any bug, feels free to open an issue or submit a pull request. You can also find me on the [UserFrosting Chat](https://chat.userfrosting.com/) most of the time for direct support. # Installation @@ -84,7 +82,7 @@ For example, you can add the following to a `schema/userProfile/myFields.json` f } ``` -Note that the schema must be saved inside the `schema/userProfile/` directory of your sprinkle to be picked up automatically by the system. You might also want to run `php bakery clear-cache` command from the UserFrosting root since thoses fields are stored in cache for better performances. +Note that the schema must be saved inside the `schema/userProfile/` directory of your sprinkle to be picked up automatically by the system. You might also want to run `php bakery clear-cache` command from the UserFrosting root since those fields are stored in cache for better performances. You can also specify **groups** custom fields by saving any schema in the the `schema/groupProfile/` directory of your sprinkle. @@ -93,5 +91,5 @@ You can also specify **groups** custom fields by saving any schema in the the `s ![Screenshot 1](/screenshots/UF_UserProfile1.png?raw=true) ![Screenshot 1](/screenshots/UF_UserProfile2.png?raw=true) -# Licence +# License By [Louis Charette](https://github.com/lcharette). Copyright (c) 2017, free to use in personal and commercial software as per the MIT license. diff --git a/src/Util/UserProfileHelper.php b/src/Util/UserProfileHelper.php index 3dd1ca1..ed11bb7 100644 --- a/src/Util/UserProfileHelper.php +++ b/src/Util/UserProfileHelper.php @@ -147,6 +147,8 @@ public function getFieldsSchema() protected function getSchemaContent($schemaLocation) { $schemas = array(); + + /** @var \RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator $locator */ $locator = $this->ci->locator; // Define the YAML loader From ef6eb3b1dbeb7cce0ce63dc4d8a4b21422594193 Mon Sep 17 00:00:00 2001 From: Louis Charette Date: Thu, 24 Jan 2019 21:37:52 -0500 Subject: [PATCH 3/3] Add support for FormGenerator 3.0.0 and 2.0.0 --- CHANGELOG.md | 35 +++++++++++++++++++++++++---------- README.md | 6 +++++- composer.json | 2 +- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6498108..cd0787b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,36 +1,51 @@ # Change Log -## 2.0.9 +## [2.1.0] +- Add support for FormGenerator v3.0.0 + +## [2.0.9] - Fix rollback migrations. -## 2.0.8 +## [2.0.8] - Fix migrations dependencies for future UF Version. -## 2.0.7 +## [2.0.7] - Fix migrations. -## 2.0.6 +## [2.0.6] - New `forProfileFieldsValue` scope (Usage :: `$groups = Group::forProfileFieldsValue($slug, $value);`) and `getProfileFieldsForSlug` custom mutator (Usage :: `$fieldValue = Group::getProfileFieldsForSlug($slug);`) both User and Group custom Models. -## 2.0.5 +## [2.0.5] - Update controller from core one -## 2.0.4 +## [2.0.4] - Fix db issue with group profile (Need to run new migration) -## 2.0.3 +## [2.0.3] - Updated Readme - Fix issue with cache -## 2.0.2 +## [2.0.2] - Fix issue where field value wound't display in user and group profile -## 2.0.1 +## [2.0.1] - Updated FormGenerator dependencies -## 2.0.0 +## [2.0.0] - First official release - Updated for UserFrosting v4.1.x ## 0.0.1 - Initial beta release + +[2.1.0]: https://github.com/lcharette/UF_UserProfile/compare/2.0.9...2.1.0 +[2.0.9]: https://github.com/lcharette/UF_UserProfile/compare/2.0.8...2.0.9 +[2.0.8]: https://github.com/lcharette/UF_UserProfile/compare/2.0.7...2.0.8 +[2.0.7]: https://github.com/lcharette/UF_UserProfile/compare/2.0.6...2.0.7 +[2.0.6]: https://github.com/lcharette/UF_UserProfile/compare/2.0.5...2.0.6 +[2.0.5]: https://github.com/lcharette/UF_UserProfile/compare/2.0.4...2.0.5 +[2.0.4]: https://github.com/lcharette/UF_UserProfile/compare/2.0.3...2.0.4 +[2.0.3]: https://github.com/lcharette/UF_UserProfile/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/lcharette/UF_UserProfile/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/lcharette/UF_UserProfile/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/lcharette/UF_UserProfile/compare/0.0.1...2.0.0 diff --git a/README.md b/README.md index 301b7f1..f7fd1bb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # Custom User Profile Field Sprinkle for [UserFrosting 4](https://www.userfrosting.com) -[![UserFrosting Version](https://img.shields.io/badge/UserFrosting->=%204.2-brightgreen.svg)](https://github.com/userfrosting/UserFrosting) [![Donate](https://img.shields.io/badge/Donate-Buy%20Me%20a%20Coffee-brightgreen.svg)](https://ko-fi.com/A7052ICP) +[![Latest Version](https://img.shields.io/github/release/lcharette/UF_UserProfile.svg)](https://github.com/lcharette/UF_UserProfile/releases) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE) +[![UserFrosting Version](https://img.shields.io/badge/UserFrosting->=%204.1-brightgreen.svg)](https://github.com/userfrosting/UserFrosting) +[![StyleCI](https://github.styleci.io/repos/83981830/shield?branch=master&style=flat)](https://github.styleci.io/repos/83981830) +[![Donate](https://img.shields.io/badge/Donate-Buy%20Me%20a%20Coffee-blue.svg)](https://ko-fi.com/A7052ICP) This Sprinkle makes it easy to add any custom fields to the user or group model. Simply create a new schema in you own sprinkle and you're done. Your new profile fields will be automatically integrated in the default UserFrosting interface. diff --git a/composer.json b/composer.json index 8dc6381..a81cc2d 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "require": { "php": ">=5.6", - "lcharette/uf_formgenerator": "^3.0.0-beta" + "lcharette/uf_formgenerator": "^2.1.0 || ^3.0.0" }, "autoload": { "psr-4": {