Skip to content

Conversation

@sacOO7
Copy link
Collaborator

@sacOO7 sacOO7 commented Feb 19, 2025

Summary by CodeRabbit

  • Documentation
    • Updated token expiry settings in the documentation, extending the default token lifetime from 1 hour to 8 hours along with revised environment configuration examples.
  • Chores
    • Improved compatibility and robustness by updating dependency versions and refining continuous integration settings to support newer PHP and framework releases.

1. Increased token expiry to 8 hrs in order to reduce CPU workload
2. Updated README, updated note for defualt token expiry from 1 hr to 8 hr
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2025

Walkthrough

This pull request updates the testing matrix, dependency constraints, and token expiry configurations. The CI workflow is modified to test against newer PHP (8.3, 8.4) and Laravel (12.*) versions while excluding incompatible combinations. Dependency versions in composer.json are expanded to support Laravel 12 and PHPUnit 12. In addition, the default token expiry settings in both documentation and code have been updated from 1 hour to 8 hours.

Changes

File(s) Change Summary
.github/workflows/check.yml Updated CI workflow matrix: added PHP versions 8.3 & 8.4, included Laravel 12.*, and modified include/exclude sections to prevent incompatible version combinations.
composer.json Expanded dependency version constraints: added support for illuminate/support ^12.0, phpunit/phpunit ^12.0, and extended orchestra/testbench to include version 10.*.
README.md, src/AblyBroadcaster.php Updated token expiry settings: changed default token duration from 3600 sec (1 hr) to 28800 sec (8 hr) in code; updated documentation and example env variable (ABLY_TOKEN_EXPIRY from 21600 to 43200 sec).

Possibly related PRs

  • Release/1.0.6 #52: Addresses similar token expiry configuration changes in the AblyBroadcaster class, ensuring consistency across updates.

Suggested reviewers

  • owenpearson
  • ttypic

Poem

I hopped through lines of code today,
Testing PHP in a whole new way.
Laravel 12 joins the festive race,
Tokens now live with a longer grace.
With carrot-fueled leaps, I cheer so bright—
A rabbit's delight in every byte! 🐰

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.

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. (Beta)
  • @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.

1. Updated composer to add support for laravel 12 and related testsuite dependencies
2. Updated CI workflow to run broadcaster tests with laravel 12 and supported versions of PHP
@sacOO7 sacOO7 force-pushed the feature/support-laravel-12 branch from 0394624 to b2e643b Compare February 24, 2025 13:27
@sacOO7 sacOO7 marked this pull request as ready for review February 25, 2025 07:04
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: 0

🧹 Nitpick comments (1)
.github/workflows/check.yml (1)

36-36: Remove trailing whitespace.

There's a trailing whitespace on line 36 that should be removed.

-            testbench: 10.*
+            testbench: 10.*
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 36-36: trailing spaces

(trailing-spaces)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4bbde23 and b2e643b.

📒 Files selected for processing (4)
  • .github/workflows/check.yml (3 hunks)
  • README.md (1 hunks)
  • composer.json (1 hunks)
  • src/AblyBroadcaster.php (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[style] ~130-~130: Consider a shorter alternative to avoid wordiness.
Context: ...(8 hrs)** - Default expiry set to 8 hrs in order to reduce CPU workload for auth requests. ...

(IN_ORDER_TO_PREMIUM)

🪛 markdownlint-cli2 (0.17.2)
README.md

129-129: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

🪛 YAMLlint (1.35.1)
.github/workflows/check.yml

[error] 36-36: trailing spaces

(trailing-spaces)

🔇 Additional comments (8)
README.md (2)

129-130: Documentation update for token expiry settings looks good.

This update clarifies the new default token expiry of 8 hours with a good explanation of the reasoning (reducing CPU workload). The added link to the GitHub issue provides valuable context for users who want to understand the decision behind this change.

🧰 Tools
🪛 LanguageTool

[style] ~130-~130: Consider a shorter alternative to avoid wordiness.
Context: ...(8 hrs)** - Default expiry set to 8 hrs in order to reduce CPU workload for auth requests. ...

(IN_ORDER_TO_PREMIUM)

🪛 markdownlint-cli2 (0.17.2)

129-129: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


133-133: Example configuration update matches the new default.

The updated example value of 43200 seconds (12 hours) for the environment variable is consistent with the increased default expiry time.

src/AblyBroadcaster.php (1)

30-32: Token expiry value updated to match documentation.

The update of the default token expiry from 1 hour to 8 hours is properly implemented both in the default variable value and the documentation comment. This aligns with the PR objective to reduce CPU workload by minimizing token generation frequency.

.github/workflows/check.yml (3)

19-20: CI matrix expanded to include newer PHP and Laravel versions.

Good update to include testing against PHP 8.3, 8.4 and Laravel 12.*. This ensures the package is properly tested against the latest versions.


34-35: Laravel 12 test configuration added correctly.

The inclusion of Laravel 12.* with testbench 10.* maintains consistency with the existing pattern for other Laravel versions.


38-89: Appropriate version exclusions for incompatible combinations.

The exclusions matrix has been properly updated to prevent testing Laravel 12 with incompatible PHP versions and to prevent testing older Laravel versions with newer PHP versions.

composer.json (2)

20-20: Laravel 12 support added to requirements.

Good update to include Laravel 12 support in the illuminate/support dependency constraint.


24-25: Development dependencies updated for newer versions.

The updates to phpunit/phpunit and orchestra/testbench version constraints are appropriate to support testing with Laravel 12.

@sacOO7 sacOO7 requested review from AndyTWF and ttypic February 25, 2025 14:33
Copy link

@ttypic ttypic left a comment

Choose a reason for hiding this comment

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

LGTM

@zoranlorkovic
Copy link

@sacOO7 When can we expect this to be merged? :)

@sacOO7 sacOO7 merged commit eeb1c3c into main Feb 26, 2025
32 checks passed
@sacOO7 sacOO7 deleted the feature/support-laravel-12 branch February 26, 2025 09:40
@sacOO7
Copy link
Collaborator Author

sacOO7 commented Feb 26, 2025

@zoranlorkovic merged, we will do release soon 👍

@coderabbitai coderabbitai bot mentioned this pull request Feb 26, 2025
@sacOO7
Copy link
Collaborator Author

sacOO7 commented Feb 26, 2025

@zoranlorkovic latest version v1.0.7 released and available to use !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add support for laravel 12

5 participants