Skip to content

Event classes are now final, internals @internal and ShortcodeFacade @final - #136

Merged
thunderer merged 1 commit into
masterfrom
tk-internal-final
Nov 13, 2026
Merged

thunderer merged 1 commit into
masterfrom
tk-internal-final

Conversation

@thunderer

Copy link
Copy Markdown
Owner

Marks the classes that were never meant to be extended or used directly, as part of the 0.8 plan in #135. No known consumer extends the event classes or uses the internal ones.

  • FilterShortcodesEvent and ReplaceShortcodesEvent are now final,
  • ProcessorContext, RegexBuilderUtility and ProcessedShortcode::createFromContext() are marked @internal,
  • ShortcodeFacade is marked @final.

@github-actions

Copy link
Copy Markdown

Merging this PR will not alter performance

Benchmark ⚡ improved ❌ regressed ✅ untouched 🆕 new
ProcessorBench 0 0 8 0
ParserBench 0 0 20 0

A benchmark is changed when its efficiency (BASE / HEAD - 1) is at least 10% in either direction.

All benchmarks
+----------------+--------------+--------------------+------+-----+-----------------+------------------+------------------+
| benchmark      | subject      | set                | revs | its | mem_peak        | mode             | rstdev           |
+----------------+--------------+--------------------+------+-----+-----------------+------------------+------------------+
| ProcessorBench | benchProcess | regular article    | 1    | 5   | 3.884mb +0.00%  | 126.852ms -0.26% | ±0.43% -35.77%   |
| ProcessorBench | benchProcess | regular dense      | 1    | 5   | 16.017mb +0.00% | 175.201ms -2.71% | ±1.79% -72.47%   |
| ProcessorBench | benchProcess | regular nested     | 1    | 5   | 5.821mb +0.00%  | 149.212ms -2.49% | ±0.64% -43.24%   |
| ProcessorBench | benchProcess | regular deep       | 1    | 5   | 2.516mb +0.00%  | 197.825ms -0.07% | ±0.84% -68.07%   |
| ProcessorBench | benchProcess | hybrid article     | 1    | 5   | 2.125mb 0.00%   | 175.347ms -1.32% | ±0.62% +178.18%  |
| ProcessorBench | benchProcess | hybrid dense       | 1    | 5   | 4.206mb +0.00%  | 152.369ms -1.92% | ±1.29% -84.68%   |
| ProcessorBench | benchProcess | hybrid nested      | 1    | 5   | 2.542mb +0.00%  | 203.568ms -0.85% | ±1.09% +0.12%    |
| ProcessorBench | benchProcess | hybrid deep        | 1    | 5   | 2.315mb +0.00%  | 103.197ms -0.29% | ±0.33% -85.78%   |
| ParserBench    | benchParse   | regular article    | 1    | 5   | 4.540mb 0.00%   | 135.443ms -0.38% | ±0.36% -89.80%   |
| ParserBench    | benchParse   | regular dense      | 1    | 5   | 6.204mb 0.00%   | 127.684ms -0.99% | ±0.49% -68.23%   |
| ParserBench    | benchParse   | regular nested     | 1    | 5   | 7.011mb 0.00%   | 202.864ms -0.93% | ±0.96% +162.98%  |
| ParserBench    | benchParse   | regular deep       | 1    | 5   | 9.338mb 0.00%   | 128.730ms -0.40% | ±0.47% -89.20%   |
| ParserBench    | benchParse   | regular brackets   | 1    | 5   | 12.082mb 0.00%  | 122.989ms +1.84% | ±1.07% -3.64%    |
| ParserBench    | benchParse   | regex article      | 1    | 5   | 2.125mb 0.00%   | 195.844ms -0.44% | ±0.91% -0.93%    |
| ParserBench    | benchParse   | regex dense        | 1    | 5   | 2.294mb 0.00%   | 133.214ms -0.81% | ±0.33% -47.42%   |
| ParserBench    | benchParse   | regex nested       | 1    | 5   | 2.125mb 0.00%   | 132.820ms -0.14% | ±0.29% -34.00%   |
| ParserBench    | benchParse   | regex deep         | 1    | 5   | 2.125mb 0.00%   | 172.171ms +0.37% | ±0.51% +114.46%  |
| ParserBench    | benchParse   | regex brackets     | 1    | 5   | 3.005mb 0.00%   | 179.462ms +0.76% | ±0.38% -75.95%   |
| ParserBench    | benchParse   | hybrid article     | 1    | 5   | 2.125mb 0.00%   | 149.006ms -0.23% | ±5.23% +1110.92% |
| ParserBench    | benchParse   | hybrid dense       | 1    | 5   | 2.182mb 0.00%   | 100.596ms -0.48% | ±0.39% -16.01%   |
| ParserBench    | benchParse   | hybrid nested      | 1    | 5   | 2.395mb 0.00%   | 210.602ms +0.09% | ±0.75% +25.70%   |
| ParserBench    | benchParse   | hybrid deep        | 1    | 5   | 3.474mb 0.00%   | 200.380ms +0.38% | ±1.40% +6.72%    |
| ParserBench    | benchParse   | hybrid brackets    | 1    | 5   | 3.010mb 0.00%   | 193.871ms -0.13% | ±0.40% +86.49%   |
| ParserBench    | benchParse   | wordpress article  | 1    | 5   | 2.125mb 0.00%   | 104.789ms +0.06% | ±0.55% +30.47%   |
| ParserBench    | benchParse   | wordpress dense    | 1    | 5   | 2.125mb 0.00%   | 199.026ms -0.77% | ±0.43% +3.00%    |
| ParserBench    | benchParse   | wordpress nested   | 1    | 5   | 2.125mb 0.00%   | 112.975ms -0.54% | ±0.61% -85.59%   |
| ParserBench    | benchParse   | wordpress deep     | 1    | 5   | 2.125mb 0.00%   | 143.722ms -0.40% | ±3.41% +393.68%  |
| ParserBench    | benchParse   | wordpress brackets | 1    | 5   | 2.966mb 0.00%   | 108.402ms -0.16% | ±0.49% +125.09%  |
+----------------+--------------+--------------------+------+-----+-----------------+------------------+------------------+

Comparing tk-internal-final (6b0c187) with master (7a5a0c8)

@thunderer
thunderer merged commit 4623196 into master Nov 13, 2026
18 checks passed
@thunderer
thunderer deleted the tk-internal-final branch November 13, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant