AB3869 move packages to abstractions

This commit is contained in:
Bjarke Berg
2019-11-19 13:03:58 +01:00
parent 2c9a1d9735
commit 133c6b121a
3 changed files with 8 additions and 5 deletions

View File

@@ -70,7 +70,7 @@ namespace Umbraco.Core.Models.Packaging
/// The minimum umbraco version that this package requires
/// </summary>
[DataMember(Name = "umbracoVersion")]
public Version UmbracoVersion { get; set; } = Current.UmbracoVersion.Current;
public Version UmbracoVersion { get; set; }
[DataMember(Name = "author")]
[Required]

View File

@@ -58,6 +58,7 @@ namespace Umbraco.Core.Packaging
IDataTypeService dataTypeService, IFileService fileService, IMacroService macroService,
ILocalizationService languageService,
IIOHelper ioHelper,
IUmbracoVersion umbracoVersion,
IEntityXmlSerializer serializer, ILogger logger,
string packageRepositoryFileName,
string tempFolderPath = null, string packagesFolderPath = null, string mediaFolderPath = null)
@@ -78,7 +79,7 @@ namespace Umbraco.Core.Packaging
_packagesFolderPath = packagesFolderPath ?? Constants.SystemDirectories.Packages;
_mediaFolderPath = mediaFolderPath ?? Current.Configs.Global().UmbracoMediaPath + "/created-packages";
_parser = new PackageDefinitionXmlParser(logger);
_parser = new PackageDefinitionXmlParser(logger, umbracoVersion);
}
private string CreatedPackagesFile => _packagesFolderPath.EnsureEndsWith('/') + _packageRepositoryFileName;

View File

@@ -78,6 +78,7 @@ namespace Umbraco.Tests.TestHelpers
/// <param name="scopeAccessor"></param>
/// <param name="cache">A cache.</param>
/// <param name="logger">A logger.</param>
/// <param name="umbracoVersion">An Umbraco Version.</param>
/// <param name="ioHelper">An io helper.</param>
/// <param name="globalSettings"></param>
/// <param name="umbracoSettings"></param>
@@ -94,6 +95,7 @@ namespace Umbraco.Tests.TestHelpers
AppCaches cache,
ILogger logger,
IIOHelper ioHelper,
IUmbracoVersion umbracoVersion,
IGlobalSettings globalSettings,
IUmbracoSettingsSection umbracoSettings,
IEventMessagesFactory eventMessagesFactory,
@@ -172,12 +174,12 @@ namespace Umbraco.Tests.TestHelpers
var packagingService = GetLazyService<IPackagingService>(factory, c =>
{
var propertyEditorCollection = new PropertyEditorCollection(new DataEditorCollection(Enumerable.Empty<DataEditor>()));
var compiledPackageXmlParser = new CompiledPackageXmlParser(new ConflictingPackageData(macroService.Value, fileService.Value));
var compiledPackageXmlParser = new CompiledPackageXmlParser(new ConflictingPackageData(macroService.Value, fileService.Value), globalSettings);
return new PackagingService(
auditService.Value,
new PackagesRepository(contentService.Value, contentTypeService.Value, dataTypeService.Value, fileService.Value, macroService.Value, localizationService.Value, ioHelper,
new PackagesRepository(contentService.Value, contentTypeService.Value, dataTypeService.Value, fileService.Value, macroService.Value, localizationService.Value, ioHelper, umbracoVersion,
new EntityXmlSerializer(contentService.Value, mediaService.Value, dataTypeService.Value, userService.Value, localizationService.Value, contentTypeService.Value, urlSegmentProviders), logger, "createdPackages.config"),
new PackagesRepository(contentService.Value, contentTypeService.Value, dataTypeService.Value, fileService.Value, macroService.Value, localizationService.Value, ioHelper,
new PackagesRepository(contentService.Value, contentTypeService.Value, dataTypeService.Value, fileService.Value, macroService.Value, localizationService.Value, ioHelper, umbracoVersion,
new EntityXmlSerializer(contentService.Value, mediaService.Value, dataTypeService.Value, userService.Value, localizationService.Value, contentTypeService.Value, urlSegmentProviders), logger, "installedPackages.config"),
new PackageInstallation(
new PackageDataInstallation(logger, fileService.Value, macroService.Value, localizationService.Value, dataTypeService.Value, entityService.Value, contentTypeService.Value, contentService.Value, propertyEditorCollection, scopeProvider),