Skip to content

Conversation

@withinboredom
Copy link
Member

@withinboredom withinboredom commented Aug 1, 2025

Summary by CodeRabbit

  • Style

    • Improved code formatting by adding blank lines after opening tags and adjusting spacing throughout many files for consistency.
    • Reordered union type hints in method signatures for consistency across interfaces, classes, and tests.
    • Reformatted configuration files for clarity and maintainability.
  • Chores

    • Updated coding standards and formatting rules in configuration files.
    • Added new vendor directories to the PHP include path configuration.
  • Bug Fixes

    • Replaced standard string trimming functions with multibyte-safe versions in select locations to improve handling of multibyte characters.
  • Tests

    • Updated tests to use multibyte-safe string trimming for more accurate comparisons.

@coderabbitai
Copy link

coderabbitai bot commented Aug 1, 2025

Walkthrough

This update primarily standardizes code style by reordering union types in type hints and adding blank lines after opening PHP tags across many files. Several functions now use multibyte-safe string trimming (mb_trim/mb_ltrim) instead of their standard counterparts. The pint.json configuration introduces new code style rules and reformatting. A few interface and class implementation orders are adjusted, but no functional logic is changed.

Changes

Cohort / File(s) Change Summary
Code Style: Union Type Order
src/DurableLogger.php, src/OrchestrationContext.php, src/OrchestrationContextInterface.php, src/Proxy/Generator.php, src/State/AbstractHistory.php, src/State/Ids/StateId.php, src/State/ParameterFillerTrait.php, src/State/HistoricalStateTracker.php, src/State/EntityHistory.php, src/State/OrchestrationHistory.php, src/Gateway/Graph/AstType.php, src/Gateway/Graph/AstVisitor.php, src/Gateway/Graph/GraphGenerator.php, tests/Feature/ClientProxyTest.php, tests/Feature/OrchestratorProxyTest.php
Union types in method signatures, parameters, and interface/class declarations reordered for consistency; no logic changes.
Blank Line Addition after PHP Tag
src/ActivityInfo.php, src/Events/External.php, src/Events/GiveOwnership.php, src/Events/ShareOwnership.php, src/Events/ShareWithRole.php, src/Events/ShareWithUser.php, src/Events/Shares/Mode.php, src/Events/Shares/NeedsSource.php, src/Events/Shares/NeedsTarget.php, src/Events/Shares/Operation.php, src/Events/TargetType.php, src/Events/WithPriority.php, src/Gateway/Graph/MetaParser.php, src/Gateway/Graph/Mode.php, src/Gateway/Graph/SchemaGenerator.php, src/Glue/Provenance.php, src/Proxy/ImpureException.php, src/Proxy/Pure.php, src/Search/EntityFilter.php, src/SerializedArray.php, src/State/Attributes/AllowCreateAll.php, src/State/Attributes/AllowCreateForAuth.php, src/State/Attributes/AllowCreateForRole.php, src/State/Attributes/AllowCreateForUser.php, src/State/Attributes/EntryPoint.php, src/State/Attributes/Operation.php, src/State/ReceivedSet.php, src/State/ResultSet.php, src/State/Session.php, src/State/EntrypointLocatorTrait.php, src/Task.php, src/Testing/ActivityMock.php, src/Testing/EntityMock.php, src/Testing/Exceptions/ContinuedAsNew.php, tests/Common/LauncherEntity.php, tests/Common/SayHello.php, tests/PerformanceTests/Bank/Account.php, tests/PerformanceTests/Bank/AccountInterface.php, tests/PerformanceTests/Bank/BankClient.php, tests/PerformanceTests/CounterEntity.php, tests/PerformanceTests/FanOutFanInClient.php, tests/PerformanceTests/HelloCities/Client.php, tests/PerformanceTests/SequenceClient.php, tests/PerformanceTests/bootstrap.php, tests/PerformanceTests/report.php, tests/StopWatch.php, tests/Unit/TypeTests.php
Added a blank line after the opening <?php tag for code style consistency; no logic changes.
Multibyte String Trimming
src/Gateway/Graph/TypeManager.php, src/State/Attributes/Tag.php, src/Events/RaiseEvent.php, tests/Unit/GraphQlGeneratorTest.php
Replaced standard trim/ltrim with mb_trim/mb_ltrim for multibyte-safe string handling in relevant methods and tests.
IDE/Config Updates
.idea/php.xml, pint.json
.idea/php.xml: Added new vendor directories to PHP include path.
pint.json: Reformatted "exclude" array and added new code style rules for attributes, shell exec, import usage, interface/type ordering, and if-return simplification.
Formatting and Syntax
bootstrap.php, src/Glue/autoload.php, src/Testing/ActivityMock.php
Minor formatting changes: added blank lines after PHP tag, removed empty parentheses from anonymous class instantiation, and added spaces after control keywords.

