---
id: change/bcquality/144
type: change
title: "#144 Avoid Public Event publisher"
summary: A new community knowledge article with samples advises declaring event publishers local or internal instead of public, because the access modifier controls who may raise an event, not who may subscribe. Sample files of four existing Microsoft-layer articles drop their incidental public modifier.
tier: official
language: en
tags:
  - feature
  - main
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:06:32.163Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 82422f94c9f4307ef2b8d5f1d66ba70c4115ae52
evidence:
  - kind: code
    url: https://github.com/microsoft/BCQuality/pull/144
    title: "microsoft/BCQuality#144: Avoid Public Event publisher"
    date: "2026-09-02"
    commit: 82422f94c9f4307ef2b8d5f1d66ba70c4115ae52
    t: null
    quote: the access modifier governs who may *raise* the event, not who may subscribe
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 144
repo: microsoft/BCQuality
source_id: bcquality-prs
url: https://github.com/microsoft/BCQuality/pull/144
kind: pr
base_branch: main
major: null
merged_at: "2026-09-02T14:07:18Z"
author: pri-kise
author_type: User
community_contribution: false
labels: []
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 7
  additions: 148
  deletions: 4
  al: 7
apps: []
objects_touched: []
objects_unjoined:
  - path: community/knowledge/events/declare-event-publishers-local-or-internal.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/events/declare-event-publishers-local-or-internal.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/events/declare-event-publishers-local-or-internal.md
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/events/avoid-raising-events-inside-try-functions.bad.al
    status: modified
    reason: not-in-snapshot
  - path: microsoft/knowledge/events/avoid-raising-events-inside-try-functions.good.al
    status: modified
    reason: not-in-snapshot
  - path: microsoft/knowledge/security/commitbehavior-attribute-scopes-explicit-commits.bad.al
    status: modified
    reason: not-in-snapshot
  - path: microsoft/knowledge/security/commitbehavior-attribute-scopes-explicit-commits.good.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items: []
systems:
  - development
quote: the access modifier governs who may *raise* the event, not who may subscribe
joined_against:
  major: null
  commit: null
---

# #144 Avoid Public Event publisher

> A new community knowledge article with samples advises declaring event publishers local or internal instead of public, because the access modifier controls who may raise an event, not who may subscribe. Sample files of four existing Microsoft-layer articles drop their incidental public modifier.

[Pull request](https://github.com/microsoft/BCQuality/pull/144) · merged into `main` on 2026-09-02 by pri-kise · 7 files (+148 -4), 7 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- Publisher access modifiers govern who may raise the event, not who may subscribe
- A public publisher becomes a caller contract that cannot be narrowed after release
- Use local when only the declaring object raises it, internal behind a public facade
- New community article with good and bad samples
- Four publishers in existing Microsoft-layer sample files lose their incidental public modifier

## AL objects touched

- `community/knowledge/events/declare-event-publishers-local-or-internal.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/events/declare-event-publishers-local-or-internal.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/events/declare-event-publishers-local-or-internal.md`: added, not in the BC? snapshot yet
- `microsoft/knowledge/events/avoid-raising-events-inside-try-functions.bad.al`: modified, not in the BC? snapshot
- `microsoft/knowledge/events/avoid-raising-events-inside-try-functions.good.al`: modified, not in the BC? snapshot
- `microsoft/knowledge/security/commitbehavior-attribute-scopes-explicit-commits.bad.al`: modified, not in the BC? snapshot
- `microsoft/knowledge/security/commitbehavior-attribute-scopes-explicit-commits.good.al`: modified, not in the BC? snapshot

## Context

- Systems: development
- From the description: "the access modifier governs who may *raise* the event, not who may subscribe"

Source: metadata of a merged pull request in microsoft/BCQuality (bcquality): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
