fix(BaseEntity): Use announce as official method for interception points #267
fix(BaseEntity): Use announce as official method for interception points #267
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the BaseEntity component to use the announce method as the official interception point mechanism when available, falling back to processState for backward compatibility. The changes also expand CI test coverage across multiple ColdBox versions.
- Adds detection and usage of the
announcemethod for interceptor service calls - Fixes method reference to use
this.tableName()instead of baretableName() - Expands CI matrix to test against both ColdBox 7 and 8 versions
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| models/BaseEntity.cfc | Implements announce method detection and usage for interceptor service, fixes tableName() method reference |
| .github/workflows/release.yml | Adds ColdBox version matrix to test against both v7 and v8 |
| .github/workflows/pr.yml | Adds ColdBox version matrix to test against both v7 and v8 |
| .github/workflows/cron.yml | Expands test matrix with additional ColdBox version combinations including bleeding edge builds |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| param variables.useAnnounceMethodForInterceptorService = structKeyExists( | ||
| variables._interceptorService, | ||
| "announce" | ||
| ); |
There was a problem hiding this comment.
The param statement is executed on every interception call, repeatedly checking for the existence of the announce method. This check should be performed once during initialization (e.g., in onDIComplete()) and cached for the lifetime of the entity to avoid unnecessary overhead on each interception.
No description provided.