Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demos/blog-publishing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"ray/di": "^2.18"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^12"
}
}
2 changes: 1 addition & 1 deletion demos/contact-form/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"ray/di": "^2.18"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^12"
}
}
14 changes: 13 additions & 1 deletion demos/hello-world/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
"ray/di": "^2.18"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^12"
},
"scripts": {
"dev": "php bin/be.php 'hello?name=World'",
"profile": "XDEBUG_MODE=trace php -d xdebug.use_compression=0 -d extension=xhprof.so bin/be.php 'hello?name=World'",
"stree": "vendor/bin/stree $(ls -t var/log/*.json | head -1)",
"stree:full": "vendor/bin/stree --full $(ls -t var/log/*.json | head -1)"
},
"scripts-descriptions": {
"dev": "Run the Hello World demo in dev mode; writes a semantic log to var/log/*.json without Xdebug/XHProf profiling.",
"profile": "Run the Hello World demo with semantic profiling; writes a semantic log to var/log/*.json with uncompressed Xdebug trace and xhprof enabled.",
"stree": "Render the latest var/log/*.json as a compact tree.",
"stree:full": "Render the latest var/log/*.json as a semantic full tree with full props and close.profile details."
}
}
8 changes: 8 additions & 0 deletions demos/hello-world/stree-full.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
becoming HelloInput
├── name: World
├── being_final Hello input=[name] inject=[greeting]
│ ├── inject.greeting: Be\Pattern\Hello\Reason\Greeting
│ └── close
│ └── greeting: Hello World
└── close
└── exit: success
4 changes: 4 additions & 0 deletions demos/hello-world/stree.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
becoming HelloInput
├── being_final Hello input=[name] inject=[greeting]
│ └── prop=[greeting]
└── exit=success
2 changes: 1 addition & 1 deletion demos/insurance-claim/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"ray/di": "^2.18"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^12"
}
}
2 changes: 1 addition & 1 deletion demos/loan-application/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"ray/di": "^2.18"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^12"
}
}
14 changes: 13 additions & 1 deletion demos/medical-triage/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
"ray/di": "^2.18"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^12"
},
Comment thread
koriym marked this conversation as resolved.
"scripts": {
"dev": "php bin/be.php",
"profile": "XDEBUG_MODE=trace php -d xdebug.use_compression=0 -d extension=xhprof.so bin/be.php",
"stree": "vendor/bin/stree $(ls -t var/log/*.json | head -1)",
"stree:full": "vendor/bin/stree --full $(ls -t var/log/*.json | head -1)"
},
Comment thread
koriym marked this conversation as resolved.
"scripts-descriptions": {
"dev": "Run the Medical Triage demo in dev mode; writes a semantic log to var/log/*.json without Xdebug/XHProf profiling.",
"profile": "Run the Medical Triage demo with semantic profiling; writes a semantic log to var/log/*.json with uncompressed Xdebug trace and xhprof enabled.",
"stree": "Render the latest var/log/*.json as a compact tree.",
"stree:full": "Render the latest var/log/*.json as a semantic full tree with full props and close.profile details."
}
}
20 changes: 20 additions & 0 deletions demos/medical-triage/stree-full.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
becoming PatientInput
├── patientId: PT-10001
├── chiefComplaint: severe chest pain
├── consciousnessLevel: 0
├── being TriageLevelDetermined input=[patientId, chiefComplaint +1 items] inject=[protocol]
│ ├── inject.protocol: Be\Pattern\MedicalTriage\Reason\JTASProtocol
│ └── close
│ ├── being.triageCode: RED
│ ├── patientId: PT-10001
│ ├── chiefComplaint: severe chest pain
│ └── consciousnessLevel: 0
├── being_final EmergencyAdmitted input=[being, patientId]
│ └── close
│ ├── admissionId: ADM-20260422-9b8b8250
│ ├── status: admitted
│ ├── triageCode: RED
│ ├── being.triageCode: RED
│ └── patientId: PT-10001
└── close
└── exit: success
6 changes: 6 additions & 0 deletions demos/medical-triage/stree.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
becoming PatientInput
├── being TriageLevelDetermined input=[patientId, chiefComplaint +1 items] inject=[protocol]
│ └── being=TriageLevelDetermined prop=[being, patientId, chiefComplaint +1 items]
├── being_final EmergencyAdmitted input=[being, patientId]
│ └── prop=[admissionId, status, triageCode, being +1 items]
└── exit=success
14 changes: 13 additions & 1 deletion demos/order-processing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
"ray/di": "^2.18"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^12"
},
"scripts": {
"dev": "php bin/be.php",
"profile": "XDEBUG_MODE=trace php -d xdebug.use_compression=0 -d extension=xhprof.so bin/be.php",
"stree": "vendor/bin/stree $(ls -t var/log/*.json | head -1)",
"stree:full": "vendor/bin/stree --full $(ls -t var/log/*.json | head -1)"
},
"scripts-descriptions": {
"dev": "Run the Order Processing demo in dev mode; writes a semantic log to var/log/*.json without Xdebug/XHProf profiling.",
"profile": "Run the Order Processing demo with semantic profiling; writes a semantic log to var/log/*.json with uncompressed Xdebug trace and xhprof enabled.",
"stree": "Render the latest var/log/*.json as a compact tree.",
"stree:full": "Render the latest var/log/*.json as a semantic full tree with full props and close.profile details."
}
}
35 changes: 35 additions & 0 deletions demos/order-processing/stree-full.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
becoming OrderInput
├── cartId: CART-001
├── customerId: CUST-001
├── cardNumber: 4111111111111111
Comment thread
koriym marked this conversation as resolved.
├── cardExpiry: 12/25
├── cardCvv: 123
├── postalCode: 150-0001
├── streetAddress: 渋谷区神宮前1-1-1
├── being_final OrderConfirmed inject=[inventory, payment, shipping, been]
│ ├── inject.inventory: Be\Pattern\OrderProcessing\Moment\InventoryReserved
│ ├── inject.payment: Be\Pattern\OrderProcessing\Moment\PaymentCompleted
│ ├── inject.shipping: Be\Pattern\OrderProcessing\Moment\ShippingArranged
│ ├── inject.been: Be\Framework\SemanticLog\Been
│ ├── order_finalized orderId=ORD-20260422-67163ba8 status=confirmed [event]
│ │ ├── orderId: ORD-20260422-67163ba8
│ │ └── status: confirmed
│ └── close
│ ├── orderId: ORD-20260422-67163ba8
│ ├── status: confirmed
│ ├── inventory.reservation.reservationId: RSV-TOKYO-20260422032619-2893
│ ├── inventory.productId: PROD-001
│ ├── inventory.quantity: 1
│ ├── inventory.warehouseId: WH-TOKYO-01
│ ├── payment.capture.authorizationCode: AUTH-10000-4cb8d550
│ ├── payment.capture.amount: 10000
│ ├── payment.cardNumber: 4111111111111111
│ ├── payment.amount: 10000
│ ├── shipping.dispatch.trackingNumber: YAMATO-202604220326199860
│ ├── shipping.dispatch.shippingRate: 800
│ ├── shipping.carrierId: YAMATO
│ ├── shipping.address: Tokyo, Japan
│ ├── been[0].orderId: ORD-20260422-67163ba8
│ └── been[0].status: confirmed
└── close
└── exit: success
5 changes: 5 additions & 0 deletions demos/order-processing/stree.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
becoming OrderInput
├── being_final OrderConfirmed inject=[inventory, payment, shipping, been]
│ ├── order_finalized orderId=ORD-20260422-67163ba8 status=confirmed [event]
│ └── prop=[orderId, status, inventory, payment +1 items] been=[1 items]
└── exit=success
14 changes: 13 additions & 1 deletion demos/user-registration/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
"ray/di": "^2.18"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^12"
},
"scripts": {
"dev": "php bin/be.php",
"profile": "XDEBUG_MODE=trace php -d xdebug.use_compression=0 -d extension=xhprof.so bin/be.php",
"stree": "vendor/bin/stree $(ls -t var/log/*.json | head -1)",
"stree:full": "vendor/bin/stree --full $(ls -t var/log/*.json | head -1)"
},
"scripts-descriptions": {
"dev": "Run the User Registration demo in dev mode; writes a semantic log to var/log/*.json without Xdebug/XHProf profiling.",
"profile": "Run the User Registration demo with semantic profiling; writes a semantic log to var/log/*.json with uncompressed Xdebug trace and xhprof enabled.",
"stree": "Render the latest var/log/*.json as a compact tree.",
"stree:full": "Render the latest var/log/*.json as a semantic full tree with full props and close.profile details."
}
}
41 changes: 41 additions & 0 deletions demos/user-registration/stree-full.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
becoming RegistrationInput
├── email: alice@example.com
├── password: Str0ngP@ss
├── displayName: Alice
├── being EmailVerified input=[email, password, displayName] inject=[verifier]
│ ├── inject.verifier: Be\Pattern\UserRegistration\Reason\EmailVerifier
│ └── close
│ ├── email: alice@example.com
│ ├── password: Str0ngP@ss
│ └── displayName: Alice
├── being PasswordHashed input=[email, password, displayName] inject=[hasher]
│ ├── inject.hasher: Be\Pattern\UserRegistration\Reason\PasswordHasher
│ └── close
│ ├── hashedPassword: $2y$12$6FqPq/JWd4QgJ9vGgUMtb.hHIz2bavynhdUGttlwJxSgK7GsWbYya
│ ├── email: alice@example.com
│ └── displayName: Alice
├── being ProfileEnriched input=[email, displayName, hashedPassword] inject=[resolver]
│ ├── inject.resolver: Be\Pattern\UserRegistration\Reason\GravatarResolver
│ └── close
│ ├── avatarUrl: https://www.gravatar.com/avatar/c160f8cc69a4f0bf2b0362752353d060
│ ├── email: alice@example.com
│ ├── displayName: Alice
│ └── hashedPassword: $2y$12$6FqPq/JWd4QgJ9vGgUMtb.hHIz2bavynhdUGttlwJxSgK7GsWbYya
├── being_final UserRegistered input=[email, displayName, hashedPassword +1 items] inject=[idGen, tokenGen, been]
│ ├── inject.idGen: Be\Pattern\UserRegistration\Reason\UserIdGenerator
│ ├── inject.tokenGen: Be\Pattern\UserRegistration\Reason\WelcomeTokenGenerator
│ ├── inject.been: Be\Framework\SemanticLog\Been
│ ├── user_created userId=USR-20260422-13e3e4ef35a36429 email=alice@example.com [event]
│ │ ├── userId: USR-20260422-13e3e4ef35a36429
│ │ └── email: alice@example.com
│ └── close
│ ├── userId: USR-20260422-13e3e4ef35a36429
│ ├── welcomeToken: 0f1acca67431022f22ab5cb09ed9a341246eba5d5d24c520d1037919a8a41ef5
│ ├── email: alice@example.com
│ ├── displayName: Alice
│ ├── hashedPassword: $2y$12$6FqPq/JWd4QgJ9vGgUMtb.hHIz2bavynhdUGttlwJxSgK7GsWbYya
│ ├── avatarUrl: https://www.gravatar.com/avatar/c160f8cc69a4f0bf2b0362752353d060
│ ├── been[0].userId: USR-20260422-13e3e4ef35a36429
│ └── been[0].email: alice@example.com
└── close
└── exit: success
11 changes: 11 additions & 0 deletions demos/user-registration/stree.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
becoming RegistrationInput
├── being EmailVerified input=[email, password, displayName] inject=[verifier]
│ └── being=EmailVerified prop=[email, password, displayName]
├── being PasswordHashed input=[email, password, displayName] inject=[hasher]
│ └── being=PasswordHashed prop=[hashedPassword, email, displayName]
├── being ProfileEnriched input=[email, displayName, hashedPassword] inject=[resolver]
│ └── being=ProfileEnriched prop=[avatarUrl, email, displayName +1 items]
├── being_final UserRegistered input=[email, displayName, hashedPassword +1 items] inject=[idGen, tokenGen, been]
│ ├── user_created userId=USR-20260422-13e3e4ef35a36429 email=alice@example.com [event]
│ └── prop=[userId, welcomeToken, email, displayName +2 items] been=[1 items]
└── exit=success
Loading