Conversation
* Refactor: env * fix test * app.api_base_url * Remove api_base_url from controller render methods and add it as a global variable in twig configuration * Remove api_token from controller render methods and update spa.html.twig to use app.session for auth_token * Update API base URL configuration in templates and JavaScript --------- Co-authored-by: Tatevik <tatevikg1@gmail.com>
|
Warning Review limit reached
Next review available in: 9 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe API base URL is now configured through the application parameter, exposed to Twig globally, rendered in an Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/Integration/Controller/CampaignsControllerTest.php (1)
41-45: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse the configured API URL in this test.
The assertion at Lines 58-60 still hard-codes
http://api.phplist.local/, unlikeAnalyticsControllerTest.phpandBouncesControllerTest.php. Readapp.api_base_urlfrom the container and interpolate it so the test remains valid when configuration differs in CI or another environment.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/Integration/Controller/CampaignsControllerTest.php` around lines 41 - 45, Update the test setup in CampaignsControllerTest to read app.api_base_url from the container and use that configured value in the assertion currently hard-coding http://api.phplist.local/. Match the configured-URL handling used by AnalyticsControllerTest and BouncesControllerTest while preserving the existing assertion behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@tests/Integration/Controller/CampaignsControllerTest.php`:
- Around line 41-45: Update the test setup in CampaignsControllerTest to read
app.api_base_url from the container and use that configured value in the
assertion currently hard-coding http://api.phplist.local/. Match the
configured-URL handling used by AnalyticsControllerTest and
BouncesControllerTest while preserving the existing assertion behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: cbb71002-bd7b-43f1-8ab4-16dc3b002fdc
📒 Files selected for processing (22)
assets/vue/api.jscomposer.jsonconfig/packages/twig.yamlconfig/services.ymlphpunit.xml.distsrc/Controller/AnalyticsController.phpsrc/Controller/BouncesController.phpsrc/Controller/CampaignsController.phpsrc/Controller/DashboardController.phpsrc/Controller/ListsController.phpsrc/Controller/PublicPagesController.phpsrc/Controller/SettingsController.phpsrc/Controller/SubscribersController.phpsrc/Controller/TemplatesController.phptemplates/base.html.twigtemplates/spa.html.twigtests/Integration/Controller/AnalyticsControllerTest.phptests/Integration/Controller/BouncesControllerTest.phptests/Integration/Controller/CampaignsControllerTest.phptests/Integration/Controller/DashboardControllerTest.phptests/Integration/Controller/ListsControllerTest.phptests/bootstrap.php
💤 Files with no reviewable changes (9)
- src/Controller/AnalyticsController.php
- src/Controller/DashboardController.php
- src/Controller/SettingsController.php
- src/Controller/BouncesController.php
- src/Controller/CampaignsController.php
- src/Controller/ListsController.php
- src/Controller/SubscribersController.php
- src/Controller/TemplatesController.php
- src/Controller/PublicPagesController.php
Summary by CodeRabbit
New Features
Bug Fixes
Thanks for contributing to phpList!