laravel-feature-flags
laravel-feature-flags copied to clipboard
Laravel 12.x Compatibility
This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 12.x.
Before merging, you need to:
- Checkout the
l12-compatibilitybranch - Review all comments for additional changes
- Thoroughly test your package
If you do find an issue, please report it by commenting on this PR to help improve future automation.
Summary by CodeRabbit
-
New Features
- Expanded support to include Laravel 12, broadening compatibility with the latest framework version.
-
Chores
- Updated continuous integration settings to test against Laravel 12.
- Revised dependency version constraints to integrate newer releases of key packages.
:warning: Shift detected GitHub Actions which run jobs using a version matrix. Shift attempted to update your configuration for Laravel 12. However, you should review these changes to ensure the desired combination of versions are built for your package.
:alembic: Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.
To do so, temporarily add Shift's fork to the repositories property of your composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/laravel-shift/laravel-feature-flags.git"
}
]
}
Then update your dependency constraint to reference this branch:
{
"require": {
"juststeveking/laravel-feature-flags": "dev-l12-compatibility",
}
}
Finally, run: composer update
Walkthrough
The changes update the CI test workflow and dependency constraints. The GitHub Actions workflow now tests against Laravel version 12, in addition to versions 10 and 11, with corresponding adjustments to include and exclude rules. In parallel, the composer.json file has been updated to allow Laravel 12 support for illuminate/support and to expand version constraints for various development dependencies.
Changes
| File | Change Summary |
|---|---|
| .github/workflows/tests.yml | Updated testing matrix to include Laravel 12 with a corresponding testbench version (10.*) and added exclusion for PHP 8.1 on Laravel 11 and 12. |
| composer.json | Expanded dependency constraints: added support for Laravel 12 in illuminate/support and updated version requirements for doctrine/dbal, orchestra/testbench, pestphp/pest, pestphp/pest-plugin-laravel, phpunit/phpunit, and vimeo/psalm to include newer releases. |
Sequence Diagram(s)
sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant PHP as PHP Runtime
Dev->>GH: Push commit with updated workflow & dependencies
GH->>PHP: Retrieve test matrix (Laravel 10.*, 11.*, 12.*)
GH->>PHP: Execute tests (excludes PHP 8.1 for Laravel 11 & 12)
PHP-->>GH: Return test results
Poem
I'm a rabbit coding with glee,
Hopping through workflows fast and free,
Laravel 12 joins our test parade,
Dependencies updated for every upgrade,
In lines of code, I dance and cheerβ
A festive hop for changes here!
π 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 a76cda7b4a1e2d94cd6ab010a586a22a206eafbb and 376a940a9b1bd52688b684d5a1b87d9089dbecfa.
π Files selected for processing (2)
.github/workflows/tests.yml(1 hunks)composer.json(1 hunks)
π Additional comments (10)
.github/workflows/tests.yml (3)
15-15: Include Laravel 12.x in the Testing Matrix
The matrix now includes the new Laravel version ('12.') alongside '10.' and '11.*'. This aligns with the PR objective and ensures that the package is validated against Laravel 12.x.
22-23: Configure Testbench Version for Laravel 12.x
A new include entry for Laravel '12.' with testbench '10.' has been added, which appears to align with Laravel 12 compatibility. Please verify that testbench version 10.* is indeed the appropriate version for Laravel 12.x.
27-28: Consistent PHP Version Exclusions for Laravel 12.x
The exclusion for Laravel '12.' on PHP version '8.1' is now set, mirroring the pattern used for Laravel '11.'. Confirm that using PHP 8.1 with Laravel 12.x is known to cause issues, and that this exclusion is necessary for stability.composer.json (7)
20-20: Extend Illuminate/Support Constraint to Laravel 12.x
The dependency constraint for "illuminate/support" has been updated to include "^12.0" in addition to "^10.0|^11.0". This is essential for ensuring compatibility with Laravel 12.x.
23-23: Upgrade Doctrine/DBAL Constraint
The version constraint for "doctrine/dbal" is now "^3.3|^4.2", which broadens compatibility. Please ensure that any potential breaking changes in DBAL 4.x have been tested with this package.
25-25: Update Orchestra/Testbench Version Constraint
The "orchestra/testbench" dependency now accepts "^8.0.0|^9.0|^10.0", enabling the test suite to run with the version required for Laravel 12.x integration.
26-26: Expand PestPHP/Pest Constraint
The "pestphp/pest" version constraint has been updated to include "^3.7", catering to newer versions which may offer better features and compatibility with Laravel 12.x testing requirements.
27-27: Update PestPHP/Pest-Plugin-Laravel Constraint
The "pestphp/pest-plugin-laravel" dependency now includes "^3.1", ensuring that the plugin works seamlessly with the updated testing ecosystem.
28-28: Advance PHPUnit Constraint for Enhanced Testing
The "phpunit/phpunit" dependency now accepts "^9.3|^10.5|^11.5.3". This update is important for taking advantage of new features and improvements present in PHPUnit's later versions, especially to support Laravel 12.x.
29-29: Elevate Psalm Version for Static Analysis Enhancements
The "vimeo/psalm" dependency has been updated to "^4.4|^5.22|^6.7". This broadened constraint helps ensure that static analysis can work with the latest improvements and compatibility fixes needed for the Laravel 12.x environment.
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?
πͺ§ 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
@coderabbitaiin 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
@coderabbitaiin 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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR. (Beta)@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile 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.
Hey, @JustSteveKing π
I hope you're having an awesome day! First and foremost, I'd like to express my gratitude for the existence of this package and the work and love you've poured into it!
Apparently, you no longer advocate for the use of this package and instead suggest using Laravel Pennant. The fact that a first-party Laravel package exists for this use case is superb. However, there is one crucial bit missing in Laravel Pennant: per-user/group basis activation of a particular feature by an administrator. You see, Laravel Pennant is supposed to be automated, and unfortunately, there is no easy and straightforward way to get it to work in this manner. We have spent numerous days to get Pennant to work this way, but ultimately it was all futile.
On the contrary, this use case was a breeze to implement with your package, and as such, it would be highly appreciated if you could add Laravel 12 support! Please let me know if you need additional help to get it merged.
Thanks! π
Hey @mabdullahsari
Not a problem! I will look to get this into a mergeable state, it's usually test bench versioning that makes Laravel 12 PRs fail atm, so will start there