Skip to content

Code Tidy: Remove unused obsoleted InstalledPackage mapping#22713

Merged
AndyButland merged 2 commits into
v18/devfrom
v18/task/remove-obsolete-package-map-definition
May 5, 2026
Merged

Code Tidy: Remove unused obsoleted InstalledPackage mapping#22713
AndyButland merged 2 commits into
v18/devfrom
v18/task/remove-obsolete-package-map-definition

Conversation

@Migaroez

@Migaroez Migaroez commented May 5, 2026

Copy link
Copy Markdown
Contributor

Description

Removed the obsoleted InstalledPackage → PackageMigrationStatusResponseModel mapper registration and Map method from PackageViewModelMapDefinition. The current code already uses its replacement IPackagePresentationFactory.CreatePackageMigrationStatusResponseModel(PagedModel<InstalledPackage> installedPackages)

@claude

claude Bot commented May 5, 2026

Copy link
Copy Markdown

Claude finished @Migaroez's task in 1m 48s —— View job


PR Review

Target: origin/v18/dev · Based on commit: a3b100b · Classified as: Refactor

Removes the obsoleted InstalledPackage → PackageMigrationStatusResponseModel mapper registration and its private Map method, both of which were marked [Obsolete("Scheduled for removal in Umbraco 18.")] and have been superseded by IPackagePresentationFactory.CreatePackageMigrationStatusResponseModel.

  • Breaking changes: None — the removed Map method was private static (not public API), and the mapper registration is an internal implementation detail. Removal is on schedule (obsoleted for v18).

Suggestions

  • src/Umbraco.Cms.Api.Management/Mapping/Package/PackageViewModelMapDefinition.cs:16: The DefineMaps XML doc still references <see cref="InstalledPackage"/> and <see cref="PackageMigrationStatusResponseModel"/> even though those mappings no longer exist in this method. The description is now stale. Consider trimming it to only mention the two mappings that remain (PackageModelBase → PackageDefinition and PackageDefinition → PackageDefinitionResponseModel). Fix this →

Approved with Suggestions for improvement

Good to go — clean removal of a properly scheduled obsoleted mapping. The only thing worth addressing is the stale XML doc comment.

@Migaroez Migaroez changed the title Remove unused obseleted InstalledPackage mapping Remove unused obsoleted InstalledPackage mapping May 5, 2026
@claude claude Bot added the area/backend label May 5, 2026

@AndyButland AndyButland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I just updated the XML docs on the class to better reflect what the methods now do (there were also some other out-dated references to mapped classes).

@AndyButland AndyButland changed the title Remove unused obsoleted InstalledPackage mapping Code Tidy: Remove unused obsoleted InstalledPackage mapping May 5, 2026
@AndyButland AndyButland enabled auto-merge (squash) May 5, 2026 10:49
@AndyButland AndyButland merged commit f158e66 into v18/dev May 5, 2026
28 checks passed
@AndyButland AndyButland deleted the v18/task/remove-obsolete-package-map-definition branch May 5, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants