Reenabled package validation and fixed breaking change in test

This commit is contained in:
Bjarke Berg
2023-12-20 13:36:01 +01:00
parent 28fc85a96c
commit 0b811d6648
2 changed files with 52 additions and 9 deletions

View File

@@ -29,7 +29,7 @@
<!-- Package Validation -->
<PropertyGroup>
<GenerateCompatibilitySuppressionFile>false</GenerateCompatibilitySuppressionFile>
<EnablePackageValidation>false</EnablePackageValidation>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>13.0.0</PackageValidationBaselineVersion>
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>

View File

@@ -58,13 +58,36 @@ public class IndexInitializer
_contentTypeService = contentTypeService;
}
[Obsolete("Use ctor that is not obsolete. This will be removed in Umbraco 15.")]
public IndexInitializer(
IShortStringHelper shortStringHelper,
PropertyEditorCollection propertyEditors,
MediaUrlGeneratorCollection mediaUrlGenerators,
IScopeProvider scopeProvider,
ILoggerFactory loggerFactory,
IOptions<ContentSettings> contentSettings, IContentTypeService contentTypeService)
IOptions<ContentSettings> contentSettings,
ILocalizationService localizationService)
: this(
shortStringHelper,
propertyEditors,
mediaUrlGenerators,
scopeProvider,
loggerFactory,
contentSettings,
localizationService, StaticServiceProvider.Instance.GetRequiredService<IContentTypeService>())
{
}
[Obsolete("Use ctor that is not obsolete. This will be removed in Umbraco 15.")]
public IndexInitializer(
IShortStringHelper shortStringHelper,
PropertyEditorCollection propertyEditors,
MediaUrlGeneratorCollection mediaUrlGenerators,
IScopeProvider scopeProvider,
ILoggerFactory loggerFactory,
IOptions<ContentSettings> contentSettings,
IContentTypeService contentTypeService)
: this(
shortStringHelper,
propertyEditors,
@@ -76,6 +99,26 @@ public class IndexInitializer
{
}
[Obsolete("Use ctor that is not obsolete. This will be removed in Umbraco 15.")]
public IndexInitializer(
IShortStringHelper shortStringHelper,
PropertyEditorCollection propertyEditors,
MediaUrlGeneratorCollection mediaUrlGenerators,
IScopeProvider scopeProvider,
ILoggerFactory loggerFactory,
IOptions<ContentSettings> contentSettings)
: this(
shortStringHelper,
propertyEditors,
mediaUrlGenerators,
scopeProvider,
loggerFactory,
contentSettings,
StaticServiceProvider.Instance.GetRequiredService<ILocalizationService>(),
StaticServiceProvider.Instance.GetRequiredService<IContentTypeService>())
{
}
public ContentValueSetBuilder GetContentValueSetBuilder(bool publishedValuesOnly)
{
var contentValueSetBuilder = new ContentValueSetBuilder(