Skip to content

Maintenance #145

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

Merged
merged 7 commits into from
May 8, 2025
Merged

Maintenance #145

merged 7 commits into from
May 8, 2025

Conversation

roxblnfk
Copy link
Member

@roxblnfk roxblnfk commented May 8, 2025

Description

Add CS fixer in CI
Update metafiles
Update readme

Summary by CodeRabbit

  • Documentation
    • Significantly improved and reorganized the README for better clarity, installation guidance, plugin support, and customization instructions.
  • Chores
    • Updated .editorconfig and .gitattributes for improved pattern matching and export rules.
    • Added a GitHub Actions workflow for automated code style fixing.
    • Enhanced composer.json with new authors, improved script commands, and added support metadata.
    • Updated Makefile test coverage command.
    • Improved PHPUnit configuration for detailed reporting and organized output.
    • Updated PHP CS Fixer configuration to disable risky fixers.

@roxblnfk roxblnfk requested a review from butschster as a code owner May 8, 2025 14:32
Copy link

coderabbitai bot commented May 8, 2025

Walkthrough

This update refines project configuration and documentation. It improves code style and test scripts, enhances the .gitattributes export rules, and adds a GitHub Actions workflow for code style fixing. The README is reorganized and expanded for clarity. PHPUnit and Makefile commands are updated for better coverage and reporting, with no changes to core logic.

Changes

File(s) Change Summary
.editorconfig Removed spaces after commas in file extension pattern list for more precise matching.
.gitattributes Broadened export-ignore rules to all dotfiles/directories, added XML and rector.php ignores, and refined previous patterns.
.github/workflows/cs-fix.yml Added new workflow to trigger code style fixes on push, delegating logic to an external reusable workflow.
.php-cs-fixer.dist.php Explicitly disabled risky fixers by adding allowRisky(false) to the configuration.
Makefile Updated the test-cover target to invoke composer phpunit:cover instead of composer phpunit-cover.
README.md Extensively revised for clarity, added Table of Contents, improved plugin documentation, and introduced a section on custom workers.
composer.json Reformatted, added authors, improved and renamed scripts, added support metadata, and cleaned up structure without changing dependencies.
phpunit.xml.dist Enhanced test and coverage configuration, redirected reports to runtime directory, added logging, and improved output detail.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub
    participant ExternalWorkflow

    Developer->>GitHub: Pushes code to branch
    GitHub->>GitHub Actions: Triggers cs-fix workflow
    GitHub Actions->>ExternalWorkflow: Calls spiral/gh-actions cs-fix workflow
    ExternalWorkflow-->>GitHub Actions: Performs code style fix
    GitHub Actions-->>Developer: Reports workflow results
Loading

Suggested reviewers

  • butschster

Poem

In the warren of code, we hop and we fix,
With scripts and configs, clever new tricks.
Docs now shine brighter, tests cover more ground,
Our carrots of coverage in runtime are found.
From workflows to workers, the garden’s in bloom—
This rabbit’s delighted, there’s plenty of room! 🥕

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 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 941f6e3 and 23ca5a0.

