Export Siren's full typed taxonomy; wire PHPStan (stack-elevator) lint#3
Merged
Conversation
Siren owns its domain vocabulary (global-taxonomy-and-sdk-doctrine); this SDK is the typed carrier of it so integrations never hand-roll magic strings. - Add EventSlug (built-in ingestion slugs) and status constant classes: ConversionStatus, TransactionStatus, ObligationStatus, PayoutStatus, FulfillmentStatus, OpportunityStatus, ApiKeyStatus, WebhookSubscriptionStatus. - WebhookEventType: add CREDIT_ISSUED, CREDIT_REDEEMED, CURRENCY_CREATED, CURRENCY_DELETED — dispatched by the service but missing from the SDK and openapi.yaml. - Pin the canonical vocabularies in tests/TaxonomyTest.php (mirrors the service's dispatchers and REST validations). - Wire phpstan (level 6) + phpnomad/phpstan-rules ^2.1 stack-elevator.neon as 'composer lint', declared in navigator.yaml ci.lint and enforced by a CI lint job; fix the 5 phpdoc-type findings it surfaced. Charter 761 (SDKs speak the taxonomy). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138jQKyzwyDfEbbAeMmYNnL
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138jQKyzwyDfEbbAeMmYNnL
phpnomad/phpstan-rules ^2.1 requires PHP ^8.2 but is dev-only static analysis, never loaded at test runtime. The library still supports and tests PHP 8.1; lint runs on 8.3 with full platform checks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138jQKyzwyDfEbbAeMmYNnL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Charter 761 (SDKs speak the taxonomy) — the SDK becomes the typed carrier of Siren's domain vocabulary so integrations reach for SDK constants instead of magic strings (doctrine:
global-taxonomy-and-sdk-doctrine).Typed taxonomy
Siren\Sdk(same final-class pattern asWebhookEventType):EventSlug(built-in ingestion slugssale/refund/site-visited),ConversionStatus,TransactionStatus,ObligationStatus,PayoutStatus,FulfillmentStatus,OpportunityStatus,ApiKeyStatus,WebhookSubscriptionStatus.WebhookEventType: 4 missing events added —CREDIT_ISSUED,CREDIT_REDEEMED,CURRENCY_CREATED,CURRENCY_DELETED. The Siren service registers dispatchers for all four but the SDK andopenapi.yamlnever listed them. Both updated.tests/TaxonomyTest.phppins every vocabulary to the canonical set mined from the service (webhook dispatchers + RESTIsAnyvalidations). Stale 28-count assertion inWebhooksTestupdated to 32.Linter wiring (repo-agent-readiness-standard)
phpnomad/phpstan-rules ^2.1+phpstan/phpstan ^2.1as dev deps;phpstan.neon.distincludesstack-elevator.neon(level 6,src/). The SDK is a flat library so the layer rules have nothing to flag today — wired so any future layered namespace is checked from day one.composer lintscript, declared asci.lintinnavigator.yaml, enforced by a new CI lint job (PHP 8.3).Source of truth
Vocabularies mined from
Novatorius/siren(the taxonomy owner). Noted upstream inconsistency (encoded as-is, flagged for founder): obligation machine paths writecompletewhile the management REST surface acceptsfulfilled— both included inObligationStatus.Verification
composer test: 86 tests, 281 assertions green (was 75; +11 taxonomy pins)composer lint: PHPStan level 6 + stack-elevator, no errorscomposer validate --strictclean🤖 Generated with Claude Code
https://claude.ai/code/session_0138jQKyzwyDfEbbAeMmYNnL