Skip to content

Conversation

@norkunas
Copy link
Member

@norkunas norkunas commented Dec 11, 2025

Summary by CodeRabbit

  • Chores
    • Updated internal test infrastructure to support additional kernel configuration parameters.

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.

@coderabbitai
Copy link

coderabbitai bot commented Dec 11, 2025

Walkthrough

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.

@norkunas norkunas merged commit 7e9948b into geocoder-php:master Dec 11, 2025
17 of 19 checks passed
@norkunas norkunas deleted the fix-share-dir branch December 11, 2025 13:26
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.

1 participant