Skip to content

Support adding fields in make command - #10

Merged
paulinevos merged 1 commit into
doctrine:0.1.xfrom
paulinevos:add-fields
Feb 11, 2026
Merged

Support adding fields in make command#10
paulinevos merged 1 commit into
doctrine:0.1.xfrom
paulinevos:add-fields

Conversation

@paulinevos

Copy link
Copy Markdown
Contributor

No description provided.

@paulinevos
paulinevos requested a review from GromNaN February 4, 2026 10:16
Comment thread src/MongoDB/ClassSourceManipulator.php Outdated
return;
}

$newPropertyBuilder = (new Builder\Property($name))->makePublic();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The public property is conform to what we expect.

Note that for to-many relationships, we want to use private(set) Collection $propName; which we will modify later.

Comment thread src/MongoDB/ClassSourceManipulator.php Outdated
Comment thread src/MongoDB/ClassSourceManipulator.php Outdated
Comment thread src/MongoDB/ClassSourceManipulator.php Outdated
@paulinevos
paulinevos force-pushed the add-fields branch 2 times, most recently from dca81b4 to edf935d Compare February 6, 2026 12:11
@paulinevos paulinevos changed the title WIP: Support adding fields in make command Support adding fields in make command Feb 6, 2026
@paulinevos paulinevos changed the title Support adding fields in make command WIP: Support adding fields in make command Feb 6, 2026
@paulinevos
paulinevos force-pushed the add-fields branch 2 times, most recently from ac3e3a3 to d58577d Compare February 9, 2026 15:43
@paulinevos paulinevos changed the title WIP: Support adding fields in make command Support adding fields in make command Feb 9, 2026
@paulinevos
paulinevos requested a review from GromNaN February 9, 2026 15:43
Comment thread src/MongoDB/ClassSourceManipulator.php
Comment thread src/MongoDB/ClassSourceManipulator.php
Comment thread composer.json Outdated
Comment thread tests/Maker/MakeDocumentTest.php
@GromNaN

GromNaN commented Feb 9, 2026

Copy link
Copy Markdown
Member

You can update the default id field, to make it public and remove the setter. It's declared in templates/mongodb/Document.tpl.php

@paulinevos
paulinevos merged commit 8721f4a into doctrine:0.1.x Feb 11, 2026
7 checks passed
@paulinevos
paulinevos deleted the add-fields branch February 11, 2026 10:23
@GromNaN GromNaN added this to the 0.1.0 milestone Mar 20, 2026
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