Sequence Diagram(s)

Not applicable: All changes are related to code style, formatting, configuration, or internal implementation details without altering or introducing new control flows.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A bunny hopped through PHP code,
Tidying types and style bestowed.
With blank lines neat and unions in line,
Multibyte trims now work just fine.
Configs refreshed, the linter’s pleased,
The garden of code is gently teased.
Hippity-hop, this patch is done—
Review with joy, code friends—run! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a03a4e8 and f51a803.

📒 Files selected for processing (71)
  • .idea/php.xml (1 hunks)
  • bootstrap.php (2 hunks)
  • pint.json (2 hunks)
  • src/ActivityInfo.php (1 hunks)
  • src/DurableClientInterface.php (1 hunks)
  • src/DurableLogger.php (2 hunks)
  • src/Events/External.php (1 hunks)
  • src/Events/GiveOwnership.php (1 hunks)
  • src/Events/RaiseEvent.php (1 hunks)
  • src/Events/ShareOwnership.php (1 hunks)
  • src/Events/ShareWithRole.php (1 hunks)
  • src/Events/ShareWithUser.php (1 hunks)
  • src/Events/Shares/Mode.php (1 hunks)
  • src/Events/Shares/NeedsSource.php (1 hunks)
  • src/Events/Shares/NeedsTarget.php (1 hunks)
  • src/Events/Shares/Operation.php (1 hunks)
  • src/Events/TargetType.php (1 hunks)
  • src/Events/WithPriority.php (1 hunks)
  • src/Gateway/Graph/AstType.php (1 hunks)
  • src/Gateway/Graph/AstVisitor.php (2 hunks)
  • src/Gateway/Graph/GraphGenerator.php (2 hunks)
  • src/Gateway/Graph/MetaParser.php (1 hunks)
  • src/Gateway/Graph/Mode.php (1 hunks)
  • src/Gateway/Graph/SchemaGenerator.php (1 hunks)
  • src/Gateway/Graph/TypeManager.php (3 hunks)
  • src/Glue/Provenance.php (1 hunks)
  • src/Glue/autoload.php (3 hunks)
  • src/OrchestrationContext.php (8 hunks)
  • src/OrchestrationContextInterface.php (1 hunks)
  • src/Proxy/Generator.php (1 hunks)
  • src/Proxy/ImpureException.php (1 hunks)
  • src/Proxy/Pure.php (1 hunks)
  • src/Search/EntityFilter.php (1 hunks)
  • src/SerializedArray.php (1 hunks)
  • src/State/AbstractHistory.php (1 hunks)
  • src/State/Attributes/AllowCreateAll.php (1 hunks)
  • src/State/Attributes/AllowCreateForAuth.php (1 hunks)
  • src/State/Attributes/AllowCreateForRole.php (1 hunks)
  • src/State/Attributes/AllowCreateForUser.php (1 hunks)
  • src/State/Attributes/EntryPoint.php (1 hunks)
  • src/State/Attributes/Operation.php (1 hunks)
  • src/State/Attributes/Tag.php (1 hunks)
  • src/State/EntityHistory.php (1 hunks)
  • src/State/EntrypointLocatorTrait.php (1 hunks)
  • src/State/HistoricalStateTracker.php (4 hunks)
  • src/State/Ids/StateId.php (2 hunks)
  • src/State/OrchestrationHistory.php (1 hunks)
  • src/State/ParameterFillerTrait.php (2 hunks)
  • src/State/ReceivedSet.php (1 hunks)
  • src/State/ResultSet.php (1 hunks)
  • src/State/Session.php (1 hunks)
  • src/Task.php (1 hunks)
  • src/Testing/ActivityMock.php (1 hunks)
  • src/Testing/EntityMock.php (1 hunks)
  • src/Testing/Exceptions/ContinuedAsNew.php (1 hunks)
  • tests/Common/LauncherEntity.php (1 hunks)
  • tests/Common/SayHello.php (1 hunks)
  • tests/Feature/ClientProxyTest.php (2 hunks)
  • tests/Feature/OrchestratorProxyTest.php (1 hunks)
  • tests/PerformanceTests/Bank/Account.php (1 hunks)
  • tests/PerformanceTests/Bank/AccountInterface.php (1 hunks)
  • tests/PerformanceTests/Bank/BankClient.php (1 hunks)
  • tests/PerformanceTests/CounterEntity.php (1 hunks)
  • tests/PerformanceTests/FanOutFanInClient.php (1 hunks)
  • tests/PerformanceTests/HelloCities/Client.php (1 hunks)
  • tests/PerformanceTests/SequenceClient.php (1 hunks)
  • tests/PerformanceTests/bootstrap.php (1 hunks)
  • tests/PerformanceTests/report.php (1 hunks)
  • tests/StopWatch.php (1 hunks)
  • tests/Unit/GraphQlGeneratorTest.php (3 hunks)
  • tests/Unit/TypeTests.php (1 hunks)
