feat: add Volo.Abp.LuckyPenny.AutoMapper package for commercial AutoMapper integration#25153
Merged
Merged
Conversation
…apper integration Closes #25137
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new ABP framework integration package (Volo.Abp.LuckyPenny.AutoMapper) that targets the commercially patched AutoMapper line, intended as an optional drop-in replacement for Volo.Abp.AutoMapper without changing ABP-facing namespaces/APIs.
Changes:
- Introduces
AbpLuckyPennyAutoMapperModuleand re-implements ABP’s AutoMapper integration on top of the newer AutoMapper package version (viaVersionOverride). - Adds a dedicated test project (
Volo.Abp.LuckyPenny.AutoMapper.Tests) mirroring existing AutoMapper integration behavior (including MultiLingualObjects scenarios). - Updates docs to point commercial-license holders to the new package, and wires the new projects into the solution + packaging scripts.
Reviewed changes
Copilot reviewed 50 out of 50 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| nupkg/common.ps1 | Includes the new LuckyPenny AutoMapper project in packaging/build project enumeration. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/TestObjects/MultiLingualBookTranslation.cs | Adds translation test object for MultiLingualObjects mapping tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/TestObjects/MultiLingualBookDto.cs | Adds DTO test object for MultiLingualObjects mapping tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/TestObjects/MultiLingualBook.cs | Adds entity test object for MultiLingualObjects mapping tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/MultiLingualObjectTestProfile.cs | Adds AutoMapper profile used by MultiLingualObjects mapping tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/MultiLingualObjectManager_Tests.cs | Adds MultiLingualObjectManager behavior + mapping tests targeting the LuckyPenny module. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/MultiLingualObjects/AbpLuckyPennyMultiLingualObjectsTestModule.cs | Test module wiring for MultiLingualObjects tests using AbpLuckyPennyAutoMapperModule. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyNotMappedDto.cs | Adds sample DTO used by AutoMapper integration tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyMapProfile.cs | Adds mapping profile used by AutoMapper integration tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEnumDto.cs | Adds sample enum DTO for mapping tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEnum.cs | Adds sample enum source for mapping tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntityToMyEntityDto2Mapper.cs | Adds custom IObjectMapper<> implementation for “specific mapper” test coverage. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntityDtoWithMappingMethods.cs | Adds DTO implementing IMapFrom/IMapTo used by mapping-method tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntityDto2.cs | Adds sample DTO for “specific mapper” tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntityDto.cs | Adds sample DTO for basic mapping tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntity.cs | Adds sample entity for mapping tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/ObjectMapperExtensions_Tests.cs | Tests IObjectMapper extension behavior when using LuckyPenny AutoMapper integration. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_Dependency_Injection_Tests.cs | Tests DI registration for mapping actions and disposal behavior. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_CustomServiceConstruction_Tests.cs | Tests ConstructServicesUsing-style customization with a replaced IMapper. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_ConfigurationValidation_Tests.cs | Tests profile validation configuration parity with the existing module behavior. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapperTestModule.cs | Test module wiring for LuckyPenny AutoMapper integration tests. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapperExpressionExtensions_Tests.cs | Tests ABP’s AutoMapper expression extension helpers against the LuckyPenny package. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Specific_ObjectMapper_Tests.cs | Validates that registered specific IObjectMapper<,> implementations take precedence. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_MaxDepth_Tests.cs | Confirms default/custom/disabled MaxDepth behavior (mitigation parity). |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs | Basic integration tests: provider replacement, internal mapper access, enum mapping. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo.Abp.LuckyPenny.AutoMapper.Tests.csproj | Adds new test project and references the LuckyPenny AutoMapper package + dependencies. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/Volo.Abp.LuckyPenny.AutoMapper.Tests.abppkg | Declares ABP package role metadata for the new test project. |
| framework/test/Volo.Abp.LuckyPenny.AutoMapper.Tests/AutoMapper/AbpAutoMapperExtensibleDtoExtensions_Tests.cs | Tests extensible-object extra property mapping extensions with the LuckyPenny integration. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/ObjectMapping/AbpAutoMapperObjectMapperExtensions.cs | Adds GetMapper() extension helpers for IObjectMapper/IAutoObjectMappingProvider. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/MapperAccessor.cs | Implements internal IMapperAccessor backing type. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/IMapperAccessor.cs | Exposes public IMapperAccessor interface used by ABP integration. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/IAbpAutoMapperConfigurationContext.cs | Exposes configuration context interface for ABP AutoMapper configurators. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AutoMapperExpressionExtensions.cs | Adds ABP AutoMapper mapping expression extensions (auditing-related ignores, etc.). |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AutoMapperAutoObjectMappingProvider.cs | Implements ABP IAutoObjectMappingProvider backed by AutoMapper IMapper. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AbpLuckyPennyAutoMapperModule.cs | New module that wires ABP object mapping to commercial AutoMapper (LuckyPenny) implementation. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperOptions.cs | Reintroduces ABP AutoMapper options surface (maps/profiles/validation/default MaxDepth). |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConventionalRegistrar.cs | Registers AutoMapper open-generic services (resolvers/converters/actions) conventionally. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConfigurationContext.cs | Implements configuration context passed to configurators. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.csproj | New framework package project; references ABP deps and overrides AutoMapper version. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.abppkg.analyze.json | ABP package analyzer metadata for the new module/package. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Volo.Abp.LuckyPenny.AutoMapper.abppkg | Declares ABP package role metadata for the new framework library. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Properties/AssemblyInfo.cs | Adds InternalsVisibleTo for the new LuckyPenny AutoMapper test assembly. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/Microsoft/Extensions/DependencyInjection/AbpAutoMapperServiceCollectionExtensions.cs | Adds DI extensions to replace ABP auto-mapping provider with AutoMapper-backed provider. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/FodyWeavers.xsd | Adds ConfigureAwait weaver schema file consistent with other ABP projects. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/FodyWeavers.xml | Enables ConfigureAwait weaving settings for the new project. |
| framework/src/Volo.Abp.LuckyPenny.AutoMapper/AutoMapper/AbpAutoMapperExtensibleObjectExtensions.cs | Adds AutoMapper extensions for mapping ABP extra properties (extensible objects). |
| framework/Volo.Abp.slnx | Adds the new framework project and new test project to the solution. |
| docs/en/release-info/migration-guides/AutoMapper-To-Mapperly.md | Links commercial-license holders to the new LuckyPenny integration as an alternative to migrating to Mapperly. |
| docs/en/framework/infrastructure/object-to-object-mapping.md | Documents the vulnerability context and points to LuckyPenny/Mapperly alternatives. |
| docs/en/framework/infrastructure/luckypenny-automapper.md | New documentation page: install/use/configure license key/log filtering + migration steps. |
Closed
1 task
EngincanV
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #25137
AutoMapper 14.x has a known DoS vulnerability (GHSA-rvv3-g6hj-g44x) with no patch planned for 14.x. The fix is only in the commercial 15.x+ releases by LuckyPenny Software.
This PR adds a new
Volo.Abp.LuckyPenny.AutoMapperpackage as an optional drop-in replacement for users who hold a commercial AutoMapper license:AbpLuckyPennyAutoMapperModule— swap it forAbpAutoMapperModulein[DependsOn], no other code changes neededAbpAutoMapperOptions,IMapperAccessor,AutoMapperExpressionExtensions, etc.)Volo.Abp.LuckyPenny.AutoMapper.Testsproject (31 tests, same parity as the original)Volo.Abp.AutoMapperpackage is unchanged