Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Fix simple search engine cookbook #2706

Merged
merged 3 commits into from
Dec 15, 2024

Conversation

bikusta
Copy link
Contributor

@bikusta bikusta commented Dec 13, 2024

Q A
Type doc
BC Break no
Fixed issues -

Summary

Use array instead of ArrayCollection. It is not possible to use an ArrayCollection with a collection field type. This would result in a runtime exception: "Collection type requires value of type array or null, Doctrine\Common\Collections\ArrayCollection given (Doctrine\ODM\MongoDB\MongoDBException)".

Conversation with @malarzm in the Slack channel #mongodm-odm on 12/12/2024:

th docs are wrong, public Collection $keywords; has to be public array $keywords; and used as such

Use array instead of ArrayCollection. It is not possible to use an
ArrayCollection with a collection field type. This would result in
a runtime exception: "Collection type requires value of type
array or null, Doctrine\Common\Collections\ArrayCollection
given (Doctrine\ODM\MongoDB\MongoDBException)".
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

Thank you for taking the time to fix the doc.

docs/en/cookbook/simple-search-engine.rst Outdated Show resolved Hide resolved
bikusta and others added 2 commits December 13, 2024 17:46
Co-authored-by: Jérôme Tamarelle <jerome@tamarelle.net>
@SenseException SenseException merged commit 1c57a0c into doctrine:2.10.x Dec 15, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants