From ee2ac7e6402a2294e2f3da47b92200c9734f740d Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Mon, 4 Sep 2023 23:08:38 -0400 Subject: [PATCH 01/11] fixes #463 ...again --- sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls b/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls index c0be3c45b9..0eac50185f 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls @@ -108,7 +108,7 @@ public class fflib_SObjectDescribe { } else if ( fieldName.endsWithIgnoreCase('__pr') ) //resolve custom field cross-object (__pr) syntax for person accounts { - fieldNameAdjusted = fieldName.removeEndIgnoreCase('__pr') + '__c'; + fieldNameAdjusted = fieldName.removeEndIgnoreCase('__pr') + '__pc'; } Schema.SObjectField result = wrappedFields.get( fieldNameAdjusted, implyNamespace ); From d482301903515aa6a4a150acc71902df52c0c7be Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Mon, 2 Oct 2023 09:38:22 -0400 Subject: [PATCH 02/11] corrected inline comment --- .../apex-common/main/classes/fflib_SObjectSelector.cls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls b/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls index 2d15652a29..3abbdc4e38 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls @@ -438,7 +438,7 @@ public abstract with sharing class fflib_SObjectSelector } /** - * Adds a subselect QueryFactory based on this selector to the given QueryFactor, returns the parentQueryFactory + * Adds a subselect QueryFactory based on this selector to the given QueryFactor, returns the child QueryFactory **/ public fflib_QueryFactory addQueryFactorySubselect(fflib_QueryFactory parentQueryFactory) { @@ -461,7 +461,7 @@ public abstract with sharing class fflib_SObjectSelector } /** - * Adds a subselect QueryFactory based on this selector to the given QueryFactor, returns the parentQueryFactory + * Adds a subselect QueryFactory based on this selector to the given QueryFactor, returns the child QueryFactory **/ public fflib_QueryFactory addQueryFactorySubselect(fflib_QueryFactory parentQueryFactory, String relationshipName) { From eb4d06d6f0cc1b697baab6ee32cfbb6caa66a2ce Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Sat, 4 Nov 2023 22:26:41 -0400 Subject: [PATCH 03/11] Adjustments and updates to video and related links --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b1328c3d57..65cadaa504 100644 --- a/README.md +++ b/README.md @@ -32,14 +32,6 @@ Application Enterprise Patterns on Force.com Design patterns are an invaluable tool for developers and architects looking to build enterprise solutions. Here are presented some tried and tested enterprise application engineering patterns that have been used in other platforms and languages. We will discuss and illustrate how patterns such as Data Mapper, Service Layer, Unit of Work and of course Model View Controller can be applied to Force.com. Applying these patterns can help manage governed resources (such as DML) better, encourage better separation-of-concerns in your logic and enforce Force.com coding best practices. -Dreamforce Session and Slides ------------------------------ - -- View slides for the **Dreamforce 2013** session [here](https://docs.google.com/file/d/0B6brfGow3cD8RVVYc1dCX2s0S1E/edit) -- Video recording of the **Dreamforce 2013** session [here](http://www.youtube.com/watch?v=qlq46AEAlLI). -- Video recording of the **Advanced Apex Enterprise Dreamforce 2014** session [here](http://dreamforce.vidyard.com/watch/7QtP2628KmtXfmiwI-7B1w%20). -- View slides for the **Dreamforce 2015** session [here](http://www.slideshare.net/andyinthecloud/building-strong-foundations-apex-enterprise-patterns) - Documentation ------------- @@ -52,11 +44,19 @@ Documentation - [Apex Enterprise Patterns - Service Layer](http://wiki.developerforce.com/page/Apex_Enterprise_Patterns_-_Service_Layer) - [Apex Enterprise Patterns - Domain Layer](http://wiki.developerforce.com/page/Apex_Enterprise_Patterns_-_Domain_Layer) - [Apex Enterprise Patterns - Selector Layer](https://github.com/financialforcedev/df12-apex-enterprise-patterns#data-mapper-selector) +- View slides for the **Dreamforce 2013** session [here](https://docs.google.com/file/d/0B6brfGow3cD8RVVYc1dCX2s0S1E/edit) +- View slides for the **Dreamforce 2015** session [here](http://www.slideshare.net/andyinthecloud/building-strong-foundations-apex-enterprise-patterns) + +**Related Webinars** +- [Advanced Apex Enterprise Patterns](https://www.youtube.com/watch?v=BLXp0ZP0cF0) +- [Apex Hours (August 2020): Apex Enterprise Patterns](https://www.apexhours.com/apex-enterprise-patterns/) + +**Related Book** +- [Salesforce Platform Enterprise Architecture, 4th Edition, by Andrew Fawcett](https://www.amazon.com/Salesforce-Platform-Enterprise-Architecture-applications-ebook/dp/B0BD8TBT75/ref=pd_ci_mcx_mh_mcx_views_0) **Other Related Blogs** - [Preview of Advanced Apex Patterns Session (Application Factory and ApexMocks Features)](http://andyinthecloud.com/2014/08/26/preview-of-advanced-apex-enterprise-patterns-session/) - [Unit Testing with the Domain Layer](http://andyinthecloud.com/2014/03/23/unit-testing-with-the-domain-layer/) -- [MavensMate Templates](http://andyinthecloud.com/2014/05/23/mavensmate-templates-and-apex-enterprise-patterns/) - [FinancialForce Apex Common Updates](http://andyinthecloud.com/2014/06/28/financialforce-apex-common-updates/) From 125b0109d0593909532ade9d10668cc94980ea2b Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Sun, 5 Nov 2023 15:20:53 -0500 Subject: [PATCH 04/11] removed extranious items from link to book --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65cadaa504..f048e62641 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Documentation - [Apex Hours (August 2020): Apex Enterprise Patterns](https://www.apexhours.com/apex-enterprise-patterns/) **Related Book** -- [Salesforce Platform Enterprise Architecture, 4th Edition, by Andrew Fawcett](https://www.amazon.com/Salesforce-Platform-Enterprise-Architecture-applications-ebook/dp/B0BD8TBT75/ref=pd_ci_mcx_mh_mcx_views_0) +- [Salesforce Platform Enterprise Architecture, 4th Edition, by Andrew Fawcett](https://www.amazon.com/Salesforce-Platform-Enterprise-Architecture-applications-ebook/dp/B0BD8TBT75/) **Other Related Blogs** From c584d115e49bc291e180c9f3cff300118321f104 Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Sun, 5 Nov 2023 16:03:32 -0500 Subject: [PATCH 05/11] addition of the manage sf api version github action --- .github/workflows/manage.sf.api.versions.yml | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/manage.sf.api.versions.yml diff --git a/.github/workflows/manage.sf.api.versions.yml b/.github/workflows/manage.sf.api.versions.yml new file mode 100644 index 0000000000..6900179c01 --- /dev/null +++ b/.github/workflows/manage.sf.api.versions.yml @@ -0,0 +1,22 @@ +name: Manage SF API Versions +on: + workflow_dispatch: + inputs: + api-version: + description: 'api version in the format XX e.g 58' + required: true + type: string +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: apex-enterprise-patterns/manage-sf-api-version@v1.0.0 + with: + api-version: ${{inputs.api-version}} + - uses: peter-evans/create-pull-request@v5 + with: + title: 'Bump API Versions to ${{inputs.api-version}}.0' + body: 'Automatically bumped by GitHub Actions ' + branch: 'devops/bump-api-versions-v${{inputs.api-version}}.0' + commit-message: 'chore: bump api to v${{inputs.api-version}}.0' From c74146511fe37f101f2c873190477b65838fe4c1 Mon Sep 17 00:00:00 2001 From: ImJohnMDaniel Date: Mon, 6 Nov 2023 20:24:16 +0000 Subject: [PATCH 06/11] chore: bump api to v59.0 --- sfdx-project.json | 18 +++++++++--------- .../classes/fflib_Application.cls-meta.xml | 2 +- .../main/classes/fflib_IDomain.cls-meta.xml | 2 +- .../fflib_IDomainConstructor.cls-meta.xml | 2 +- .../classes/fflib_IDomainFactory.cls-meta.xml | 2 +- .../main/classes/fflib_IObjects.cls-meta.xml | 2 +- .../classes/fflib_ISObjectDomain.cls-meta.xml | 2 +- .../fflib_ISObjectSelector.cls-meta.xml | 2 +- .../fflib_ISObjectUnitOfWork.cls-meta.xml | 2 +- .../main/classes/fflib_ISObjects.cls-meta.xml | 2 +- .../fflib_ISelectorFactory.cls-meta.xml | 2 +- .../classes/fflib_IServiceFactory.cls-meta.xml | 2 +- .../fflib_IUnitOfWorkFactory.cls-meta.xml | 2 +- .../main/classes/fflib_Objects.cls-meta.xml | 2 +- .../classes/fflib_QueryFactory.cls-meta.xml | 2 +- .../classes/fflib_SObjectDescribe.cls-meta.xml | 2 +- .../classes/fflib_SObjectDomain.cls-meta.xml | 2 +- .../classes/fflib_SObjectSelector.cls-meta.xml | 2 +- .../fflib_SObjectUnitOfWork.cls-meta.xml | 2 +- .../main/classes/fflib_SObjects.cls-meta.xml | 2 +- .../classes/fflib_SecurityUtils.cls-meta.xml | 2 +- .../classes/fflib_StringBuilder.cls-meta.xml | 2 +- .../classes/fflib_ApplicationTest.cls-meta.xml | 2 +- .../classes/fflib_ObjectsTest.cls-meta.xml | 2 +- .../fflib_QueryFactoryTest.cls-meta.xml | 2 +- .../fflib_SObjectDescribeTest.cls-meta.xml | 2 +- .../fflib_SObjectDomainTest.cls-meta.xml | 2 +- .../fflib_SObjectSelectorTest.cls-meta.xml | 2 +- .../fflib_SObjectUnitOfWorkTest.cls-meta.xml | 2 +- .../classes/fflib_SObjectsTest.cls-meta.xml | 2 +- .../fflib_SecurityUtilsTest.cls-meta.xml | 2 +- .../fflib_StringBuilderTest.cls-meta.xml | 2 +- .../mocks/fflib_SObjectMocks.cls-meta.xml | 2 +- 33 files changed, 41 insertions(+), 41 deletions(-) diff --git a/sfdx-project.json b/sfdx-project.json index bd76b25865..bb1d365719 100644 --- a/sfdx-project.json +++ b/sfdx-project.json @@ -1,11 +1,11 @@ { - "packageDirectories": [ - { - "path": "sfdx-source/apex-common", - "default": true - } - ], - "namespace": "", - "sfdcLoginUrl": "https://login.salesforce.com", - "sourceApiVersion": "58.0" + "packageDirectories": [ + { + "path": "sfdx-source/apex-common", + "default": true + } + ], + "namespace": "", + "sfdcLoginUrl": "https://login.salesforce.com", + "sourceApiVersion": "59.0" } \ No newline at end of file diff --git a/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IDomain.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IDomain.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IDomain.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IDomain.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IDomainConstructor.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IDomainConstructor.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IDomainConstructor.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IDomainConstructor.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IObjects.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IObjects.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IObjects.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IObjects.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISObjects.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISObjects.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISObjects.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISObjects.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISelectorFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISelectorFactory.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISelectorFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISelectorFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjects.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjects.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjects.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjects.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml index 6fb1721ed2..d12609be92 100644 --- a/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml @@ -1,4 +1,4 @@ - 58.0 + 59.0 diff --git a/sfdx-source/apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active diff --git a/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml b/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml index 7a51829787..b1a915c9c6 100644 --- a/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml @@ -1,5 +1,5 @@ - 58.0 + 59.0 Active From 43c3d4dacb74c73a379418a2c9aaee30b10143b1 Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Mon, 18 Dec 2023 20:31:24 -0500 Subject: [PATCH 07/11] switched to `apex-enterprise-patterns/setup-sfdx@v2` --- .github/workflows/deploy.and.test.yml | 32 ++++++++++++++++----------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.and.test.yml b/.github/workflows/deploy.and.test.yml index 9372c5f5a2..b747c8e811 100644 --- a/.github/workflows/deploy.and.test.yml +++ b/.github/workflows/deploy.and.test.yml @@ -16,20 +16,26 @@ jobs: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} - name: Install SFDX CLI and authorize DevHub - uses: apex-enterprise-patterns/setup-sfdx@v1 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety + uses: apex-enterprise-patterns/setup-sfdx@v2 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety with: sfdx-auth-url: ${{ secrets.DEVHUB_SFDXURL }} - - run: sfdx force:config:set defaultdevhubusername=SFDX-ENV -g #Even though the setup-sfdx action uses --setdefaultdevhubusername, it doesn't seem to stick since it uses --setdefaultusername so we brute force it here - - run: echo y | sfdx plugins:install shane-sfdx-plugins - - run: sfdx force:org:create -f config/project-scratch-def.json --setdefaultusername -d 1 - - run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r fflib-apex-mocks -p sfdx-source/apex-mocks - - run: sfdx force:source:push - - run: sfdx force:apex:test:run -w 5 - #Intentionally install the Sample Code after the core AEP Commons test pass succeeds so that we don't deploy anything in Sample Code - #that could mask a test failure. A much more involved solution would've been to do a workflow_dispatch to the samplecode project. - - run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r fflib-apex-common-samplecode -p sfdx-source/apex-common-samplecode - - run: sfdx force:apex:test:run -w 5 + # Install the required plugins + - run: echo y | sf plugins install shane-sfdx-plugins + # Setup the config parameters needed + - run: sf config set target-dev-hub SFDX-ENV --global #Even though the setup-sfdx action uses --setdefaultdevhubusername, it doesn't seem to stick since it uses --setdefaultusername so we brute force it here + # Create the scratch org + - run: sf org create scratch --definition-file config/project-scratch-def.json --set-default --duration-days 1 --no-track-source + # Install required dependency frameworks + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-mocks --path sfdx-source/apex-mocks + # Deploy/compile the codebase + - run: sf project deploy start + # Run the core framework tests + - run: sf apex run test --wait 5 + # Intentionally install the Sample Code after the core AEP Commons test pass succeeds so that we don't deploy anything in Sample Code + # that could mask a test failure. A much more involved solution would've been to do a workflow_dispatch to the samplecode project. + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-common-samplecode --path sfdx-source/apex-common-samplecode + # Run the core framework tests and the sample code project tests + - run: sf apex run test --wait 5 - name: Destroy scratch org - run: sfdx force:org:delete -p + run: sf org delete scratch --no-prompt if: always() - From 3f1d3c56e25c1fddf1d4ec89db0fdb0e41c1e1cd Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Mon, 18 Dec 2023 23:17:37 -0500 Subject: [PATCH 08/11] small name fix --- .github/workflows/deploy.and.test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.and.test.yml b/.github/workflows/deploy.and.test.yml index b747c8e811..d21d5da430 100644 --- a/.github/workflows/deploy.and.test.yml +++ b/.github/workflows/deploy.and.test.yml @@ -15,7 +15,7 @@ jobs: with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} - - name: Install SFDX CLI and authorize DevHub + - name: Install SF CLI and authorize DevHub uses: apex-enterprise-patterns/setup-sfdx@v2 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety with: sfdx-auth-url: ${{ secrets.DEVHUB_SFDXURL }} From cda8c1083ef31ba42da3f811487763e6c85e410b Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Tue, 19 Dec 2023 16:04:27 -0500 Subject: [PATCH 09/11] adjustments based on feedback --- .github/workflows/deploy.and.test.yml | 31 ++++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy.and.test.yml b/.github/workflows/deploy.and.test.yml index d21d5da430..ca7ee3c260 100644 --- a/.github/workflows/deploy.and.test.yml +++ b/.github/workflows/deploy.and.test.yml @@ -19,23 +19,24 @@ jobs: uses: apex-enterprise-patterns/setup-sfdx@v2 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety with: sfdx-auth-url: ${{ secrets.DEVHUB_SFDXURL }} - # Install the required plugins - - run: echo y | sf plugins install shane-sfdx-plugins - # Setup the config parameters needed - - run: sf config set target-dev-hub SFDX-ENV --global #Even though the setup-sfdx action uses --setdefaultdevhubusername, it doesn't seem to stick since it uses --setdefaultusername so we brute force it here - # Create the scratch org - - run: sf org create scratch --definition-file config/project-scratch-def.json --set-default --duration-days 1 --no-track-source - # Install required dependency frameworks - - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-mocks --path sfdx-source/apex-mocks - # Deploy/compile the codebase - - run: sf project deploy start - # Run the core framework tests - - run: sf apex run test --wait 5 + - name: Install the required plugins + run: echo y | sf plugins install shane-sfdx-plugins + - name: Setup the config parameters needed + run: sf config set target-dev-hub SFDX-ENV --global #Even though the setup-sfdx action uses --setdefaultdevhubusername, it doesn't seem to stick since it uses --setdefaultusername so we brute force it here + - name: Create the scratch org + run: sf org create scratch --definition-file config/project-scratch-def.json --set-default --duration-days 1 --no-track-source + - name: Install required dependency frameworks + run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-mocks --path sfdx-source/apex-mocks + - name: Deploy and compile the codebase + run: sf project deploy start + - name: Run the core framework tests + run: sf apex run test --wait 5 # Intentionally install the Sample Code after the core AEP Commons test pass succeeds so that we don't deploy anything in Sample Code # that could mask a test failure. A much more involved solution would've been to do a workflow_dispatch to the samplecode project. - - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-common-samplecode --path sfdx-source/apex-common-samplecode - # Run the core framework tests and the sample code project tests - - run: sf apex run test --wait 5 + - name: Install sample code project to verify with + run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-common-samplecode --path sfdx-source/apex-common-samplecode + - name: Run the core framework tests and the sample code project tests + run: sf apex run test --wait 5 - name: Destroy scratch org run: sf org delete scratch --no-prompt if: always() From 06870ec324b2deb0517d648dc48d524aa5f67414 Mon Sep 17 00:00:00 2001 From: ImJohnMDaniel Date: Mon, 12 Feb 2024 03:00:01 +0000 Subject: [PATCH 10/11] chore: bump api to v60.0 --- sfdx-project.json | 2 +- .../apex-common/main/classes/fflib_Application.cls-meta.xml | 2 +- sfdx-source/apex-common/main/classes/fflib_IDomain.cls-meta.xml | 2 +- .../main/classes/fflib_IDomainConstructor.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_IObjects.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml | 2 +- .../main/classes/fflib_ISObjectSelector.cls-meta.xml | 2 +- .../main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_ISObjects.cls-meta.xml | 2 +- .../main/classes/fflib_ISelectorFactory.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml | 2 +- .../main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml | 2 +- sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_QueryFactory.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml | 2 +- .../main/classes/fflib_SObjectUnitOfWork.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_SObjects.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml | 2 +- .../apex-common/main/classes/fflib_StringBuilder.cls-meta.xml | 2 +- .../apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml | 2 +- .../apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml | 2 +- .../test/classes/fflib_QueryFactoryTest.cls-meta.xml | 2 +- .../test/classes/fflib_SObjectDescribeTest.cls-meta.xml | 2 +- .../test/classes/fflib_SObjectDomainTest.cls-meta.xml | 2 +- .../test/classes/fflib_SObjectSelectorTest.cls-meta.xml | 2 +- .../test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml | 2 +- .../apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml | 2 +- .../test/classes/fflib_SecurityUtilsTest.cls-meta.xml | 2 +- .../test/classes/fflib_StringBuilderTest.cls-meta.xml | 2 +- .../test/classes/mocks/fflib_SObjectMocks.cls-meta.xml | 2 +- 33 files changed, 33 insertions(+), 33 deletions(-) diff --git a/sfdx-project.json b/sfdx-project.json index bb1d365719..88ba4540e1 100644 --- a/sfdx-project.json +++ b/sfdx-project.json @@ -7,5 +7,5 @@ ], "namespace": "", "sfdcLoginUrl": "https://login.salesforce.com", - "sourceApiVersion": "59.0" + "sourceApiVersion": "60.0" } \ No newline at end of file diff --git a/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_Application.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IDomain.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IDomain.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IDomain.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IDomain.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IDomainConstructor.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IDomainConstructor.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IDomainConstructor.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IDomainConstructor.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IDomainFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IObjects.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IObjects.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IObjects.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IObjects.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISObjectDomain.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISObjectSelector.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISObjectUnitOfWork.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISObjects.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISObjects.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISObjects.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISObjects.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_ISelectorFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_ISelectorFactory.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_ISelectorFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_ISelectorFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IServiceFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_IUnitOfWorkFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_Objects.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectDescribe.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectSelector.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjectUnitOfWork.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjects.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SObjects.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjects.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SObjects.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_SecurityUtils.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml b/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml +++ b/sfdx-source/apex-common/main/classes/fflib_StringBuilder.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml index d12609be92..c7804fa6d3 100644 --- a/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls-meta.xml @@ -1,4 +1,4 @@ - 59.0 + 60.0 diff --git a/sfdx-source/apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_ObjectsTest.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectDomainTest.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectUnitOfWorkTest.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectsTest.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml b/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/fflib_StringBuilderTest.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active diff --git a/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml b/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml index b1a915c9c6..f5e18fd16c 100644 --- a/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml +++ b/sfdx-source/apex-common/test/classes/mocks/fflib_SObjectMocks.cls-meta.xml @@ -1,5 +1,5 @@ - 59.0 + 60.0 Active From 01d3a16a4076fb939c46e87aba3797043ceff52b Mon Sep 17 00:00:00 2001 From: David Esposito Date: Thu, 22 Feb 2024 15:53:04 -0500 Subject: [PATCH 11/11] Fixes #440 - changes the few tests that are exercising CRUD/FLS enforcement to prefer the 'Minimum Access - Salesforce' profile since that is a more reliable Profile in most modern orgs --- .../classes/fflib_SObjectSelectorTest.cls | 12 ++++----- .../test/classes/fflib_SecurityUtilsTest.cls | 26 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls b/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls index 190393b31d..c89b19e7fb 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls +++ b/sfdx-source/apex-common/test/classes/fflib_SObjectSelectorTest.cls @@ -378,7 +378,7 @@ private with sharing class fflib_SObjectSelectorTest static void toSOQL_When_UserModeAndUserCannnotReadObject_Expect_QueryException(){ AccessLevelOpportunitySelector sel = new AccessLevelOpportunitySelector(); - User u = getLimitedReadOnlyUser(); + User u = getMinimumAccessUser(); System.runAs(u){ try{ System.debug(sel.newQueryFactory().toSOQL()); @@ -399,7 +399,7 @@ private with sharing class fflib_SObjectSelectorTest static void toSOQL_When_SystemModeAndUserCannnotReadObject_Expect_Success(){ AccessLevelOpportunitySelector sel = new AccessLevelOpportunitySelector(fflib_SObjectSelector.DataAccess.SYSTEM_MODE); - User u = getLimitedReadOnlyUser(); + User u = getMinimumAccessUser(); System.runAs(u){ sel.selectSObjectsById(new Set{fflib_IDGenerator.generate(Opportunity.SObjectType)}); } @@ -410,7 +410,7 @@ private with sharing class fflib_SObjectSelectorTest AccessLevelAccountSelector sel = new AccessLevelAccountSelector(); //Account has Read access by the limited read only user but no FLS access - User u = getLimitedReadOnlyUser(); + User u = getMinimumAccessUser(); System.runAs(u){ try{ System.debug(sel.newQueryFactory().toSOQL()); @@ -433,7 +433,7 @@ private with sharing class fflib_SObjectSelectorTest AccessLevelAccountSelector sel = new AccessLevelAccountSelector(fflib_SObjectSelector.DataAccess.SYSTEM_MODE); //Account has Read access by the limited read only user but no FLS access - User u = getLimitedReadOnlyUser(); + User u = getMinimumAccessUser(); System.runAs(u){ sel.selectSObjectsById(new Set{fflib_IDGenerator.generate(Account.SObjectType)}); } @@ -651,8 +651,8 @@ private with sharing class fflib_SObjectSelectorTest return testUser; } - private static User getLimitedReadOnlyUser(){ - return fflib_SecurityUtilsTest.setupTestUser('Read Only'); + private static User getMinimumAccessUser(){ + return fflib_SecurityUtilsTest.setupTestUser(true); } @IsTest diff --git a/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls b/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls index 3e7e4c93a1..5b30aab02e 100644 --- a/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls +++ b/sfdx-source/apex-common/test/classes/fflib_SecurityUtilsTest.cls @@ -79,22 +79,20 @@ private class fflib_SecurityUtilsTest { } @TestVisible - static User setupTestUser(String profileName){ + static User setupTestUser(Boolean limitedAccess){ Profile p; - Boolean applyReadOnlyPermissionSet = false; - if (profileName == 'Read Only') { - applyReadOnlyPermissionSet = true; + + if (limitedAccess) { try { - p = getProfile(profileName); + p = getProfile('Minimum Access - Salesforce'); } catch (QueryException ex) { if (ex.getMessage().contains('List has no rows for assignment to SObject')) { - // #315 If the "Read Only" Profile is absent, then assume it's a Spring '21 org and see if there's a - // "Minimum Access - Salesforce" Profile we can use instead. - p = getProfile('Minimum Access - Salesforce'); + //#440 - not ideal, but we'll fall back to the rather liberally permissioned 'Read Only' profile that exists in very old orgs + p = getProfile('Read Only'); } } } else { - p = getProfile(profileName); + p = getProfile('System Administrator'); } //username global uniqueness is still enforced in tests @@ -118,7 +116,7 @@ private class fflib_SecurityUtilsTest { ); insert usr; - if (applyReadOnlyPermissionSet) { + if (limitedAccess) { // #315 We need to assign the Perm Set to grant Account "Read" access PermissionSet accountReadPS = [SELECT Id FROM PermissionSet WHERE Name = 'ReadOnlyPermissionSet']; PermissionSetAssignment psa = new PermissionSetAssignment(AssigneeId = usr.Id, PermissionSetId = accountReadPS.Id); @@ -129,7 +127,7 @@ private class fflib_SecurityUtilsTest { @isTest static void readonly_field_access() { - User testUser = setupTestUser('Read Only'); + User testUser = setupTestUser(true); System.runAs(testUser){ { fflib_SecurityUtils.SecurityException ex; @@ -172,7 +170,7 @@ private class fflib_SecurityUtilsTest { @isTest static void readonly_object_access() { - User testUser = setupTestUser('Read Only'); + User testUser = setupTestUser(true); System.runAs(testUser){ { fflib_SecurityUtils.SecurityException ex; @@ -226,7 +224,7 @@ private class fflib_SecurityUtilsTest { @isTest static void readonly_objectAndField_access() { - User testUser = setupTestUser('Read Only'); + User testUser = setupTestUser(true); System.runAs(testUser){ { fflib_SecurityUtils.SecurityException ex; @@ -311,7 +309,7 @@ private class fflib_SecurityUtilsTest { @isTest static void sysadmin_objectAndField_access() { - User testUser = setupTestUser('System Administrator'); + User testUser = setupTestUser(false); System.runAs(testUser){ fflib_SecurityUtils.checkInsert( Account.SObjectType,