You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A test kernel class is updated with a new public method getShareDir() that returns the cached directory, and getKernelParameters is modified to conditionally include the kernel.share_dir parameter with its real path when available.
Changes
Cohort / File(s)
Summary
Test Kernel Share Directory Support tests/Functional/CustomTestKernel.php
Added getShareDir(): ?string method returning cache directory; modified getKernelParameters to conditionally include kernel.share_dir parameter with realpath computation
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
Single file modification in test utility
Straightforward method addition without complex logic
Direct delegation to existing method
Poem
🐰 A kernel share dir, simple and clean,
With paths that resolve to where files have been,
The cache now shared, both near and far,
Testing grows stronger, thump thump ⭐
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%.
You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name
Status
Explanation
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
✅ Passed
The title 'Fix kernel.share_dir' is directly related to the main change: adding getShareDir() method and updating getKernelParameters to properly handle kernel.share_dir parameter.
✨ Finishing touches
📝 Generate docstrings
🧪 Generate unit tests (beta)
Create PR with unit tests
Post copyable unit tests in a comment
📜 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 d797ec8 and 1c24147.
📒 Files selected for processing (1)
tests/Functional/CustomTestKernel.php (2 hunks)
🔇 Additional comments (2)
tests/Functional/CustomTestKernel.php (2)
48-51: getShareDir() override correctly ties the share directory to this kernel’s cache dir
Returning $this->getCacheDir() keeps %kernel.share_dir% aligned with your custom cache directory and matches Symfony’s documented default of using the cache dir when no dedicated share dir is configured.(symfony.com)
If you later need tests that exercise a distinct APP_SHARE_DIR, double-check whether CustomTestKernel::getShareDir() should start delegating to the base implementation instead of hard‑wiring it to the cache dir.
85-85: Conditional addition of kernel.share_dir parameter is consistent and non‑breaking
Merging the base parameter array with an optional ['kernel.share_dir' => realpath($dir) ?: $dir] only when getShareDir() is non‑null cleanly exposes %kernel.share_dir% alongside the other kernel.* paths without altering existing keys, which matches how Symfony documents this parameter.(symfony.com)
Given this method mirrors Symfony’s Kernel::getKernelParameters() with local tweaks, consider re‑syncing it whenever you bump Symfony to pick up any future core parameter changes.
Comment @coderabbitai help to get the list of available commands and usage tips.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
Note: This release contains internal testing infrastructure updates with no direct impact on end-user functionality.
✏️ Tip: You can customize this high-level summary in your review settings.