From cc10bf26da28e1388a149a5c766be48f1868dc54 Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Sun, 26 Feb 2023 16:03:34 +0100 Subject: [PATCH] SqlServerDsc: Change type for property `Reasons` --- CHANGELOG.md | 6 ++++++ source/Classes/011.SqlResourceBase.ps1 | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 766f3258b5..75226da426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -146,6 +146,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 output a warning to install any of the dependent modules. - Add empty constructor to classes to be able to use Pester's new code coverage method. See more information can be found in [pester/Pester#2306](https://github.com/pester/Pester/issues/2306). + - The type of the property `Reasons` was changed in the class-based resources. + This resolves a problem when using two DSC resource modules that was + using the same class-type for the property `Reasons`. Resolves the issues + [issue #1831](https://github.com/dsccommunity/SqlServerDsc/issues/1831), + [issue #1832](https://github.com/dsccommunity/SqlServerDsc/issues/1832), + and [issue #1833](https://github.com/dsccommunity/SqlServerDsc/issues/1833). - `Install-SqlServerDsc` - No longer throws an exception when parameter `AgtSvcAccount` is not specified. - SqlAgReplica diff --git a/source/Classes/011.SqlResourceBase.ps1 b/source/Classes/011.SqlResourceBase.ps1 index 369757d466..695ce5e3dd 100644 --- a/source/Classes/011.SqlResourceBase.ps1 +++ b/source/Classes/011.SqlResourceBase.ps1 @@ -43,7 +43,7 @@ class SqlResourceBase : ResourceBase $Credential [DscProperty(NotConfigurable)] - [Reason[]] + [System.Collections.Hashtable[]] $Reasons # Passing the module's base directory to the base constructor.