✅ Files skipped from review due to trivial changes (30)
  • bootstrap.php
  • src/Proxy/Pure.php
  • src/Events/Shares/NeedsSource.php
  • src/Events/ShareWithUser.php
  • src/Glue/Provenance.php
  • src/SerializedArray.php
  • src/Events/ShareWithRole.php
  • tests/PerformanceTests/CounterEntity.php
  • src/Events/TargetType.php
  • src/State/Attributes/AllowCreateForAuth.php
  • src/State/ResultSet.php
  • src/State/Attributes/Operation.php
  • src/ActivityInfo.php
  • src/Search/EntityFilter.php
  • src/State/Attributes/AllowCreateForUser.php
  • tests/PerformanceTests/FanOutFanInClient.php
  • src/Proxy/ImpureException.php
  • tests/StopWatch.php
  • tests/Unit/TypeTests.php
  • src/Testing/EntityMock.php
  • src/State/Attributes/AllowCreateAll.php
  • tests/Common/LauncherEntity.php
  • .idea/php.xml
  • tests/PerformanceTests/Bank/BankClient.php
  • src/State/EntrypointLocatorTrait.php
  • tests/Unit/GraphQlGeneratorTest.php
  • src/Gateway/Graph/TypeManager.php
  • src/Gateway/Graph/MetaParser.php
  • src/State/EntityHistory.php
  • src/State/OrchestrationHistory.php
🚧 Files skipped from review as they are similar to previous changes (41)
  • src/Events/Shares/NeedsTarget.php
  • src/Events/WithPriority.php
  • src/State/Attributes/AllowCreateForRole.php
  • src/Events/Shares/Operation.php
  • src/Testing/ActivityMock.php
  • src/Events/GiveOwnership.php
  • src/Task.php
  • src/Testing/Exceptions/ContinuedAsNew.php
  • src/Events/Shares/Mode.php
  • src/Gateway/Graph/Mode.php
  • src/Gateway/Graph/SchemaGenerator.php
  • src/Glue/autoload.php
  • tests/PerformanceTests/Bank/AccountInterface.php
  • tests/PerformanceTests/HelloCities/Client.php
  • tests/PerformanceTests/Bank/Account.php
  • tests/Common/SayHello.php
  • src/State/Attributes/EntryPoint.php
  • src/State/ReceivedSet.php
  • src/State/Session.php
  • tests/PerformanceTests/SequenceClient.php
  • src/Events/External.php
  • tests/PerformanceTests/bootstrap.php
  • tests/PerformanceTests/report.php
  • src/Events/ShareOwnership.php
  • src/State/AbstractHistory.php
  • src/State/Attributes/Tag.php
  • src/Events/RaiseEvent.php
  • src/DurableClientInterface.php
  • src/Proxy/Generator.php
  • src/OrchestrationContextInterface.php
  • src/Gateway/Graph/AstType.php
  • src/Gateway/Graph/GraphGenerator.php
  • src/State/HistoricalStateTracker.php
  • src/State/ParameterFillerTrait.php
  • tests/Feature/ClientProxyTest.php
  • tests/Feature/OrchestratorProxyTest.php
  • src/State/Ids/StateId.php
  • src/Gateway/Graph/AstVisitor.php
  • pint.json
  • src/DurableLogger.php
  • src/OrchestrationContext.php
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-docker
  • GitHub Check: Unit Tests - PHP
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch format

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.31%. Comparing base (2d0e58f) to head (f51a803).
⚠️ Report is 1 commits behind head on v2.

Files with missing lines Patch % Lines
src/Events/RaiseEvent.php 0.00% 1 Missing ⚠️
src/Glue/autoload.php 66.66% 1 Missing ⚠️
src/OrchestrationContext.php 50.00% 1 Missing ⚠️
src/State/Attributes/Tag.php 0.00% 1 Missing ⚠️
src/State/HistoricalStateTracker.php 75.00% 1 Missing ⚠️
src/State/Ids/StateId.php 50.00% 1 Missing ⚠️
src/State/ParameterFillerTrait.php 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##                 v2     #152   +/-   ##
=========================================
  Coverage     46.31%   46.31%           
  Complexity     1250     1250           
=========================================
  Files            99       99           
  Lines          3565     3565           
=========================================
  Hits           1651     1651           
  Misses         1914     1914           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (4)
src/State/Attributes/AllowCreateAll.php (1)

1-2: Same PSR-12 concern as noted earlier

See previous comment regarding the unnecessary blank line after the opening tag.

