Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Convert MongoDB tutorial to PHP Attributes #2079

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

Merged
dunglas merged 2 commits into api-platform:4.0 from GromNaN:mongodb-review
Nov 30, 2024

Conversation

@GromNaN
Copy link
Contributor

@GromNaN GromNaN commented Nov 29, 2024

I replayed the tutorial to make sure it was still valid. A few updates (in comments).

vinceAmstoutz reacted with rocket emoji
api-platform/doctrine-odm is required but mapping.paths automatically contains ODM Document dir
Copy link
Member

@vinceAmstoutz vinceAmstoutz left a comment

Choose a reason for hiding this comment

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

Thanks!


mapping:
paths:
['%kernel.project_dir%/src/Entity', '%kernel.project_dir%/src/Document']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

vinceAmstoutz reacted with thumbs up emoji
*/
public $product;
#[ODM\Id(strategy: 'INCREMENT', type: 'int')]
private int $id;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding prop types.

vinceAmstoutz reacted with thumbs up emoji
Comment on lines -54 to +55
- MONGO_INITDB_DATABASE=api
- MONGO_INITDB_ROOT_USERNAME=api-platform
- MONGODB_INITDB_DATABASE=api
- MONGODB_INITDB_ROOT_USERNAME=api-platform
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replacing legacy env vars from the mongo docker image, with the new env vars that works with mongodb/mongodb-atlas-local and mongodb/mongodb-community-server.

vinceAmstoutz and dunglas reacted with thumbs up emoji
Copy link
Member

dunglas commented Nov 30, 2024

Cool!

@dunglas dunglas merged commit 16881ee into api-platform:4.0 Nov 30, 2024
1 check passed
Copy link
Member

dunglas commented Nov 30, 2024

Thank you very much @GromNaN!

GromNaN reacted with heart emoji

@GromNaN GromNaN deleted the mongodb-review branch November 30, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dunglas dunglas dunglas approved these changes

@vinceAmstoutz vinceAmstoutz vinceAmstoutz approved these changes

@alanpoulain alanpoulain Awaiting requested review from alanpoulain

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /