Skip to content

Fix Symfony doc: remove non-existent Searchable attribute, replace deprecated SearchService#3535

Merged
qdequele merged 2 commits intomainfrom
fix/symfony-searchable-attribute
Apr 2, 2026
Merged

Fix Symfony doc: remove non-existent Searchable attribute, replace deprecated SearchService#3535
qdequele merged 2 commits intomainfrom
fix/symfony-searchable-attribute

Conversation

@qdequele
Copy link
Copy Markdown
Member

@qdequele qdequele commented Mar 30, 2026

Closes #3529

Changes

  • Remove #[Searchable] attribute — this PHP attribute does not exist in the bundle (tracked in Support attributes to configure indices/indexes meilisearch-symfony#387). Entity configuration is now shown via YAML indices in meilisearch.yaml, which is the only supported approach.
  • Replace deprecated SearchService with SearchManagerInterface (deprecated since bundle v0.16). Updated both the basic search example and the search with filters example.
  • Fix search() call signature — the current API requires EntityManagerInterface as the first argument: $searchManager->search($entityManager, Movie::class, 'query').

Summary by CodeRabbit

  • Documentation
    • Comprehensively revised Symfony integration guide with a new configuration approach for defining and managing searchable indexes through centralized configuration settings.
    • Updated all search implementation examples to demonstrate proper service integration and current API usage patterns.
    • Enhanced documentation for filter and sort configuration with practical examples and current implementation best practices.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8743992d-ef97-4e14-9916-52169d8c7b8f

📥 Commits

Reviewing files that changed from the base of the PR and between ee4e97e and 39cd369.

📒 Files selected for processing (1)
  • getting_started/frameworks/symfony.mdx

📝 Walkthrough

Walkthrough

Documentation for the Symfony getting-started guide was updated to remove use of a non-existent #[Searchable] Doctrine attribute, switching entity-to-index registration to meilisearch.indices in config/packages/meilisearch.yaml, and adjusted example code to use SearchManagerInterface (with EntityManagerInterface) and updated search/filter call sites.

Changes

Cohort / File(s) Summary
Symfony docs
getting_started/frameworks/symfony.mdx
Removed #[Searchable] attribute references; added YAML-based meilisearch.indices registration (name, class) and per-index settings; replaced SearchService usage with SearchManagerInterface and updated controller/search snippets to call $searchManager->search(...) and include EntityManagerInterface where shown.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through docs to chase a ghostly trait,

Swapped it for YAML — tidy, clean, and straight.
SearchManager joins with EntityManager in line,
Now examples hum and everything's fine. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: removing the non-existent Searchable attribute and replacing deprecated SearchService with SearchManagerInterface.
Linked Issues check ✅ Passed The PR directly addresses issue #3529 by removing references to the non-existent Searchable attribute and documenting YAML-based indices configuration only.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #3529: removing incorrect Searchable documentation and updating to the supported YAML approach with SearchManagerInterface.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/symfony-searchable-attribute

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.

@qdequele
Copy link
Copy Markdown
Member Author

@louisboulagnon @norkunas thanks for reporting this! Could you take a look at this PR and let us know if it addresses the issues you raised?

@mintlify
Copy link
Copy Markdown

mintlify bot commented Mar 30, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
meilisearch-documentation 🟢 Ready View Preview Mar 30, 2026, 6:35 PM

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@getting_started/frameworks/symfony.mdx`:
- Around line 115-133: Update the SearchController::search method to use the new
SearchManagerInterface::search signature: remove the EntityManagerInterface
parameter from the controller method signature and from the call to
$searchManager->search, and call $searchManager->search with the entity class
and query string (e.g., Movie::class, 'matrix') so the method uses
SearchManagerInterface::search(Movie::class, 'matrix') instead of passing an
EntityManagerInterface instance.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d6f5f157-9d72-4c0d-ac78-fd7bbacc2d70

📥 Commits

Reviewing files that changed from the base of the PR and between 6139a2f and ee4e97e.

📒 Files selected for processing (1)
  • getting_started/frameworks/symfony.mdx

Comment thread getting_started/frameworks/symfony.mdx
Comment thread getting_started/frameworks/symfony.mdx Outdated
SearchManagerInterface $searchManager
): Response {
$results = $searchManager->search(
$entityManager,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the new search manager removed the need to provide the entity manager, so it can work with any source, not only orm ;)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, updated!

Comment thread getting_started/frameworks/symfony.mdx Outdated
```php
$results = $searchService->search(
$results = $searchManager->search(
$entityManager,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, updated!

@qdequele qdequele enabled auto-merge March 31, 2026 07:01
@qdequele qdequele requested a review from CaroFG March 31, 2026 12:39
@qdequele qdequele added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 34e3e25 Apr 2, 2026
2 of 3 checks passed
@qdequele qdequele deleted the fix/symfony-searchable-attribute branch April 2, 2026 08:06
@louisboulagnon
Copy link
Copy Markdown

Thanks for having addressed this so quickly 😄

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.

Mention of non existant Searchable attribute on the symfony bundle

4 participants