src/Testing/EntityMock.php (1)

1-2: Same PSR-12 concern as noted earlier

See previous comment regarding the unnecessary blank line after the opening tag.

src/Search/EntityFilter.php (1)

1-2: Same PSR-12 concern as noted earlier

See previous comment regarding the unnecessary blank line after the opening tag.

src/State/ReceivedSet.php (1)

1-2: Same PSR-12 concern as noted earlier

See previous comment regarding the unnecessary blank line after the opening tag.

🧹 Nitpick comments (3)
src/Proxy/ImpureException.php (1)

1-2: Blank line after opening <?php conflicts with PSR-12

PSR-12 explicitly states “There MUST NOT be a blank line after the opening tag.”
If the project intentionally diverges from PSR-12, no action is needed; otherwise remove the extra newline or update your formatter rules.

src/Glue/autoload.php (1)

29-38: Replace goto with a straight-line flow for clarity.
goto harms readability and can be avoided without changing behaviour.

-// fast check for development
-if (file_exists(__DIR__ . '/../../vendor/autoload.php')) {
-    require_once __DIR__ . '/../../vendor/autoload.php';
-    goto verify_protocol;
-}
-
-// fast check for standard installs
-if (file_exists(__DIR__ . '/../../../../autoload.php')) {
-    require_once __DIR__ . '/../../../../autoload.php';
-    goto verify_protocol;
-}
-
-echo "ERROR: FAILED TO LOCATE AUTOLOADER\n";
-return;
-
-verify_protocol:
+// Locate Composer autoloader (dev / standard installs)
+$paths = [
+    __DIR__ . '/../../vendor/autoload.php',
+    __DIR__ . '/../../../../autoload.php',
+];
+
+foreach ($paths as $path) {
+    if (file_exists($path)) {
+        require_once $path;
+        break;
+    }
+}
+
+if (!class_exists(\Composer\Autoload\ClassLoader::class, false)) {
+    echo "ERROR: FAILED TO LOCATE AUTOLOADER\n";
+    return;
+}

This keeps the control flow linear and removes the need for a label.

Also applies to: 51-55

.idea/php.xml (1)

153-154: IDE include-path additions – confirm repo policy.
Committing .idea metadata can be intentional, but it often causes churn across contributors. Double-check that these vendor paths must live in VCS; otherwise consider adding .idea/ to .gitignore.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a18fe4c and a03a4e8.