📒 Files selected for processing (1)
  • README.md (9 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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 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.

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

🧹 Nitpick comments (7)
.github/workflows/cs-fix.yml (2)

12-12: Pin reusable workflow to a fixed version
Referencing spiral/gh-actions/...@master can introduce breaking changes when upstream updates. It’s safer to pin to a released tag or commit SHA (e.g., @v1.2.0).


1-4: Consider adding a pull_request trigger or limiting branches
Currently, the workflow runs on every push to any branch. To catch style issues early on contributions, consider adding:

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
composer.json (1)

83-87: Harmonize composer script naming
We now mix hyphens and colons in script names (test:unit vs test-cover). For consistency, consider renaming "test-cover" to "test:cover" (or vice versa) and update invocations in CI/Makefile accordingly.

README.md (4)

15-21: Vary bullet phrasing to avoid repetition
Three consecutive list items start with “You want to…”. Consider rewording for readability, e.g.:

- You want to use Temporal.
+ Leverage Temporal for orchestrating workflows.
🧰 Tools
🪛 LanguageTool

[style] ~19-~19: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ins like gRPC, Queue, KV, and others. - You want to use Temporal. - You want to con...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~19-~19: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...like gRPC, Queue, KV, and others. - You want to use Temporal. - You want to control Roa...

(REP_WANT_TO_VB)


[style] ~20-~20: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...d others. - You want to use Temporal. - You want to control RoadRunner configuratio...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~20-~20: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...hers. - You want to use Temporal. - You want to control RoadRunner configuration. ![Ro...

(REP_WANT_TO_VB)


[uncategorized] ~20-~20: You might be missing the article “the” here.
Context: ... to use Temporal. - You want to control RoadRunner configuration. ![RoadRunner](https://g...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


59-63: Add missing article for clarity
The line reads “Download and install RoadRunner binary using DLoad:”. It’s clearer as:

- Download and install RoadRunner binary using DLoad:
+ Download and install the RoadRunner binary using DLoad:
🧰 Tools
🪛 LanguageTool

[uncategorized] ~59-~59: You might be missing the article “the” here.
Context: ... --tag=config Download and install RoadRunner binary using DLoad: shell ./vendor/...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


92-98: Clarify the RR binary path
If installed via DLoad into vendor/bin, running ./rr serve may not work without a PATH update. Either instruct users to run:

./vendor/bin/rr serve

or note that vendor/bin should be in the PATH.


139-141: Add a TIP admonition for gRPC plugin
HTTP and Jobs sections use [!TIP] blocks. Consider adding one for gRPC:

> [!TIP]
> Read more about the gRPC plugin in the RoadRunner docs: [docs](https://docs.roadrunner.dev/docs/grpc)

This keeps the style consistent.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ed3be1b and af87a04.

📒 Files selected for processing (8)
  • .editorconfig (1 hunks)
  • .gitattributes (1 hunks)
  • .github/workflows/cs-fix.yml (1 hunks)
  • .php-cs-fixer.dist.php (1 hunks)
  • Makefile (1 hunks)
  • README.md (9 hunks)
  • composer.json (1 hunks)
  • phpunit.xml.dist (2 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[style] ~19-~19: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ins like gRPC, Queue, KV, and others. - You want to use Temporal. - You want to con...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~19-~19: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...like gRPC, Queue, KV, and others. - You want to use Temporal. - You want to control Roa...

(REP_WANT_TO_VB)


[style] ~20-~20: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...d others. - You want to use Temporal. - You want to control RoadRunner configuratio...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~20-~20: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...hers. - You want to use Temporal. - You want to control RoadRunner configuration. ![Ro...

(REP_WANT_TO_VB)


[uncategorized] ~20-~20: You might be missing the article “the” here.
Context: ... to use Temporal. - You want to control RoadRunner configuration. ![RoadRunner](https://g...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~59-~59: You might be missing the article “the” here.
Context: ... --tag=config Download and install RoadRunner binary using DLoad: shell ./vendor/...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🔇 Additional comments (11)
.php-cs-fixer.dist.php (1)

13-13: Good explicit setting for risky fixers

Setting allowRisky(false) explicitly makes it clear that risky fixers (those that might change code behavior) should not be applied. This is a good practice for code style enforcement in CI.

.gitattributes (3)

3-3: Improved exclusion pattern for hidden files

The pattern now properly ignores all dotfiles and dot directories when exporting the repository, which is more comprehensive than the previous approach.


6-7: Good explicit exclusion of XML configuration files

Adding specific patterns for XML files in the root directory helps ensure configuration files aren't included in distribution archives.


10-10: Appropriate exclusion of rector.php

Adding rector.php to the export-ignore list ensures this development tool configuration isn't included in distribution packages.

phpunit.xml.dist (4)

5-9: Enhanced PHPUnit configuration attributes

The added attributes improve test reporting and debugging:

  • cacheResultFile specifies a standardized location for caching results
  • stderr="true" ensures errors are properly displayed
  • The display options for warnings and deprecations improve visibility of potential issues

These changes follow modern PHPUnit best practices.


19-26: Improved source coverage configuration

Restructuring the coverage configuration with the <source> element makes the included and excluded directories more explicit, which follows the current PHPUnit recommended structure.


27-33: Standardized coverage report paths

Directing all coverage reports to the runtime directory creates a more organized structure and keeps the project root clean.


34-36: Added JUnit XML reporting

Adding JUnit XML output improves CI integration capabilities and provides a standardized format for test results that many tools can consume.

.editorconfig (1)

11-11: Fixed EditorConfig syntax

Removed unnecessary spaces after commas in the file pattern list, which ensures proper parsing of the EditorConfig rules for the specified file types.

composer.json (2)

23-34: Great—authors list updated
Adding roxblnfk and tarampampam improves attribution. Ensure this list stays up to date with active maintainers.


99-102: Nice addition of support metadata
Including "support" links for issues and source enhances discoverability for contributors and users.

Comment on lines 31 to +32
test-cover: ## Execute php tests with coverage
docker-compose run --rm --user "0:0" -e 'XDEBUG_MODE=coverage' app sh -c 'docker-php-ext-enable xdebug && su $(shell whoami) -s /bin/sh -c "composer phpunit-cover"'
docker-compose run --rm --user "0:0" -e 'XDEBUG_MODE=coverage' app sh -c 'docker-php-ext-enable xdebug && su $(shell whoami) -s /bin/sh -c "composer phpunit:cover"'
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Mismatch in composer script invocation for test-cover
The Makefile’s test-cover target calls composer phpunit:cover, but in composer.json the scripts are defined as "phpunit-cover" and "test-cover". Invoking composer phpunit:cover will fail.

  • If you intend to run the composite coverage script, update to composer test-cover.
  • If you meant the standalone coverage script, use composer phpunit-cover.

🏁 Script executed:

#!/bin/bash
# Check composer.json for script definitions matching phpunit-cover, test-cover, or phpunit:cover
grep -n '"scripts"' -n composer.json
grep -n '"phpunit-cover"' composer.json
grep -n '"test-cover"' composer.json
grep -n '"phpunit:cover"' composer.json

Length of output: 247


Incorrect Makefile composer script invocation
The test-cover target in Makefile (lines 31–32) calls:

su $(shell whoami) -s /bin/sh -c "composer phpunit:cover"

However, your composer.json defines its scripts with dashes, not colons:

"phpunit-cover" (standalone coverage)
"test-cover" (composite coverage)

Recommended fixes:

  • If you want the composite coverage flow, change to
    … su $(shell whoami) -s /bin/sh -c "composer test-cover"
  • If you just intended the PHPUnit coverage step, use
    … su $(shell whoami) -s /bin/sh -c "composer phpunit-cover"

Please update the invocation accordingly.

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.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🧹 Nitpick comments (3)
README.md (3)

15-19: Clean up blank line and standardize bullet punctuation
There’s an extra blank line at 16 and the bullets in 17–19 are inconsistent in punctuation. Recommend removing the empty line and either adding periods at the end of each item or dropping them all.

@@ -15,5 +15,4
- This package provides complete Laravel integration with RoadRunner, offering:
-
- - Support for HTTP and other RoadRunner plugins (gRPC, Queue, KV)
- - [Temporal](https://temporal.io/) integration
- - Full RoadRunner configuration control
+ This package provides complete Laravel integration with RoadRunner, offering:
+ - Support for HTTP and other RoadRunner plugins (gRPC, Queue, KV).
+ - [Temporal](https://temporal.io/) integration.
+ - Full RoadRunner configuration control.

101-114: Fix punctuation and casing in “How It Works” section
Lines 113–114 end with a comma but should use a period, and ensure “Octane” is consistently capitalized.

@@ -113,2 +113,2
- and handles them using the [Octane][octane] worker,
+ and handles them using the [Octane][octane] worker.

143-144: Merge broken sentence for readability
The two-line paragraph should be combined into one for clarity and to avoid line-break issues in Markdown.

- The Queue plugin allows you to use RoadRunner as a queue driver for Laravel
- without additional services like Redis or a database.
+ The Queue plugin allows you to use RoadRunner as a queue driver for Laravel without additional services like Redis or a database.
🛑 Comments failed to post (1)
README.md (1)

91-97: 🛠️ Refactor suggestion

Use the correct path for the RoadRunner binary
Since the binary is installed via DLoad in the vendor/bin directory, update the command to:

- ### Starting the Server
- 
- Start the RoadRunner server with:
- ```shell
- ./rr serve
- ```
+ ### Starting the Server
+
+ Start the RoadRunner server with:
+ ```shell
+ ./vendor/bin/rr serve
+ ```

@butschster butschster self-assigned this May 8, 2025
@butschster butschster merged commit 1b8a236 into master May 8, 2025
2 checks passed
@butschster butschster deleted the misc branch May 8, 2025 21:46
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