Skip to content

Conversation

@Chris53897
Copy link

@Chris53897 Chris53897 commented Dec 20, 2025

Summary by CodeRabbit

  • Tests
    • Updated command registration in tests to support newer framework method while preserving legacy behavior.
    • Made test teardown compatible across PHP versions by conditionally handling private property access.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Walkthrough

Tests updated: GeocodeCommandTest now prefers Application::addCommand() when available, falling back to Application::add(); FactoryValidatorPassTest conditions calling ReflectionProperty::setAccessible(true) only for PHP < 8.1.

Changes

Cohort / File(s) Summary
Command test - Symfony method compatibility
tests/Command/GeocodeCommandTest.php
Use method_exists($app, 'addCommand') to call addCommand(...) when present; otherwise fall back to add(...). Preserves previous behavior while adding Symfony 8 compatibility.
PHP-version conditional reflection
tests/DependencyInjection/Compiler/FactoryValidatorPassTest.php
Gate ReflectionProperty::setAccessible(true) in tearDown() to run only when PHP_VERSION_ID < 80100; skip calling setAccessible on PHP ≥ 8.1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review GeocodeCommandTest.php for correct fallback behavior and that tests still register and assert the command as before.
  • Confirm FactoryValidatorPassTest.php teardown does not leave global/static state on PHP ≥ 8.1 and that tests remain deterministic.

Poem

🐇 I hopped through tests with a tiny grin,
Switched add to addCommand so progress could begin.
For PHP that's newer I softly spare the gate,
Reflection sleeps soundly — the rabbit says: "Great!" 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'chore: fix deprecations' is vague and generic, using non-descriptive language that doesn't convey what deprecations are being fixed or which changes are involved. Consider a more specific title like 'chore: add Symfony 8 and PHP 8.1 compatibility fixes' to clearly indicate which deprecations are being addressed.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ 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: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62e4b4e and f17c0fa.

📒 Files selected for processing (1)
  • tests/Command/GeocodeCommandTest.php (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/Command/GeocodeCommandTest.php

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Chris53897 Chris53897 closed this Dec 20, 2025
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.

2 participants