📒 Files selected for processing (74)
  • .idea/php.xml (1 hunks)
  • bootstrap.php (2 hunks)
  • pint.json (2 hunks)
  • src/ActivityInfo.php (1 hunks)
  • src/DurableClientInterface.php (1 hunks)
  • src/DurableLogger.php (2 hunks)
  • src/Events/External.php (1 hunks)
  • src/Events/GiveOwnership.php (1 hunks)
  • src/Events/RaiseEvent.php (1 hunks)
  • src/Events/ShareOwnership.php (1 hunks)
  • src/Events/ShareWithRole.php (1 hunks)
  • src/Events/ShareWithUser.php (1 hunks)
  • src/Events/Shares/Mode.php (1 hunks)
  • src/Events/Shares/NeedsSource.php (1 hunks)
  • src/Events/Shares/NeedsTarget.php (1 hunks)
  • src/Events/Shares/Operation.php (1 hunks)
  • src/Events/TargetType.php (1 hunks)
  • src/Events/WithPriority.php (1 hunks)
  • src/Gateway/Graph/AstType.php (1 hunks)
  • src/Gateway/Graph/AstVisitor.php (2 hunks)
  • src/Gateway/Graph/GraphGenerator.php (2 hunks)
  • src/Gateway/Graph/MetaParser.php (1 hunks)
  • src/Gateway/Graph/Mode.php (1 hunks)
  • src/Gateway/Graph/SchemaGenerator.php (1 hunks)
  • src/Gateway/Graph/TypeManager.php (3 hunks)
  • src/Glue/Provenance.php (1 hunks)
  • src/Glue/autoload.php (3 hunks)
  • src/OrchestrationContext.php (8 hunks)
  • src/OrchestrationContextInterface.php (1 hunks)
  • src/Proxy/Generator.php (1 hunks)
  • src/Proxy/ImpureException.php (1 hunks)
  • src/Proxy/Pure.php (1 hunks)
  • src/Search/EntityFilter.php (1 hunks)
  • src/SerializedArray.php (1 hunks)
  • src/State/AbstractHistory.php (1 hunks)
  • src/State/Attributes/AllowCreateAll.php (1 hunks)
  • src/State/Attributes/AllowCreateForAuth.php (1 hunks)
  • src/State/Attributes/AllowCreateForRole.php (1 hunks)
  • src/State/Attributes/AllowCreateForUser.php (1 hunks)
  • src/State/Attributes/EntryPoint.php (1 hunks)
  • src/State/Attributes/Operation.php (1 hunks)
  • src/State/Attributes/Tag.php (1 hunks)
  • src/State/EntityHistory.php (1 hunks)
  • src/State/EntrypointLocatorTrait.php (1 hunks)
  • src/State/HistoricalStateTracker.php (4 hunks)
  • src/State/Ids/StateId.php (2 hunks)
  • src/State/OrchestrationHistory.php (1 hunks)
  • src/State/ParameterFillerTrait.php (2 hunks)
  • src/State/ReceivedSet.php (1 hunks)
  • src/State/ResultSet.php (1 hunks)
  • src/State/Session.php (1 hunks)
  • src/Task.php (1 hunks)
  • src/Testing/ActivityMock.php (1 hunks)
  • src/Testing/EntityMock.php (1 hunks)
  • src/Testing/Exceptions/ContinuedAsNew.php (1 hunks)
  • tests/Common/LauncherEntity.php (1 hunks)
  • tests/Common/SayHello.php (1 hunks)
  • tests/Feature/ClientProxyTest.php (2 hunks)
  • tests/Feature/OrchestratorProxyTest.php (1 hunks)
  • tests/PerformanceTests/Bank/Account.php (1 hunks)
  • tests/PerformanceTests/Bank/AccountInterface.php (1 hunks)
  • tests/PerformanceTests/Bank/BankClient.php (1 hunks)
  • tests/PerformanceTests/CounterEntity.php (1 hunks)
  • tests/PerformanceTests/FanOutFanIn.php (1 hunks)
  • tests/PerformanceTests/FanOutFanInClient.php (1 hunks)
  • tests/PerformanceTests/HelloCities/Client.php (1 hunks)
  • tests/PerformanceTests/HelloCities/HelloSequence.php (1 hunks)
  • tests/PerformanceTests/Sequence.php (1 hunks)
  • tests/PerformanceTests/SequenceClient.php (1 hunks)
  • tests/PerformanceTests/bootstrap.php (1 hunks)
  • tests/PerformanceTests/report.php (1 hunks)
  • tests/StopWatch.php (1 hunks)
  • tests/Unit/GraphQlGeneratorTest.php (3 hunks)
  • tests/Unit/TypeTests.php (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (7)
tests/Feature/OrchestratorProxyTest.php (1)
tests/Feature/ClientProxyTest.php (1)
  • pureExample (59-62)
src/Gateway/Graph/AstType.php (1)
src/Gateway/Graph/Union.php (1)
  • Union (5-16)
src/State/ParameterFillerTrait.php (1)
src/State/Serializer.php (2)
  • Serializer (31-82)
  • deserialize (61-76)
src/State/Ids/StateId.php (4)
cli/ids/id.go (2)
  • EntityId (134-137)
  • StateId (176-179)
src/State/EntityId.php (1)
  • EntityId (33-51)
src/State/OrchestrationInstance.php (1)
  • OrchestrationInstance (30-45)
src/Events/With.php (1)
  • id (32-39)
src/Gateway/Graph/GraphGenerator.php (1)
src/Gateway/Graph/AstVisitor.php (1)
  • extractValue (311-322)
src/Gateway/Graph/AstVisitor.php (1)
src/Gateway/Graph/GraphGenerator.php (1)
  • extractValue (51-63)
src/OrchestrationContext.php (4)
src/OrchestrationContextInterface.php (3)
  • createTimer (110-110)
  • isReplaying (160-160)
  • entityOp (78-78)
src/Testing/DummyOrchestrationContext.php (3)
  • createTimer (245-251)
  • isReplaying (287-290)
  • entityOp (137-179)
src/State/EntityId.php (1)
  • EntityId (33-51)
src/functions.php (1)
  • EntityId (13-16)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-docker
  • GitHub Check: Unit Tests - PHP
🔇 Additional comments (77)
tests/StopWatch.php (1)

2-2: Formatting change looks good

Adding a blank line after the opening PHP tag aligns with common PSR-12 formatting conventions. No functional impact.

src/Gateway/Graph/Mode.php (1)

2-2: Aligns with PSR-12 blank-line requirement.

Adding the blank line after the opening <?php tag brings the file into PSR-12 compliance and improves readability.

src/Gateway/Graph/SchemaGenerator.php (1)

1-2: Consistent header spacing achieved

The added blank line after <?php aligns with PSR-12 recommendations and keeps file headers uniform across the codebase. No functional impact—looks good.

src/Gateway/Graph/MetaParser.php (1)

2-2: Blank line after <?php could trip PSR-12 linters

PSR-12 §2.2 states “There MUST NOT be a hard line break after the opening tag.”
The added empty line means there are now two consecutive breaks after <?php, which some linters (e.g. PHP_CodeSniffer’s PSR12.OpenTag) will flag.

Confirm this aligns with the project’s formatter rules; otherwise consider reverting:

-<?php
-
+<?php
tests/PerformanceTests/CounterEntity.php (1)

1-2: Header whitespace update is correct and PSR-12 compliant
No issues.

tests/PerformanceTests/Bank/BankClient.php (1)

1-2: Blank line after <?php improves consistency
Change is cosmetic only; looks good.

tests/Unit/TypeTests.php (1)

1-2: Formatting tweak accepted
Matches the project‐wide style adjustments in this PR.

tests/PerformanceTests/FanOutFanIn.php (1)

1-2: Formatting change confirmed
Keeps file headers uniform; no further action needed.

tests/PerformanceTests/FanOutFanInClient.php (1)

1-2: Consistent whitespace – looks good
Purely stylistic; no functional impact.

src/State/Attributes/AllowCreateForRole.php (1)

2-2: Stylistic newline looks good

The added blank line after the opening PHP tag aligns with PSR-12 readability guidelines.

src/State/Attributes/EntryPoint.php (1)

2-2: Stylistic newline looks good

Consistent with the project-wide formatting pass; no functional impact.

src/Events/Shares/Mode.php (1)

2-2: Stylistic newline looks good

Keeps header spacing uniform across source files.

src/State/ResultSet.php (1)

2-2: Stylistic newline looks good

Matches the updated code-style standard; no further feedback.

tests/PerformanceTests/HelloCities/HelloSequence.php (1)

2-2: Stylistic newline looks good

Maintains consistent opening spacing in test files as well.

tests/PerformanceTests/HelloCities/Client.php (1)

1-2: Consistent header spacing looks good

The added blank line after the opening tag improves readability and brings the file in line with the rest of the codebase.

src/Testing/ActivityMock.php (1)

1-2: Formatting tweak approved

The single blank line after <?php follows the project-wide style update and introduces no functional changes.

src/State/Attributes/Operation.php (1)

1-2: Header whitespace aligned with PSR-12

No issues—this minor whitespace adjustment keeps the header consistent across files.

src/State/Session.php (1)

1-2: Style consistency maintained

The extra blank line is harmless and makes the file header uniform with others.

src/Events/GiveOwnership.php (1)

1-2: Whitespace addition accepted

The formatting change is correct and introduces no functional impact.

src/Events/ShareWithUser.php (1)

1-2: Blank line addition is fine

The single whitespace line after the opening tag improves readability and aligns with PSR-12. No functional impact.

tests/PerformanceTests/SequenceClient.php (1)

1-2: Consistent header formatting

Whitespace after <?php matches the new house style adopted across the codebase. Looks good.

src/State/Attributes/AllowCreateForUser.php (1)

1-2: Header whitespace standardised

The added blank line improves visual separation; no other changes.

src/Task.php (1)

1-2: Whitespace tweak accepted

Insertion of a blank line after the PHP opening tag is stylistic only and does not affect behaviour.

tests/PerformanceTests/Bank/AccountInterface.php (1)

1-2: Header whitespace alignment looks good

Keeps file headers consistent with the rest of the project.

src/Proxy/Pure.php (1)

1-2: PSR-12 newline addition looks good

The single blank line after the opening tag aligns with common PHP style guides (e.g., PSR-12). No functional impact.

src/Testing/Exceptions/ContinuedAsNew.php (1)

1-2: Consistent formatting applied

Same stylistic newline as elsewhere in the PR; keeps headers uniform.

src/Events/Shares/NeedsTarget.php (1)

1-2: Formatting tweak acknowledged

Newline after <?php improves readability; no concerns.

src/State/Attributes/AllowCreateForAuth.php (1)

1-2: Header spacing conforms to project style

Blank line addition is harmless and consistent with other files.

tests/Common/SayHello.php (1)

1-2: Uniform header formatting

The added newline maintains a consistent file layout across the codebase.

src/State/EntrypointLocatorTrait.php (1)

1-2: Consistent header spacing looks good

Adding a blank line after the opening <?php tag improves readability and aligns with the rest of the codebase’s formatting rules.

src/Events/ShareWithRole.php (1)

1-2: Formatting tweak approved

The extra newline after the PHP open tag is consistent with the new style standard introduced across the project.

src/Events/ShareOwnership.php (1)

1-2: OK – uniform spacing maintained

No functional impact; the added blank line keeps header spacing uniform throughout the codebase.

tests/PerformanceTests/Bank/Account.php (1)

1-2: Header blank line accepted

Matches the updated formatting convention; no further action required.

tests/PerformanceTests/report.php (1)

1-2: Style update acknowledged

The newline after <?php aligns this file with the standardized style guide.

src/SerializedArray.php (1)

1-2: Opening-tag newline aligns with PSR-12

Adding a blank line after <?php matches PSR-12/PSR-1 recommendations and keeps this file consistent with the rest of the project.

tests/PerformanceTests/bootstrap.php (1)

1-2: Stylistic improvement acknowledged

The inserted newline after the opening tag brings the test bootstrap in line with the project-wide formatting change.

src/Events/TargetType.php (1)

1-2: Formatting tweak approved

Consistent blank line after the PHP opener; no functional impact.

tests/PerformanceTests/Sequence.php (1)

1-2: Uniform header spacing

Change harmonises this test helper with the new style convention; looks good.

src/Events/Shares/Operation.php (1)

1-2: Consistent style – good to merge

The extra newline satisfies the updated formatting standard without altering behaviour.

tests/Common/LauncherEntity.php (1)

2-2: Style-only change looks good

Adding a blank line after the opening PHP tag aligns with the new project‐wide formatting convention.

src/ActivityInfo.php (1)

2-2: Style-only change looks good

Consistent insertion of a blank line after <?php improves readability and matches the rest of the reformatting effort.

src/Events/WithPriority.php (1)

2-2: Style-only change looks good

No functional impact; keeps the file in line with the updated code style.

src/Events/Shares/NeedsSource.php (1)

2-2: Style-only change looks good

Uniform blank line after the opening tag maintains formatting consistency.

src/Glue/Provenance.php (1)

2-2: Style-only change looks good

Formatting is now consistent with other files; no further action needed.

src/Events/External.php (1)

2-2: Header spacing aligned with PSR-12 – looks good.
The blank line after <?php brings the file in line with community conventions and the new Pint rule set. No further action needed.

bootstrap.php (1)

2-2: Minor style tweaks are fine; verify PHP min-version commitment.
Dropping the empty parentheses (new class) is syntactically valid from PHP 7 onward, but it will parse only if the project guarantees ≥7.x. The repo’s php_language_level="8.4" setting covers this, so no follow-up required.

Also applies to: 27-27

src/Glue/autoload.php (1)

2-2: Consistent header spacing – OK.
Purely cosmetic, keeps headers uniform.

src/State/AbstractHistory.php (1)

42-42: Interface order change complies with new Pint rule – no functional impact.

src/Gateway/Graph/AstType.php (1)

15-15: LGTM! Union type reordering for consistency.

The change from Union|string to string|Union aligns with the codebase standardization effort. No functional impact since union types are order-independent in PHP.

src/State/EntityHistory.php (1)

291-291: LGTM! Union type reordering for consistency.

The parameter type change from int|bool|Event to bool|Event|int in the array filter callback maintains the same functionality while standardizing union type ordering across the codebase.

src/State/OrchestrationHistory.php (1)

155-155: LGTM! Union type reordering for consistency.

The parameter type change from int|bool|Event to bool|Event|int in the array filter callback maintains identical functionality while aligning with the codebase-wide union type ordering standardization.

src/OrchestrationContextInterface.php (1)

78-78: LGTM! Union type reordering for consistency.

The parameter type change from string|EntityId to EntityId|string in the entityOp method maintains the same functionality while standardizing union type ordering across the interface declarations.

src/DurableClientInterface.php (1)

27-27: LGTM! Interface inheritance reordering for consistency.

The change from OrchestrationClientInterface, EntityClientInterface to EntityClientInterface, OrchestrationClientInterface maintains identical interface functionality while standardizing interface declaration order across the codebase.

src/Proxy/Generator.php (1)

135-135: LGTM! Union type reordering aligns with code style rules.

The reordering of union types with null placement at the end is consistent with the ordered_types rule configuration in pint.json.

src/Gateway/Graph/GraphGenerator.php (2)

51-51: LGTM! Return type reordering is consistent with codebase style.

The return type reordering from string|int|float to float|int|string aligns with similar methods in related files like AstVisitor.php.


82-82: LGTM! Parameter type reordering with null placement.

The union type reordering places null at the end, which is consistent with the ordered_types rule configuration.

src/State/ParameterFillerTrait.php (3)

2-2: LGTM! Standard formatting improvement.

Adding a blank line after the opening PHP tag is a common formatting standard.


29-29: LGTM! Union type reordering for consistency.

The reordering of \ReflectionFunction|\ReflectionMethod maintains the same functionality while following consistent type ordering patterns.


31-44: LGTM! Consistent code formatting improvements.

The formatting changes add appropriate spacing after control keywords (foreach, if) which improves code readability and follows standard PHP formatting conventions.

src/Gateway/Graph/AstVisitor.php (2)

311-311: LGTM! Consistent return type ordering across similar methods.

The return type reordering from string|int|float to float|int|string matches the same change made in GraphGenerator.php, maintaining consistency across similar methods.


340-340: LGTM! Union type reordering with proper null placement.

Moving null to the end of the union type follows the ordered_types rule with null_adjustment: "always_last" configuration.

pint.json (2)

3-5: LGTM! Improved array formatting.

The multi-line formatting of the "exclude" array improves readability and follows consistent JSON formatting standards.


8-37: LGTM! Well-chosen formatting rules that support codebase consistency.

The new rules added support the formatting improvements seen throughout the PR:

  • ordered_types with null_adjustment: "always_last" explains the union type reorderings across multiple files
  • no_unused_imports supports import cleanup
  • ordered_interfaces enforces consistent interface ordering
  • Other rules (attribute_empty_parentheses, backtick_to_shell_exec, simplified_if_return) are reasonable code quality improvements

These configuration changes align perfectly with the formatting modifications applied across the codebase.

tests/Unit/GraphQlGeneratorTest.php (3)

77-77: LGTM: Test consistency maintained with source code changes.

The switch from trim() to mb_trim() in test assertions aligns with the corresponding changes in the source code, ensuring tests accurately verify the multibyte-safe string handling.


183-183: LGTM: Consistent multibyte-safe string handling.

This change maintains the same pattern as the previous test assertion, ensuring consistent use of mb_trim() throughout the test suite.


243-243: LGTM: Completing the consistent mb_trim() pattern.

All three test assertions now consistently use mb_trim(), maintaining uniformity across the test suite and alignment with source code changes.

tests/Feature/ClientProxyTest.php (2)

42-42: LGTM: Union type ordering standardization.

The reordering of int|float to float|int is a cosmetic change that improves code style consistency across the codebase without affecting functionality.


59-59: LGTM: Implementation matches interface declaration.

The union type reordering in the implementation correctly matches the interface declaration, maintaining consistency between the two.

src/State/Attributes/Tag.php (1)

14-14: LGTM: Improved multibyte character handling.

The switch from trim() to mb_trim() ensures proper handling of Unicode characters in tag names, making the code more robust for international use cases.

tests/Feature/OrchestratorProxyTest.php (1)

45-45: LGTM: Consistent union type ordering across test files.

The reordering from int|float to float|int maintains consistency with the same interface declaration in tests/Feature/ClientProxyTest.php, ensuring uniform code style across the test suite.

src/Events/RaiseEvent.php (1)

46-46: LGTM: Enhanced multibyte safety for event name processing.

The switch from ltrim() to mb_ltrim() ensures proper handling of Unicode characters when trimming leading underscores from event names, improving robustness for international character sets.

src/Gateway/Graph/TypeManager.php (1)

120-121: Verify availability of mb_trim() at runtime

mb_trim() is not part of ext-mbstring nor the PHP core. Unless a global helper (e.g. src/functions.php) defines it, these calls will raise a fatal error in production.
Double-check that a polyfill is always loaded before TypeManager is used (including in CLI tooling and tests), or replace with trim() plus an explicit multibyte-safe implementation within this class.

Also applies to: 147-148, 167-167

src/State/Ids/StateId.php (1)

63-66: Union-type re-ordering only – looks good

The reordered union types keep the surface API unchanged and preserve contravariance / covariance rules. No action required.

Also applies to: 157-175

src/DurableLogger.php (1)

101-152: No behavioural change – union type reorder is harmless

Parameter type unions were reordered for consistency. Implementation and externally-visible behaviour remain the same. 👍

src/OrchestrationContext.php (3)

207-213: Interface/implementation drift for createTimer()

OrchestrationContextInterface::createTimer() still accepts only DateTimeImmutable, but the implementation now allows DateInterval|DateTimeImmutable.

Code that is type-hinted against the interface cannot pass a DateInterval, defeating the purpose of widening the parameter. Either:

  1. Broaden the interface signature to match, or
  2. Keep the implementation strict and add an overload/utility instead.

Choose one to avoid confusing consumers and static analysers.


491-552: Replay-aware logger overrides – only type-hint shuffle

The overridden logging methods merely reorder the string|Stringable union. Behaviour and replay logic remain intact. Nothing further.


567-608: Consistency with interface maintained

entityOp() now matches the interface order (EntityId|string), ensuring Psalm/php-stan don’t report a mismatch. 👍

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

Performance Metrics

test time (s) memory usage
perf 17.31 100
Fan out/in 60.06 8

Performance Metrics

test time (s) memory usage
perf 45.88 102
Fan out/in 60.06 8

Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
@withinboredom withinboredom merged commit dba911f into v2 Aug 2, 2025
6 checks passed
@withinboredom withinboredom deleted the format branch August 2, 2025 08:21
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.

2 participants