feat(di)!: remove 11 throwing DI-builder stub methods#156
Merged
AbongileBoja merged 1 commit intodevelopfrom Apr 27, 2026
Merged
feat(di)!: remove 11 throwing DI-builder stub methods#156AbongileBoja merged 1 commit intodevelopfrom
AbongileBoja merged 1 commit intodevelopfrom
Conversation
BREAKING CHANGES — Phase 3b of v4 release. Closes the 3.x deprecation shipped in #77. Every removed method shipped on the public surface only to throw NotImplementedException; all 11 carried [Obsolete(error: true)] for the 3.x line. ApiCompat reports CP0001 on each. Removed: - AuditingBuilder.LogAllQueries / TrackChanges / EnableEncryption / UseDatabase(string) / RetentionDays(int) - CachingBuilder.EnableCompressionForLarge(int) - MonitoringBuilder.EnableOpenTelemetry / EnableHealthChecks - PerformanceBuilder.EnableQueryCaching / OptimizeExpressions - SecurityBuilder.RotateKeysEvery(int) - AuditingBuilder class-level <remarks> block telegraphing the removal - 7 throw-asserting tests (6 in IndividualBuildersTests, 1 in QuerySpecBuilderTests) plus the now-orphaned AssertReflectiveThrows helper. Per-method migration guidance documented in CHANGELOG. Tests: 720 unique (was 727; 7 removed as planned) green across net8.0/9.0/10.0. Closes #139 Refs #77
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.
Summary
4.0 BREAKING — Phase 3b of v4 release. Closes the 3.x deprecation shipped in #77. Every removed method shipped on the public surface only to throw
NotImplementedException; all 11 carried[Obsolete(error: true)]for the 3.x line. ApiCompat reportsCP0001(member removed) on each.Removed
AuditingBuilderLogAllQueries()IAuditLoggerviaWithAuditing(a => a.UseLogger(myLogger))AuditingBuilderTrackChanges()IAuditLoggerAuditingBuilderEnableEncryption()IAuditLoggerusingIEncryptionProviderAuditingBuilderUseDatabase(string)IAuditLoggerAuditingBuilderRetentionDays(int)IAuditMaintenance.PurgeOldLogsAsyncon a scheduleCachingBuilderEnableCompressionForLarge(int)ICacheProviderwith a compressing decorator (e.g. ScrutorServices.Decorate)MonitoringBuilderEnableOpenTelemetry()Services.AddOpenTelemetry()directly on the builder'sServicespropertyMonitoringBuilderEnableHealthChecks()Services.AddHealthChecks()directly on the builder'sServicespropertyPerformanceBuilderEnableQueryCaching()WithCaching(c => c.UseMemoryCache())and compose your query pathPerformanceBuilderOptimizeExpressions()IQueryableprovidersSecurityBuilderRotateKeysEvery(int)Also removed:
AuditingBuilderclass-level<remarks>block telegraphing the removal (its purpose is served).Tests
7 throw-asserting tests removed as planned (6 in
IndividualBuildersTests, 1 inQuerySpecBuilderTests):CachingBuilder_EnableCompressionForLarge_Throws_NotImplementedPerformanceBuilder_EnableQueryCaching_Throws_NotImplementedPerformanceBuilder_OptimizeExpressions_Throws_NotImplementedSecurityBuilder_RotateKeysEvery_Throws_NotImplementedAuditingBuilder_AllStubs_Throw_NotImplementedMonitoringBuilder_AllStubs_Throw_NotImplementedWithMonitoring_StubsThrowAtConfigTimeNow-orphaned
AssertReflectiveThrowshelper deleted alongside.Local verification
dotnet build -c Release -p:QUERYSPEC_SKIP_SIGN=true— 0 errorsdotnet test -c Release— 720 unique tests green across net8.0/9.0/10.0 (was 727; 7 removed as planned)Phase context
Closes #139
Refs #77