DDC-970: orm:generate-entities should have an option to change the visibility of the attributes #1209

Closed
opened 2026-01-22 13:06:04 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 6, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user ccapndave:

The orm:generate entities command should have an extra parameter --attribute-visibility which can be set to 'private', 'protected' or 'public' (defaulting to private). This allows control over the visibility of the attributes generated for edge cases (e.g. client/server serialization) where private attributes are no good.

Originally created by @doctrinebot on GitHub (Jan 6, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user ccapndave: The orm:generate entities command should have an extra parameter --attribute-visibility which can be set to 'private', 'protected' or 'public' (defaulting to private). This allows control over the visibility of the attributes generated for edge cases (e.g. client/server serialization) where private attributes are no good.
admin added the Improvement label 2026-01-22 13:06:04 +01:00
admin closed this issue 2026-01-22 13:06:04 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 6, 2011):

Comment created by ccapndave:

I have implemented this on the DDC-970 branch of my ccapndave/doctrine2 fork.

The option is used like this:

doctrine orm:generate-entities --attribute-visibility=protected my_dir
doctrine orm:generate-entities --attribute-visibility=public my_dir

When the option is omitted attributes have private visibility as normal.

@doctrinebot commented on GitHub (Jan 6, 2011): Comment created by ccapndave: I have implemented this on the [DDC-970](http://www.doctrine-project.org/jira/browse/DDC-970) branch of my ccapndave/doctrine2 fork. The option is used like this: doctrine orm:generate-entities --attribute-visibility=protected my_dir doctrine orm:generate-entities --attribute-visibility=public my_dir When the option is omitted attributes have private visibility as normal.
Author
Owner

@doctrinebot commented on GitHub (Jan 6, 2011):

Comment created by @beberlei:

Rejected for two reasons, formatting is wrong and the entity generator is just a helper tool, not meant to be a swiss army knife. I don't want to maintain all that trillions of code generation use-cases.

@doctrinebot commented on GitHub (Jan 6, 2011): Comment created by @beberlei: Rejected for two reasons, formatting is wrong and the entity generator is just a helper tool, not meant to be a swiss army knife. I don't want to maintain all that trillions of code generation use-cases.
Author
Owner

@doctrinebot commented on GitHub (Jan 6, 2011):

Issue was closed with resolution "Won't Fix"

@doctrinebot commented on GitHub (Jan 6, 2011): Issue was closed with resolution "Won't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1209