Skip to content

fix: xen deactivation fatals on a use-before-assign - #2

Merged
detain merged 1 commit into
masterfrom
fix/deactivate-use-before-assign
Aug 14, 2026
Merged

fix: xen deactivation fatals on a use-before-assign#2
detain merged 1 commit into
masterfrom
fix/deactivate-use-before-assign

Conversation

@detain

@detain detain commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

getDeactivate() read $serviceClass one line before assigning it:

myadmin_log(..., $serviceClass->getId(), ..., $serviceClass->getCustid());
$serviceClass = $event->getSubject();   // ← after use

On PHP 8 that is a fatal Error, so deactivating XEN_LINUX / XEN_WINDOWS has not been working. One-line reorder.

Found by the shared contract harness (assertion S-1), which executes the handler. This repo's pre-existing reflection assertions passed throughout — the method existed, was public, was static, took one argument, and fataled the moment it ran.

Suite green: 81 tests, 13 skipped, 0 failures.

🤖 Generated with Claude Code

$serviceClass was read one line before it was assigned, so on PHP 8 every
deactivation of XEN_LINUX / XEN_WINDOWS raised a fatal Error before reaching the
history write. Deactivation cannot have been working.

Found by the shared contract harness (S-1), which executes the handler rather
than reflecting over it -- the reflection-only assertions this repo had before
passed the whole time, because the method existed, was public, was static and
took one argument.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@detain
detain merged commit 8bb90ea into master Aug 14, 2026
4 checks passed
@detain
detain deleted the fix/deactivate-use-before-assign branch August 14, 2026 01:47
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