Skip to content

Conversation

@norkunas
Copy link
Collaborator

@norkunas norkunas commented Dec 1, 2025

Pull Request

Related issue

Fixes #<issue_number>

What does this PR do?

  • Fixes CS

Had to explicitly add symfony/var-exporter to dev dependencies, otherwise it is installed as v8 (which we don't support yet), and phpstan then returns error:

Internal error: Symfony LazyGhost is not available. Please install the     
     "symfony/var-exporter" package version 6.4 or 7 to use this feature or     
     enable PHP 8.4 native lazy objects. while analysing file                   
     /home/runner/work/meilisearch-symfony/meilisearch-symfony/tests/Entity/Ta  
     g.php   

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Summary by CodeRabbit

  • Chores

    • Added development dependency for testing framework enhancements.
  • Tests

    • Updated test infrastructure for improved compatibility standards.
    • Added deprecation baseline notice for framework compatibility tracking.

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

@norkunas norkunas added the maintenance Anything related to maintenance (CI, tests, refactoring...) label Dec 1, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 1, 2025

Walkthrough

The PR adds a Symfony var-exporter dev dependency, implements the Stringable interface on the DummyObjectId test class, and documents a Doctrine deprecation notice in the baseline-ignore file.

Changes

Cohort / File(s) Change Summary
Dependency Management
composer.json
Added "symfony/var-exporter": "^5.4 || ^6.0 || ^7.0" to require-dev section
Test Class Enhancement
tests/Entity/ObjectId/DummyObjectId.php
Updated DummyObjectId class declaration to implement \Stringable interface
Baseline Deprecation Notice
tests/baseline-ignore
Added deprecation notice regarding Doctrine's "auto_mapping" option deprecation (removed in DoctrineBundle 4.0)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8–12 minutes

  • Verify Symfony var-exporter version constraints are appropriate for project requirements
  • Confirm Stringable interface implementation is compatible with existing DummyObjectId usage patterns
  • Validate that the deprecation notice matches the actual Doctrine deprecation timeline

Possibly related PRs

Suggested reviewers

  • curquiza

Poem

🐰 A rabbit hops through dependencies and strings,
Stringable now, what clarity it brings!
Var-exporter added with careful care,
Doctrine's warnings documented with flair!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Fix CS' is vague and generic, using a non-descriptive abbreviation that doesn't convey meaningful information about the specific changes made. Consider using a more descriptive title like 'Add symfony/var-exporter to dev dependencies' or 'Fix CS by adding symfony/var-exporter dependency' to clarify the primary change.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 1311679 and 71f6bea.

📒 Files selected for processing (3)
  • composer.json (1 hunks)
  • tests/Entity/ObjectId/DummyObjectId.php (1 hunks)
  • tests/baseline-ignore (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: norkunas
Repo: meilisearch/meilisearch-symfony PR: 391
File: src/Command/MeilisearchImportCommand.php:117-120
Timestamp: 2025-08-05T04:46:01.119Z
Learning: In meilisearch-symfony project, the maintainer norkunas prefers to keep PRs focused and defer error handling improvements for settings updates to separate PRs, particularly when it involves decisions about partial import behavior when some indexes fail.
🔇 Additional comments (3)
composer.json (1)

53-54: symfony/var-exporter dev constraint looks consistent with the phpstan goal

Adding symfony/var-exporter as a dev requirement with ^5.4 || ^6.0 || ^7.0 cleanly prevents Composer from resolving to v8 while still allowing phpstan to get a compatible 6.4+/7.x release via intersection with its own constraints. This matches the PR description of avoiding the unsupported 8.x line for analysis tooling.

Please just confirm that your CI/phpstan runs now pass across your supported PHP/Symfony matrix after this change.

tests/baseline-ignore (1)

19-19: DoctrineBundle auto_mapping deprecation baseline entry is fine

The added ignore pattern for the DoctrineBundle auto_mapping deprecation is consistent with the existing baseline style and appropriately scopes this new framework noise to keep the test output clean.

tests/Entity/ObjectId/DummyObjectId.php (1)

7-7: Stringable implementation matches existing __toString, but mind PHP 7.4 compatibility

Declaring DummyObjectId as implements \Stringable is consistent with the existing __toString(): string and makes the intent explicit for tools and type checks. Note, however, that \Stringable only exists in PHP 8+, while composer.json still advertises "php": "^7.4|^8.0". Since this class is under tests/, it’s likely fine as long as your CI/test tooling is no longer run on PHP 7.4, but it’s worth double‑checking that there’s no remaining 7.4 test job that would now fatally error on loading this file. Based on learnings, any broader PHP-version adjustments are probably better handled in a separate, focused PR.


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.

@norkunas norkunas marked this pull request as ready for review December 1, 2025 05:19
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.38%. Comparing base (b05b9fe) to head (71f6bea).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #414   +/-   ##
=======================================
  Coverage   88.38%   88.38%           
=======================================
  Files          20       20           
  Lines         878      878           
=======================================
  Hits          776      776           
  Misses        102      102           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@norkunas norkunas merged commit 3a14b54 into meilisearch:main Dec 1, 2025
28 checks passed
@norkunas norkunas deleted the fix-cs branch December 1, 2025 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Anything related to maintenance (CI, tests, refactoring...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant