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

Appearance settings

[PropertyAccess] Allow different prefixes than "add" and "remove" #9336

Copy link
Copy link
Closed
@webmozart

Description

@webmozart
Issue body actions

Currently, adders and removers must be prefixed with "add" and "remove". When applying DDD, this sometimes doesn't make sense, for example:

class Contact
{
    public function addGroup(ContactGroup $group) { }
    public function removeGroup(ContactGroup $group) { }
}

Here it would make much more sense to prefix the methods with "join" and "leave":

class Contact
{
    public function joinGroup(ContactGroup $group) { }
    public function leaveGroup(ContactGroup $group) { }
}

The PropertyAccessor should provide a way to use these methods.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.