-
Notifications
You must be signed in to change notification settings - Fork 11
HP-2676: Fix issues caused by HP-2581 release: tariff view error, failing CI jobs, and SinglePrice type error #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,11 @@ | |
|
|
||
| namespace hiqdev\php\billing\product\behavior; | ||
|
|
||
| use hidev\exception\HasContext; | ||
| use hidev\exception\HasContextInterface; | ||
| use hiqdev\php\billing\Exception\RuntimeException; | ||
|
|
||
| class BehaviorNotFoundException extends RuntimeException | ||
| class BehaviorNotFoundException extends RuntimeException implements HasContextInterface | ||
| { | ||
| use HasContext; | ||
|
Comment on lines
+9
to
+11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerification: ensure the trait/interface and factory usage are wired in the repo.
Run: 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "1) Check hidev/exception dependency"
python - <<'PY'
import json,sys,os
p='composer.json'
if not os.path.exists(p):
print('composer.json not found'); sys.exit(0)
d=json.load(open(p))
req = {k.lower():v for k,v in d.get('require',{}).items()}
dev = {k.lower():v for k,v in d.get('require-dev',{}).items()}
for sect,name in ((req,'require'), (dev,'require-dev')):
if 'hidev/exception' in sect:
print(f'Found hidev/exception in {name}:', sect['hidev/exception']); break
else:
print('MISSING hidev/exception in require/require-dev')
PY
echo -e "\n2) Call sites using ::make(...)"
rg -nP --no-heading -C1 '\b(InvalidRepresentationException|TariffTypeDefinitionNotFoundException|PriceTypeDefinitionNotFoundException|InvalidBehaviorException|BehaviorNotFoundException)::make\s*\(' || true
echo -e "\n3) Direct instantiations (review and convert to factories if desired)"
rg -nP --no-heading -C1 '\bnew\s+(InvalidRepresentationException|TariffTypeDefinitionNotFoundException|PriceTypeDefinitionNotFoundException|InvalidBehaviorException|BehaviorNotFoundException)\s*\(' || trueLength of output: 3454 Add The • composer.json 🤖 Prompt for AI Agents |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong exception type for representation contract violation.
Should use InvalidRepresentationException, not InvalidBehaviorException.
Apply this diff:
Optional hardening (outside selected lines): validate interfaces too, not only classes:
🤖 Prompt for AI Agents